diff --git a/conf/modules.config b/conf/modules.config index 747a03a..60ebaa4 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -33,7 +33,7 @@ process { } withName: FALCO { - ext.prefix = { "${meta.id}_${meta.run_accession}_raw" } + ext.prefix = { "${meta.id}_${meta.run_accession}_raw_falco" } publishDir = [ path: { "${params.outdir}/falco/raw" }, mode: params.publish_dir_mode, @@ -42,7 +42,7 @@ process { } withName: FALCO_PROCESSED { - ext.prefix = { "${meta.id}_${meta.run_accession}_processed" } + ext.prefix = { "${meta.id}_${meta.run_accession}_processed_falco" } publishDir = [ path: { "${params.outdir}/falco/processed" }, mode: params.publish_dir_mode, @@ -61,10 +61,17 @@ process { ].join(' ').trim() ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/fastp" }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - enabled: params.save_preprocessed_reads + [ + path: { "${params.outdir}/fastp" }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + enabled: params.save_preprocessed_reads + ], + [ + path: { "${params.outdir}/fastp" }, + mode: params.publish_dir_mode, + pattern: '*.{log,html,json}' + ] ] } @@ -82,10 +89,17 @@ process { ].join(' ').trim() ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/fastp" }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - enabled: params.save_preprocessed_reads + [ + path: { "${params.outdir}/fastp" }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + enabled: params.save_preprocessed_reads + ], + [ + path: { "${params.outdir}/fastp" }, + mode: params.publish_dir_mode, + pattern: '*.{log,html,json}' + ] ] } @@ -98,10 +112,17 @@ process { ].join(' ').trim() ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/adapterremoval" }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - enabled: params.save_preprocessed_reads + [ + path: { "${params.outdir}/adapterremoval" }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + enabled: params.save_preprocessed_reads + ], + [ + path: { "${params.outdir}/adapterremoval" }, + mode: params.publish_dir_mode, + pattern: '*.settings' + ] ] } @@ -117,20 +138,34 @@ process { ].join(' ').trim() ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/adapterremoval" }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - enabled: params.save_preprocessed_reads + [ + path: { "${params.outdir}/adapterremoval" }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + enabled: params.save_preprocessed_reads + ], + [ + path: { "${params.outdir}/adapterremoval" }, + mode: params.publish_dir_mode, + pattern: '*.settings' + ] ] } withName: PORECHOP_PORECHOP { ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/porechop" }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - enabled: params.save_preprocessed_reads + [ + path: { "${params.outdir}/porechop" }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + enabled: params.save_preprocessed_reads + ], + [ + path: { "${params.outdir}/porechop" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ] ] } @@ -143,10 +178,17 @@ process { .join(' ').trim() ext.prefix = { "${meta.id}_${meta.run_accession}_filtered" } publishDir = [ - path: { "${params.outdir}/filtlong" }, - mode: params.publish_dir_mode, - pattern: '*.{fastq.gz,log}', - enabled: params.save_preprocessed_reads + [ + path: { "${params.outdir}/filtlong" }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + enabled: params.save_preprocessed_reads + ], + [ + path: { "${params.outdir}/filtlong" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ] ] } @@ -163,21 +205,21 @@ process { ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ [ - path: { "${params.outdir}/bowtie2/align" }, - mode: params.publish_dir_mode, - pattern: '*.log' + path: { "${params.outdir}/bowtie2/align" }, + mode: params.publish_dir_mode, + pattern: '*.log' ], [ - path: { "${params.outdir}/bowtie2/align" }, - mode: params.publish_dir_mode, - enabled: params.save_hostremoval_mapped, - pattern: '*.bam' + path: { "${params.outdir}/bowtie2/align" }, + mode: params.publish_dir_mode, + enabled: params.save_hostremoval_mapped, + pattern: '*.bam' ], [ - path: { "${params.outdir}/bowtie2/align" }, - mode: params.publish_dir_mode, - enabled: params.save_hostremoval_unmapped, - pattern: '*.fastq.gz' + path: { "${params.outdir}/bowtie2/align" }, + mode: params.publish_dir_mode, + enabled: params.save_hostremoval_unmapped, + pattern: '*.fastq.gz' ] ] } @@ -240,10 +282,17 @@ process { ].join(' ').trim() ext.prefix = { "${meta.id}-${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/bbduk/" }, - mode: params.publish_dir_mode, - pattern: '*.{fastq.gz,log}', - enabled: params.save_complexityfiltered_reads + [ + path: { "${params.outdir}/bbduk/" }, + mode: params.publish_dir_mode, + pattern: '*.{fastq.gz,log}', + enabled: params.save_complexityfiltered_reads + ], + [ + path: { "${params.outdir}/bbduk/" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ] ] } @@ -255,10 +304,17 @@ process { ].join(' ').trim() ext.prefix = { "${meta.id}-${meta.run_accession}" } publishDir = [ - path: { "${params.outdir}/prinseqplusplus/" }, - mode: params.publish_dir_mode, - pattern: '*{_good_out.fastq.gz,_good_out_R1.fastq.gz,_good_out_R2.fastq.gz,log}', - enabled: params.save_complexityfiltered_reads + [ + path: { "${params.outdir}/prinseqplusplus/" }, + mode: params.publish_dir_mode, + pattern: '*{_good_out.fastq.gz,_good_out_R1.fastq.gz,_good_out_R2.fastq.gz}', + enabled: params.save_complexityfiltered_reads + ], + [ + path: { "${params.outdir}/prinseqplusplus/" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ] ] } @@ -295,7 +351,7 @@ process { withName: KRAKEN2_KRAKEN2 { ext.args = params.kraken2_save_minimizers ? { "${meta.db_params} --report-minimizer-data" } : { "${meta.db_params}" } - ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } + ext.prefix = params.perform_runmerging ? { meta.tool == "bracken" ? "${meta.id}-${meta.db_name}.bracken" : "${meta.id}-${meta.db_name}" } : { meta.tool == "bracken" ? "${meta.id}-${meta.run_accession}-${meta.db_name}.bracken" : "${meta.id}-${meta.run_accession}-${meta.db_name}" } publishDir = [ path: { "${params.outdir}/kraken2/${meta.db_name}/" }, mode: params.publish_dir_mode, @@ -305,7 +361,7 @@ process { withName: BRACKEN_BRACKEN { errorStrategy = 'ignore' - ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } + ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}.bracken" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}.bracken" } publishDir = [ path: { "${params.outdir}/bracken/${meta.db_name}/" }, mode: params.publish_dir_mode, @@ -318,7 +374,7 @@ process { publishDir = [ path: { "${params.outdir}/bracken/" }, mode: params.publish_dir_mode, - pattern: '*.{txt}' + pattern: '*.txt' ] } diff --git a/modules.json b/modules.json index a3017f7..7eb15e3 100644 --- a/modules.json +++ b/modules.json @@ -73,7 +73,8 @@ "falco": { "branch": "master", "git_sha": "fc959214036403ad83efe7a41d43d0606c445cda", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/falco/falco.diff" }, "fastp": { "branch": "master", diff --git a/modules/nf-core/falco/falco.diff b/modules/nf-core/falco/falco.diff new file mode 100644 index 0000000..4c726b9 --- /dev/null +++ b/modules/nf-core/falco/falco.diff @@ -0,0 +1,16 @@ +Changes in module 'nf-core/falco' +--- modules/nf-core/falco/main.nf ++++ modules/nf-core/falco/main.nf +@@ -33,7 +33,9 @@ + """ + } else { + """ +- falco $args --threads $task.cpus ${reads} ++ [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz ++ [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz ++ falco $args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + +************************************************************ diff --git a/modules/nf-core/falco/main.nf b/modules/nf-core/falco/main.nf index 1688162..b279c57 100644 --- a/modules/nf-core/falco/main.nf +++ b/modules/nf-core/falco/main.nf @@ -33,7 +33,9 @@ process FALCO { """ } else { """ - falco $args --threads $task.cpus ${reads} + [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz + [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz + falco $args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz cat <<-END_VERSIONS > versions.yml "${task.process}":