-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathcfc.config
More file actions
44 lines (38 loc) · 1.74 KB
/
cfc.config
File metadata and controls
44 lines (38 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Profile config names for nf-core/configs
validation.ignoreParams = ['sarek_cfc_check_resource_func']
params {
// Specific nf-core/configs params
config_profile_contact = 'Friederike Hanssen (@FriederikeHanssen)'
config_profile_description = 'nf-core/sarek CFC profile provided by nf-core/configs'
}
// Specific nf-core/sarek process configuration
process {
withName:'StrelkaSingle|Strelka|StrelkaBP|MantaSingle|Manta' {
cpus = { params.sarek_cfc_check_resource_func( 20 * task.attempt) }
memory = { params.sarek_cfc_check_resource_func( 59.GB * task.attempt) }
}
withName:'MSIsensor_scan|MSIsensor_msi' {
memory = { params.sarek_cfc_check_resource_func( 55.GB * task.attempt ) }
}
withName:BamQC {
memory = { params.sarek_cfc_check_resource_func( 372.GB * task.attempt) }
}
withName:MapReads{
cpus = { params.sarek_cfc_check_resource_func( 20 * task.attempt ) }
memory = { params.sarek_cfc_check_resource_func( 59.GB * task.attempt) }
}
}
params.sarek_cfc_check_resource_func = { obj ->
try {
if (obj.getClass() == nextflow.util.MemoryUnit && obj.compareTo(params.max_memory as MemoryUnit) == 1)
return params.max_memory as MemoryUnit
else if (obj.getClass() == nextflow.util.Duration && obj.compareTo(params.max_time as Duration) == 1)
return params.max_time as Duration
else if (obj.getClass() == java.lang.Integer)
return Math.min(obj, params.max_cpus as int)
else
return obj
} catch (_) {
println " ### ERROR ### Max params max_memory:'${params.max_memory}', max_time:'${params.max_time}' or max_cpus:'${params.max_cpus}' is not valid! Using default value: $obj"
}
}