Skip to content

Commit d802592

Browse files
committed
Fix broken makeBWAindex process. Minor bugfixes.
1 parent 0f7ce1c commit d802592

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

conf/base.config

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,11 @@ process {
2525
time = { check_max( 2.h * task.attempt, 'time' ) }
2626
container = params.container
2727

28-
errorStrategy = { task.exitStatus == 143 ? 'retry' : 'finish' }
28+
errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'terminate' }
2929
maxRetries = 1
3030
maxErrors = '-1'
3131

3232
// Environment modules and resource requirements
33-
$fastqc {
34-
errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' }
35-
}
3633
$trim_galore {
3734
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
3835
memory = { check_max( 16.GB * task.attempt, 'memory' ) }
@@ -86,11 +83,9 @@ process {
8683
}
8784
$get_software_versions {
8885
memory = { check_max( 2.GB * task.attempt, 'memory' ) }
89-
executor = 'local'
9086
errorStrategy = 'ignore'
9187
}
9288
$multiqc {
9389
memory = { check_max( 2.GB * task.attempt, 'memory' ) }
94-
executor = 'local'
9590
}
9691
}

main.nf

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ if (params.help){
9999
// Configurable variables
100100
params.name = false
101101
params.project = false
102+
params.genome = false
102103
params.genomes = false
103104
params.fasta = params.genome ? params.genomes[ params.genome ].fasta ?: false : false
104105
params.bwa_index = params.genome ? params.genomes[ params.genome ].bwa ?: false : false
@@ -195,11 +196,6 @@ def REF_macs = false
195196
def REF_ngsplot = false
196197
if (params.genome == 'GRCh37'){ REF_macs = 'hs'; REF_ngsplot = 'hg19' }
197198
else if (params.genome == 'GRCm38'){ REF_macs = 'mm'; REF_ngsplot = 'mm10' }
198-
else if (params.genome == false){
199-
log.warn "No reference supplied for MACS, ngs_plot and annotation. Use '--genome GRCh37' or '--genome GRCm38' to run MACS, ngs_plot and annotation."
200-
} else {
201-
log.warn "Reference '${params.genome}' not supported by MACS, ngs_plot and annotation (only GRCh37 and GRCm38)."
202-
}
203199

204200

205201
log.info """=======================================================
@@ -281,6 +277,17 @@ if( workflow.profile == 'standard'){
281277
}
282278
}
283279

280+
// Show a big warning message if we're not running MACS
281+
if (!REF_macs){
282+
def warnstring = params.genome ? "Reference '${params.genome}' not supported by" : 'No reference supplied for'
283+
log.warn "=======================================================\n" +
284+
" WARNING! $warnstring MACS, ngs_plot\n" +
285+
" and annotation. Steps for MACS, ngs_plot and annotation\n" +
286+
" will be skipped. Use '--genome GRCh37' or '--genome GRCm38'\n" +
287+
" to run these steps.\n" +
288+
"==============================================================="
289+
}
290+
284291

285292
/*
286293
* PREPROCESSING - Build BWA index
@@ -299,8 +306,8 @@ if(!params.bwa_index && fasta){
299306

300307
script:
301308
"""
302-
mkdir BWAIndex
303309
bwa index -a bwtsw $fasta
310+
mkdir BWAIndex && mv ${fasta}* BWAIndex
304311
"""
305312
}
306313
}

0 commit comments

Comments
 (0)