@@ -32,7 +32,18 @@ def check_max(obj, type) {
3232 println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
3333 return obj
3434 }
35+ } else if (type == 'disk') {
36+ try {
37+ if (obj.compareTo(params.max_disk as nextflow.util.MemoryUnit) == 1)
38+ return params.max_disk as nextflow.util.MemoryUnit
39+ else
40+ return obj
41+ } catch (all) {
42+ println " ### ERROR ### Max disk '${params.max_disk}' is not valid! Using default value: $obj"
43+ return obj
44+ }
3545 }
46+
3647}
3748
3849process {
@@ -89,18 +100,32 @@ process {
89100 time = { check_max( 2.h * task.attempt, 'time' ) }
90101 memory = { check_max( 90.GB * task.attempt, 'memory' ) }
91102 }
103+ withName: 'BWAMEM2_MEM' {
104+ disk = 100.GB
105+ }
106+ withName: 'SAMTOOLS_SORT' {
107+ disk = 150.GB
108+ }
109+ withName: 'SAMTOOLS_MERGE' {
110+ disk = 60.GB
111+ }
112+ withName: 'GATK4_MARKDUPLICATES_SPARK' {
113+ disk = 200.GB
114+ }
92115 withName: 'SAMTOOLS_MPILEUP' {
93- time = { check_max( 12.h * task.attempt, 'time' ) }
116+ time = { check_max( 12.h * task.attempt, 'time' ) }
117+ disk = 250.GB
94118 }
95119 withName: 'FREEC_GERMLINE' {
96120 time = { check_max( 2.h * task.attempt, 'time' ) }
97121 memory = { check_max( 80.GB * task.attempt, 'memory' ) }
98122 cpus = { check_max( 6 * task.attempt, 'cpus' ) }
99123 }
100- withName: 'GRIDSS' {
101- time = { check_max( 2.h * task.attempt, 'time' ) }
102- memory = { check_max( 80.GB * task.attempt, 'memory' ) }
103- cpus = { check_max( 8 * task.attempt, 'cpus' ) }
124+ withName: 'GRIDSS_GERMLINE' {
125+ time = { check_max( 24.h * task.attempt, 'time' ) }
126+ memory = { check_max( 200.GB * task.attempt, 'memory' ) }
127+ cpus = { check_max( 10 * task.attempt, 'cpus' ) }
128+ drive = 100.GB
104129 }
105130 withName: 'GATK4_MUTECT2' {
106131 cpus = { check_max( 6 * task.attempt, 'cpus' ) }
0 commit comments