Skip to content

Commit d8ccb82

Browse files
authored
Merge pull request #321 from jfy133/dev
Resource requirement and abstraction process fixes
2 parents 5832685 + ce90aee commit d8ccb82

4 files changed

Lines changed: 188 additions & 141 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2222
* [#302](https://github.com/nf-core/eager/issues/302) - Added mitochondrial to nuclear ratio calculation
2323
* [#302](https://github.com/nf-core/eager/issues/302) - Added VCF2Genome for concensus sequence generation
2424
* Fancy new logo from [ZandraFagernas](https://github.com/ZandraFagernas)
25-
* [#286](https://github.com/nf-core/eager/issues/286) Adds pipeline-specific profiles (loaded from nf-core configs)
25+
* [#286](https://github.com/nf-core/eager/issues/286) - Adds pipeline-specific profiles (loaded from nf-core configs)
26+
* [#310](https://github.com/nf-core/eager/issues/310) - Generalises base.config
2627

2728
### `Fixed`
2829

conf/base.config

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,79 +11,85 @@
1111

1212
process {
1313
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
14-
memory = { check_max( 8.GB * task.attempt, 'memory' ) }
14+
memory = { check_max( 4.GB * task.attempt, 'memory' ) }
1515
time = { check_max( 2.h * task.attempt, 'time' ) }
1616

1717
errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' }
18-
maxRetries = 1
18+
maxRetries = 3
1919
maxErrors = '-1'
2020

21-
// Process-specific resource requirements (others leave at default, e.g. Fastqc)
22-
withName:get_software_versions {
23-
memory = { check_max( 2.GB, 'memory' ) }
24-
cache = false
21+
// Generic resource requirements - s(ingle)c(ore)/m(ulti)c(ore)
22+
23+
withLabel:'sc_tiny'{
24+
cpus = { check_max( 1, 'cpus' ) }
25+
memory = { check_max( 1.GB * task.attempt, 'memory' ) }
26+
time = { check_max( 2.h * task.attempt, 'time' ) }
2527
}
26-
withName:convertBam {
27-
cpus = { check_max(8 * task.attempt, 'cpus') }
28+
29+
withLabel:'sc_small'{
30+
cpus = { check_max( 1, 'cpus' ) }
31+
memory = { check_max( 4.GB * task.attempt, 'memory' ) }
32+
time = { check_max( 2.h * task.attempt, 'time' ) }
2833
}
29-
withName:makeSeqDict {
30-
memory = { check_max( 16.GB * task.attempt, 'memory' ) }
34+
35+
withLabel:'sc_medium'{
36+
cpus = { check_max( 1, 'cpus' ) }
37+
memory = { check_max( 8.GB * task.attempt, 'memory' ) }
38+
time = { check_max( 2.h * task.attempt, 'time' ) }
3139
}
32-
withname:makeBWAIndex {
33-
time = params.large_ref ? '12.h' : { check_max(8.h * task.attempt, 'time') }
40+
41+
withLabel:'mc_small'{
42+
cpus = { check_max( 2, 'cpus' ) }
43+
memory = { check_max( 4.GB * task.attempt, 'memory' ) }
44+
time = { check_max( 2.h * task.attempt, 'time' ) }
3445
}
35-
withName:bwa {
36-
memory = { check_max( 16.GB * task.attempt, 'memory' ) }
37-
cpus = { check_max(8 * task.attempt, 'cpus') }
38-
time = { check_max(8.h * task.attempt, 'time') }
46+
47+
withLabel:'mc_medium' {
48+
cpus = { check_max( 4, 'cpus' ) }
49+
memory = { check_max( 8.GB * task.attempt, 'memory' ) }
50+
time = { check_max( 2.h * task.attempt, 'time' ) }
3951
}
40-
withName:bwamem{
41-
memory = { check_max( 16.GB * task.attempt, 'memory' ) }
42-
cpus = { check_max(8 * task.attempt, 'cpus') }
43-
time = { check_max(8.h * task.attempt, 'time') }
52+
53+
withLabel:'mc_large'{
54+
cpus = { check_max( 8, 'cpus' ) }
55+
memory = { check_max( 16.GB * task.attempt, 'memory' ) }
56+
time = { check_max( 2.h * task.attempt, 'time' ) }
4457
}
45-
withName:qualimap{
46-
cpus = { check_max(8 * task.attempt, 'cpus') }
47-
errorStrategy = 'ignore'
58+
59+
withLabel:'mc_huge'{
60+
cpus = { check_max( 32, 'cpus' ) }
61+
memory = { check_max( 256.GB * task.attempt, 'memory' ) }
62+
time = { check_max( 2.h * task.attempt, 'time' ) }
4863
}
49-
withName:bam_trim{
50-
cpus = { check_max(4 * task.attempt, 'cpus') }
64+
65+
// Process-specific resource requirements (others leave at default, e.g. Fastqc)
66+
withName:get_software_versions {
67+
memory = { check_max( 2.GB, 'memory' ) }
68+
cache = false
69+
}
70+
71+
withName:strip_input_fastq {
72+
time = { check_max( 4.h * task.attempt, 'time' ) }
5173
}
52-
withName:markDup{
53-
cpus = { check_max(8 * task.attempt, 'cpus') }
74+
75+
withName:qualimap{
76+
errorStrategy = 'ignore'
5477
}
78+
5579
withName:preseq {
5680
errorStrategy = 'ignore'
5781
}
58-
withName: fastqc {
59-
errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' }
82+
83+
// Add 141 ignore due to unclean pipe closing by pmdtools https://github.com/pontussk/PMDtools/issues/7
84+
withName: pmdtools {
85+
errorStrategy = { task.exitStatus in [141] ? 'ignore' : 'retry' }
6086
}
87+
6188
withName: multiqc {
6289
errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' }
6390
}
64-
withName: damageprofiler {
65-
time = params.large_ref ? { check_max(8.h * task.attempt, 'time') } : { check_max(2.h * task.attempt, 'time')}
66-
}
67-
withName: strip_input_fastq {
68-
cpus = { check_max(8 * task.attempt, 'cpus') }
69-
memory = { check_max( 8.GB * task.attempt, 'memory' ) }
70-
}
71-
withName: malt {
72-
memory = { check_max( 128.GB * task.attempt, 'memory' ) }
73-
cpus = { check_max(16 * task.attempt, 'cpus') }
74-
time = { check_max(2.h * task.attempt, 'time') }
75-
}
76-
withName: maltextract {
77-
memory = { check_max( 8.GB * task.attempt, 'memory' ) }
78-
cpus = { check_max(4 * task.attempt, 'cpus') }
79-
}
80-
withName: vcf2genome {
81-
memory = { check_max( 4.GB * task.attempt, 'memory' ) }
82-
cpus = 1
83-
}
8491
}
8592

86-
8793
params {
8894
// Defaults only, expecting to be overwritten
8995
max_memory = 128.GB

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- bioconda::picard=2.21.4
1313
- bioconda::samtools=1.9
1414
- bioconda::dedup=0.12.5
15-
- bioconda::angsd=0.931
15+
- bioconda::angsd=0.921
1616
- bioconda::circularmapper=1.93.4
1717
- bioconda::gatk4=4.1.4.1
1818
- bioconda::qualimap=2.2.2d

0 commit comments

Comments
 (0)