diff --git a/conf/modules.config b/conf/modules.config index b0e5d61..5b9a815 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -133,20 +133,34 @@ process { } withName: BOWTIE2_BUILD { - ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ path: { "${params.outdir}/bowtie2/build" }, mode: params.publish_dir_mode, - pattern: '*.bt2' + enabled: params.save_hostremoval_index, + pattern: 'bowtie2' ] } withName: BOWTIE2_ALIGN { ext.prefix = { "${meta.id}_${meta.run_accession}" } publishDir = [ + [ path: { "${params.outdir}/bowtie2/align" }, mode: params.publish_dir_mode, - pattern: '*.{fastq.gz,bam}' + 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_unmapped, + pattern: '*.fastq.gz' + ] ] } diff --git a/nextflow.config b/nextflow.config index fce21ad..43aaae8 100644 --- a/nextflow.config +++ b/nextflow.config @@ -82,8 +82,11 @@ params { // Host Removal perform_shortread_hostremoval = false - shortread_hostremoval_reference = null - shortread_hostremoval_index = null + shortread_hostremoval_reference = null + shortread_hostremoval_index = null + save_hostremoval_index = false + save_hostremoval_mapped = false + save_hostremoval_unmapped = false // MALT run_malt = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 3d3ad96..2181cce 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -370,6 +370,15 @@ "type": "string", "default": "None" }, + "save_hostremoval_index": { + "type": "boolean" + }, + "save_hostremoval_mapped": { + "type": "boolean" + }, + "save_hostremoval_unmapped": { + "type": "boolean" + }, "run_kaiju": { "type": "boolean" },