diff --git a/CHANGELOG.md b/CHANGELOG.md index ded8856651..5422ec5614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#454](https://github.com/nf-core/sarek/pull/454) - Input is optional (can actually be found automatically by `Sarek` if previously run) - [#463](https://github.com/nf-core/sarek/pull/463), [#468](https://github.com/nf-core/sarek/pull/468) - Fix `nf-core lint` - [#513](https://github.com/nf-core/sarek/pull/513), [#527](https://github.com/nf-core/sarek/pull/527) - CNV is back +- [#529](https://github.com/nf-core/sarek/pull/529) - Do not save `versions.yml` files ### Deprecated diff --git a/conf/modules.config b/conf/modules.config index 37a66ee735..e622d76c50 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -199,17 +199,17 @@ process { [ path: { "${params.outdir}/reports/trimgalore/${meta.id}/fastqc" }, mode: params.publish_dir_mode, - pattern: "*.{html,zip}" + pattern: "*{html,zip}" ], [ path: { "${params.outdir}/trimgalore/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.fq.gz" + pattern: "*fq.gz" ], [ path: { "${params.outdir}/reports/trimgalore/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.txt" + pattern: "*txt" ] ] } @@ -244,8 +244,9 @@ process { ext.when = { params.split_fastq > 1 } publishDir = [ enabled: params.save_split_fastqs, + mode: params.publish_dir_mode, path: { "${params.outdir}/preprocessing/${meta.sample}/seqkit" }, - mode: params.publish_dir_mode + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -273,7 +274,7 @@ process { publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/preprocessing/${meta.id}/mapped" }, - pattern: "*.bam", + pattern: "*bam", saveAs: { (params.save_bam_mapped || (params.skip_tools && params.skip_tools.contains('markduplicates'))) && (meta.size * meta.numLanes == 1) ? it : null } ] } @@ -293,24 +294,21 @@ process { // MARKDUPLICATES - withName: 'GATK4_ESTIMATELIBRARYCOMPLEXITY' { + withName: 'GATK4_ESTIMATELIBRARYCOMPLEXITY|GATK4_MARKDUPLICATES' { ext.prefix = { "${meta.id}.md" } - ext.when = { !(params.skip_tools && params.skip_tools.contains('markduplicates_report')) } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/preprocessing/${meta.id}/markduplicates" }, - pattern: "*metrics" + path: { "${params.outdir}/reports/${meta.id}/markduplicates" }, + pattern: "metrics" ] } + withName: 'GATK4_ESTIMATELIBRARYCOMPLEXITY' { + ext.when = { !(params.skip_tools && params.skip_tools.contains('markduplicates_report')) } + } + withName: 'GATK4_MARKDUPLICATES' { ext.args = '-REMOVE_DUPLICATES false -VALIDATION_STRINGENCY LENIENT --CREATE_INDEX true' - ext.prefix = { "${meta.id}.md" } - publishDir = [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/reports/${meta.id}/markduplicates" }, - pattern: "*metrics" - ] } withName: 'GATK4_MARKDUPLICATES_SPARK' { @@ -351,7 +349,7 @@ process { publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/preprocessing/${meta.id}/recal_table" }, - pattern: "*.table" + pattern: "*table" ] } @@ -398,7 +396,7 @@ process { [ path: { "${params.outdir}/reports/fastqc/${meta.id}" }, mode: params.publish_dir_mode, - pattern: "*.{html,zip}" + pattern: "*{html,zip}" ] ] } @@ -409,7 +407,8 @@ process { ext.when = { !(params.skip_tools && params.skip_tools.contains('bamqc')) } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/reports/qualimap/${meta.id}" } + path: { "${params.outdir}/reports/qualimap/${meta.id}" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -417,7 +416,8 @@ process { ext.when = { !(params.skip_tools && params.skip_tools.contains('samtools')) } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/reports/samtools_stats/${meta.id}" } + path: { "${params.outdir}/reports/samtools_stats/${meta.id}" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -425,7 +425,8 @@ process { ext.when = { !(params.skip_tools && params.skip_tools.contains('deeptools')) } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/reports/deeptools/${meta.id}" } + path: { "${params.outdir}/reports/deeptools/${meta.id}" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -435,7 +436,8 @@ process { ext.when = { !(params.skip_tools && params.skip_tools.contains('bamqc')) } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/reports/qualimap/${meta.id}" } + path: { "${params.outdir}/reports/qualimap/${meta.id}" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -443,7 +445,8 @@ process { ext.when = { !(params.skip_tools && params.skip_tools.contains('samtools')) } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/reports/samtools_stats/${meta.id}" } + path: { "${params.outdir}/reports/samtools_stats/${meta.id}" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } } @@ -502,7 +505,8 @@ process{ publishDir = [ enabled: !params.no_intervals, mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" } + path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: 'FREEBAYES' { @@ -511,13 +515,15 @@ process{ publishDir = [ enabled: params.no_intervals, mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" } + path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName : 'TABIX_VC_FREEBAYES' { publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" } + path: { "${params.outdir}/variant_calling/${meta.id}/freebayes" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -527,7 +533,8 @@ process{ publishDir = [ enabled: !params.no_intervals, mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/haplotypecaller" } + path: { "${params.outdir}/variant_calling/${meta.id}/haplotypecaller" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: 'HAPLOTYPECALLER' { @@ -630,7 +637,7 @@ process{ enabled: !params.no_intervals, mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" }, - pattern: "*{mpileup}" + pattern: "*mpileup" ] } @@ -680,7 +687,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" }, - pattern: "*{.bed}" + pattern: "*bed" ] } @@ -689,7 +696,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" }, - pattern: "*{.circos.txt}" + pattern: "*circos.txt" ] } @@ -698,7 +705,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" }, - pattern: "*{png}" + pattern: "*png" ] } @@ -708,7 +715,7 @@ process{ enabled: params.no_intervals, mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/controlfreec" }, - pattern: "*{mpileup}" + pattern: "*mpileup" ] } @@ -721,7 +728,8 @@ process{ withName: 'GATK4_CALCULATECONTAMINATION' { publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" } + path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -738,7 +746,8 @@ process{ ext.prefix = {"${meta.id}.filtered"} publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" } + path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -748,7 +757,8 @@ process{ publishDir = [ enabled: !params.no_intervals, mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" } + path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -756,7 +766,8 @@ process{ publishDir = [ enabled: params.no_intervals, mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" } + path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -764,7 +775,8 @@ process{ ext.prefix = { "${meta.id}.vcf.gz" } publishDir = [ mode: params.publish_dir_mode, - path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" } + path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -865,6 +877,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -874,8 +887,9 @@ process{ enabled: !params.no_intervals, mode: params.publish_dir_mode, //use ${meta.tumor_id}_vs_${meta_normal_id} to publish in the same directory as the remainders of the - //somatic output whilst keeping the filename prefix identifieable for status type - path: { "${params.outdir}/variant_calling/${meta.tumor_id}_vs_${meta.normal_id}/mutect2" } + //somatic output whilst keeping the filename prefix identifiable for status type + path: { "${params.outdir}/variant_calling/${meta.tumor_id}_vs_${meta.normal_id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -884,6 +898,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -892,6 +907,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/${meta.id}/msisensorpro" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -910,6 +926,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/reports/bcftools" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } @@ -919,6 +936,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/reports/vcftools" }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] }