1+ /*
2+ * -------------------------------------------------
3+ * Nextflow config file for Sarek
4+ * -------------------------------------------------
5+ * Generalized resource configuration for clusters
6+ * -------------------------------------------------
7+ */
8+
9+ params {
10+ singleCPUMem = 7.GB // for processes that are using more memory but a single CPU only. Use the 'core' queue for these
11+ }
12+
13+ process {
14+ cpus = { check_max( 10, 'cpus' ) }
15+ memory = { check_max( 16.GB * task.attempt, 'memory' ) }
16+ time = { check_max( 8.h * task.attempt, 'time' ) }
17+
18+ errorStrategy = {task.exitStatus == 143 ? 'retry' : 'terminate'}
19+ maxErrors = '-1'
20+ maxRetries = 3
21+
22+ withName:MapReads {
23+ memory = { check_max( 60.GB * task.attempt, 'memory' ) }
24+ cpus = { check_max( 10, 'cpus' ) }
25+ }
26+ withName:CreateRecalibrationTable {
27+ cpus = { check_max( 12, 'cpus' ) }
28+ memory = {params.singleCPUMem * 8 * task.attempt}
29+ }
30+ withName:MarkDuplicates {
31+ // Actually the -Xmx value should be kept lower
32+ cpus = { check_max( 16, 'cpus' ) }
33+ memory = { check_max( 60.GB * task.attempt, 'memory' ) }
34+ }
35+ withName:MergeBams {
36+ memory = {params.singleCPUMem * task.attempt}
37+ time = { check_max( 5.h * task.attempt, 'time' ) }
38+ }
39+ withName:RecalibrateBam {
40+ cpus = { check_max( 12, 'cpus' ) }
41+ memory = { check_max( 7.GB * 8 * task.attempt, 'memory' ) }
42+ time = { check_max( 5.h * task.attempt, 'time' ) }
43+ }
44+ withName:RunAlleleCount {
45+ cpus = { check_max( 1, 'cpus' ) }
46+ memory = { check_max( 14.GB * task.attempt, 'memory' ) }
47+ }
48+ withName:RunAscat {
49+ cpus = { check_max( 1, 'cpus' ) }
50+ memory = { check_max( 14.GB * task.attempt, 'memory' ) }
51+ }
52+ withName:RunBcftoolsStats {
53+ cpus = { check_max( 1, 'cpus' ) }
54+ }
55+ withName:RunConvertAlleleCounts {
56+ cpus = { check_max( 1, 'cpus' ) }
57+ memory = { check_max( 14.GB * task.attempt, 'memory' ) }
58+ }
59+ withName:RunFastQC {
60+ cpus = { check_max( 2, 'cpus' ) } // FastQC is only capable of running one thread per fastq file.
61+ errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' }
62+ }
63+ withName:RunFreeBayes {
64+ cpus = { check_max( 1, 'cpus' ) }
65+ memory = { check_max( 8.GB * task.attempt, 'memory' ) }
66+ }
67+ withName:RunHaplotypecaller {
68+ cpus = { check_max( 20, 'cpus' ) }
69+ // Increase memory quadratically
70+ memory = { check_max( 7.GB * 2 * task.attempt, 'memory' ) }
71+ time = { check_max( 5.h * task.attempt, 'time' ) }
72+ }
73+ withName:RunGenotypeGVCFs {
74+ cpus = { check_max( 20, 'cpus' ) }
75+ memory = { check_max( 7.GB * task.attempt, 'memory' ) }
76+ }
77+ withName:RunMultiQC {
78+ errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' }
79+ }
80+ withName:RunMutect2 {
81+ cpus = { check_max( 2, 'cpus' ) }
82+ memory = { check_max( 7.GB * task.attempt, 'memory' ) }
83+ time = { check_max( 5.h * task.attempt, 'time' ) }
84+ }
85+ withName:RunSamtoolsStats {
86+ cpus = { check_max( 2, 'cpus' ) }
87+ time = { check_max( 5.h * task.attempt, 'time' ) }
88+ }
89+ withName:RunSingleStrelka {
90+ time = { check_max( 5.h * task.attempt, 'time' ) }
91+ }
92+ withName:RunSnpeff {
93+ cpus = { check_max( 1, 'cpus' ) }
94+ errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' }
95+ }
96+ withName:RunStrelka {
97+ cpus = { check_max( 1, 'cpus' ) }
98+ time = { check_max( 5.h * task.attempt, 'time' ) }
99+ }
100+ withName:RunVEP {
101+ cpus = { check_max( 1, 'cpus' ) }
102+ errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' }
103+ }
104+ }
0 commit comments