@@ -99,6 +99,7 @@ if (params.help){
9999// Configurable variables
100100params. name = false
101101params. project = false
102+ params. genome = false
102103params. genomes = false
103104params. fasta = params. genome ? params. genomes[ params. genome ]. fasta ?: false : false
104105params. bwa_index = params. genome ? params. genomes[ params. genome ]. bwa ?: false : false
@@ -195,11 +196,6 @@ def REF_macs = false
195196def REF_ngsplot = false
196197if (params. genome == ' GRCh37' ){ REF_macs = ' hs' ; REF_ngsplot = ' hg19' }
197198else 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
205201log. 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