diff --git a/conf/modules.config b/conf/modules.config index cd02ec98..1fe1acbe 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -32,149 +32,151 @@ process { ///////////// // FASTQC -if (!params.skip_qc && !params.skip_fastqc) { - process { - withName: '.*:FASTQC_NANOPLOT_PRE_TRIM:FASTQC' { - ext.prefix = { "${meta.id}.raw" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/fastqc/pre_trim" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } +process { + withName: '.*:FASTQC_NANOPLOT_PRE_TRIM:FASTQC' { + ext.prefix = { "${meta.id}.raw" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/fastqc/pre_trim" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_fastqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - } + } +} - if (!params.skip_trimming) { - withName: '.*:FASTQC_NANOPLOT_POST_TRIM:FASTQC' { - ext.prefix = { "${meta.id}.trimmed" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/fastqc/post_trim" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: '.*:FASTQC_NANOPLOT_POST_TRIM:FASTQC' { + ext.prefix = { "${meta.id}.trimmed" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/fastqc/post_trim" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_fastqc && !params.skip_trimming }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} - withName: '.*:FASTQC_NANOPLOT_POST_EXTRACT:FASTQC' { - ext.prefix = { "${meta.id}.extracted" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/fastqc/post_extract" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } +process { + withName: '.*:FASTQC_NANOPLOT_POST_EXTRACT:FASTQC' { + ext.prefix = { "${meta.id}.extracted" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/fastqc/post_extract" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_fastqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - } } } // NANOPLOT -if (!params.skip_qc && !params.skip_nanoplot) { - process { - withName: '.*:FASTQC_NANOPLOT_PRE_TRIM:NANOPLOT' { - ext.prefix = { "${meta.id}.raw" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/nanoplot/pre_trim/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } +process { + withName: '.*:FASTQC_NANOPLOT_PRE_TRIM:NANOPLOT' { + ext.prefix = { "${meta.id}.raw" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/nanoplot/pre_trim/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_nanoplot }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - } + } +} - if (!params.skip_trimming) { - withName: '.*:FASTQC_NANOPLOT_POST_TRIM:NANOPLOT' { - ext.prefix = { "${meta.id}.trimmed" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/nanoplot/post_trim/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: '.*:FASTQC_NANOPLOT_POST_TRIM:NANOPLOT' { + ext.prefix = { "${meta.id}.trimmed" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/nanoplot/post_trim/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_nanoplot && !params.skip_trimming }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} - withName: '.*:FASTQC_NANOPLOT_POST_EXTRACT:NANOPLOT' { - ext.prefix = { "${meta.id}.extracted" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/nanoplot/post_extract/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } +process { + withName: '.*:FASTQC_NANOPLOT_POST_EXTRACT:NANOPLOT' { + ext.prefix = { "${meta.id}.extracted" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/nanoplot/post_extract/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_nanoplot }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - } } } // NANOCOMP -if (!params.skip_qc && !params.skip_fastq_nanocomp) { - process { - withName: '.*:NANOCOMP_FASTQ' { - publishDir = [ - path: { "${params.outdir}/batch_qcs/nanocomp/fastq" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*:NANOCOMP_FASTQ' { + publishDir = [ + path: { "${params.outdir}/batch_qcs/nanocomp/fastq" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_fastq_nanocomp }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } // TOULLIGQC -if (!params.skip_qc && !params.skip_toulligqc) { - process { - withName: '.*:FASTQC_NANOPLOT_PRE_TRIM:TOULLIGQC' { - ext.prefix = { "${meta.id}.raw_" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/toulligqc/pre_trim/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } +process { + withName: '.*:FASTQC_NANOPLOT_PRE_TRIM:TOULLIGQC' { + ext.prefix = { "${meta.id}.raw_" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/toulligqc/pre_trim/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_toulligqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - } + } +} - if (!params.skip_trimming) { - withName: '.*:FASTQC_NANOPLOT_POST_TRIM:TOULLIGQC' { - ext.prefix = { "${meta.id}.trimmed_" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/toulligqc/post_trim/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: '.*:FASTQC_NANOPLOT_POST_TRIM:TOULLIGQC' { + ext.prefix = { "${meta.id}.trimmed_" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/toulligqc/post_trim/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_toulligqc && !params.skip_trimming }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} - withName: '.*:FASTQC_NANOPLOT_POST_EXTRACT:TOULLIGQC' { - ext.prefix = { "${meta.id}.extracted_" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/toulligqc/post_extract/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } +process { + withName: '.*:FASTQC_NANOPLOT_POST_EXTRACT:TOULLIGQC' { + ext.prefix = { "${meta.id}.extracted_" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/toulligqc/post_extract/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_toulligqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - } } } // SAMTOOLS -if (!params.skip_qc){ - - process { - withName:'.*:BAM_SORT_STATS_SAMTOOLS_CORRECTED:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.corrected" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/qc/samtools/corrected" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName:'.*:BAM_SORT_STATS_SAMTOOLS_CORRECTED:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.corrected" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/qc/samtools/corrected" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } - } - // READ COUNTS -if (!params.skip_qc) { - - process { - withName:'.*:READ_COUNTS' { - publishDir = [ - path: { "${params.outdir}/batch_qcs/read_counts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName:'.*:READ_COUNTS' { + publishDir = [ + path: { "${params.outdir}/batch_qcs/read_counts" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } @@ -238,87 +240,77 @@ process { } } -if (params.split_amount > 0) { - process { - withName: '.*:SPLIT_SEQ_BC_FASTQ' { - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:SPLIT_SEQ_BC_FASTQ' { + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*:SPLIT_FILE_BC_CSV' { - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:SPLIT_FILE_BC_CSV' { + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*:CAT_CAT_PREEXTRACT' { - ext.prefix = { "${meta.id}_filtered.fastq" } - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:CAT_CAT_PREEXTRACT' { + ext.prefix = { "${meta.id}_filtered.fastq" } + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*:CAT_CAT_BARCODE' { - ext.prefix = { "${meta.id}.corrected_bc_umi.tsv" } - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:CAT_CAT_BARCODE' { + ext.prefix = { "${meta.id}.corrected_bc_umi.tsv" } + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*:PIGZ_COMPRESS' { - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:PIGZ_COMPRESS' { + publishDir = [ + enabled: false + ] } } // FASTQ TRIMMING -if (!params.skip_trimming) { - - if (params.split_amount > 0){ - process { - withName: '.*:SPLIT_SEQ' { - publishDir = [ - enabled: false - ] - } - } - +process { + withName: '.*:SPLIT_SEQ' { + publishDir = [ + enabled: false + ] + } +} - process { - withName: '.*:CAT_CAT' { - publishDir = [ - enabled: false - ] - } - } +process { + withName: '.*:CAT_CAT' { + publishDir = [ + enabled: false + ] } +} - // CHOPPER - if ( !params.skip_trimming ){ - process { - withName:'.*:CHOPPER' { - ext.args = { - [ - params.min_length ? "--minlength ${params.min_length}" : "", - params.min_q_score ? "--quality ${params.min_q_score}" : "" - ].join(' ').trim() - } - publishDir = [ - enabled: false - ] - } +// CHOPPER +process { + withName:'.*:CHOPPER' { + ext.args = { + [ + params.min_length ? "--minlength ${params.min_length}" : "", + params.min_q_score ? "--quality ${params.min_q_score}" : "" + ].join(' ').trim() } + publishDir = [ + enabled: false + ] } } @@ -428,40 +420,40 @@ process { ///////////////////// // MINIMAP2_INDEX -if (!params.skip_save_minimap2_index) { - process { - withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:MINIMAP2_INDEX' { - ext.args = { - [ - "-ax splice", - params.stranded == "forward" ? "-uf" : params.stranded == "reverse" ? "-ub" : "-un", - "-k${params.kmer_size}", - params.save_genome_secondary_alignment == false ? "--secondary=no " : "--secondary=yes " - ].join(' ').trim() - } - publishDir = [ - path: { "${params.outdir}/references/genome/minimap_index" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +process { + withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:MINIMAP2_INDEX' { + ext.args = { + [ + "-ax splice", + params.stranded == "forward" ? "-uf" : params.stranded == "reverse" ? "-ub" : "-un", + "-k${params.kmer_size}", + params.save_genome_secondary_alignment == false ? "--secondary=no " : "--secondary=yes " + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/references/genome/minimap_index" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_save_minimap2_index }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } - process { - withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:MINIMAP2_INDEX' { - ext.args = { - [ - "-ax splice", - params.stranded == "forward" ? "-uf" : params.stranded == "reverse" ? "-ub" : "-un", - "-k${params.kmer_size}", - params.save_transcript_secondary_alignment == false ? "--secondary=no " : "--secondary=yes " - ].join(' ').trim() - } - publishDir = [ - path: { "${params.outdir}/references/transcriptome/minimap_index" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +} +process { + withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:MINIMAP2_INDEX' { + ext.args = { + [ + "-ax splice", + params.stranded == "forward" ? "-uf" : params.stranded == "reverse" ? "-ub" : "-un", + "-k${params.kmer_size}", + params.save_transcript_secondary_alignment == false ? "--secondary=no " : "--secondary=yes " + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/references/transcriptome/minimap_index" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_save_minimap2_index }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } @@ -604,99 +596,100 @@ process { } } -if (!params.skip_qc) { - - // SAMTOOLS FLAGSTAT/STAT/IDXSTAT - process { - withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.genome.minimap" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/qc/samtools/minimap" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +// SAMTOOLS FLAGSTAT/STAT/IDXSTAT +process { + withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.genome.minimap" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/qc/samtools/minimap" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.transcriptome.minimap" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/transcriptome/qc/samtools/minimap" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.transcriptome.minimap" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/transcriptome/qc/samtools/minimap" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS_FILTERED:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.genome.mapped_only" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/qc/samtools/mapped_only" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS_FILTERED:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.genome.mapped_only" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/qc/samtools/mapped_only" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS_FILTERED:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.transcriptome.mapped_only" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/transcriptome/qc/samtools/mapped_only" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:ALIGN_LONGREADS:BAM_SORT_STATS_SAMTOOLS_FILTERED:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.transcriptome.mapped_only" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/transcriptome/qc/samtools/mapped_only" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - // RSEQC - if (!params.skip_rseqc) { - process { - withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:RSEQC_READDISTRIBUTION' { - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/qc/rseqc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +// RSEQC +process { + withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:RSEQC_READDISTRIBUTION' { + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/qc/rseqc" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_rseqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} - process { - withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:RSEQC_READDISTRIBUTION' { - publishDir = [ - path: { "${params.outdir}/${meta.id}/transcriptome/qc/rseqc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName:'.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:RSEQC_READDISTRIBUTION' { + publishDir = [ + path: { "${params.outdir}/${meta.id}/transcriptome/qc/rseqc" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_rseqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - // NANOCOMP - if (!params.skip_bam_nanocomp) { - process { - withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*:ALIGN_LONGREADS:NANOCOMP' { - ext.prefix = { "${meta.id}.genome" } - publishDir = [ - path: { "${params.outdir}/batch_qcs/genome/nanocomp/bam" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +// NANOCOMP +process { + withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*:ALIGN_LONGREADS:NANOCOMP' { + ext.prefix = { "${meta.id}.genome" } + publishDir = [ + path: { "${params.outdir}/batch_qcs/genome/nanocomp/bam" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_bam_nanocomp }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} - process { - withName: '.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:ALIGN_LONGREADS:NANOCOMP' { - ext.prefix = { "${meta.id}.transcriptome" } - publishDir = [ - path: { "${params.outdir}/batch_qcs/transcriptome/nanocomp/bam" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: '.*PROCESS_LONGREAD_SCRNA_TRANSCRIPT.*:ALIGN_LONGREADS:NANOCOMP' { + ext.prefix = { "${meta.id}.transcriptome" } + publishDir = [ + path: { "${params.outdir}/batch_qcs/transcriptome/nanocomp/bam" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_bam_nanocomp }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } @@ -717,16 +710,15 @@ process { } } -if (!params.skip_dedup) { - process { - withName:'.*:BAM_SORT_STATS_SAMTOOLS_MERGED:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.merged.sorted" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/bam/dedup" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName:'.*:BAM_SORT_STATS_SAMTOOLS_MERGED:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.merged.sorted" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/bam/dedup" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_dedup }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } @@ -862,88 +854,88 @@ process { } } -if (!params.skip_dedup){ - process { - withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*:UMITOOLS_DEDUP' { - ext.prefix = { "${meta.id}.genome.umi_dedup" } - ext.args = { - [ - '--per-cell' - ].join(' ').trim() - } - publishDir = [ - enabled: false - ] +process { + withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*:UMITOOLS_DEDUP' { + ext.prefix = { "${meta.id}.genome.umi_dedup" } + ext.args = { + [ + '--per-cell' + ].join(' ').trim() } + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*:PICARD_MARKDUPLICATES' { - ext.prefix = { "${meta.id}.genome.dedup" } - ext.args = { - [ - "--BARCODE_TAG 'CB'", - "--TAG_DUPLICATE_SET_MEMBERS true", - "--TAGGING_POLICY 'All'" - ].join(' ').trim() - } - publishDir = [ - enabled: false - ] +process { + withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*:PICARD_MARKDUPLICATES' { + ext.prefix = { "${meta.id}.genome.dedup" } + ext.args = { + [ + "--BARCODE_TAG 'CB'", + "--TAG_DUPLICATE_SET_MEMBERS true", + "--TAGGING_POLICY 'All'" + ].join(' ').trim() } + publishDir = [ + enabled: false + ] } +} - process { - withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:SAMTOOLS_INDEX_DEDUP' { - ext.prefix = { "${meta.id}.genome.dedup.sorted" } - publishDir = [ - enabled: false - ] - } +process { + withName:'.*PROCESS_LONGREAD_SCRNA_GENOME.*:SAMTOOLS_INDEX_DEDUP' { + ext.prefix = { "${meta.id}.genome.dedup.sorted" } + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*:PROCESS_LONGREAD_SCRNA_GENOME:DEDUP_UMIS:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.sorted" } - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:PROCESS_LONGREAD_SCRNA_GENOME:DEDUP_UMIS:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.sorted" } + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*DEDUP_UMIS:SAMTOOLS_MERGE' { - ext.prefix = { "${meta.id}.genome.dedup" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/bam/dedup" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*DEDUP_UMIS:SAMTOOLS_MERGE' { + ext.prefix = { "${meta.id}.genome.dedup" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/bam/dedup" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_dedup }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*DEDUP_UMIS:SAMTOOLS_INDEX_MERGED' { - ext.prefix = { "${meta.id}.genome.dedup" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/bam/dedup" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*DEDUP_UMIS:SAMTOOLS_INDEX_MERGED' { + ext.prefix = { "${meta.id}.genome.dedup" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/bam/dedup" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_dedup }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*DEDUP_UMIS:BAM_STATS_SAMTOOLS.*' { - ext.prefix = { "${meta.id}.genome.${params.dedup_tool}_dedup" } - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/qc/samtools/dedup" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*PROCESS_LONGREAD_SCRNA_GENOME.*DEDUP_UMIS:BAM_STATS_SAMTOOLS.*' { + ext.prefix = { "${meta.id}.genome.${params.dedup_tool}_dedup" } + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/qc/samtools/dedup" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_dedup }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } - } ///////////////////////////// @@ -1039,43 +1031,43 @@ process { } } -if (!params.skip_qc && !params.skip_seurat) { - process { - withName: '.*QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_GENE:SEURAT' { - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/qc/seurat_isoquant/gene" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_GENE:SEURAT' { + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/qc/seurat_isoquant/gene" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_seurat }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName: '.*QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_TRANSCRIPT:SEURAT' { - publishDir = [ - path: { "${params.outdir}/${meta.id}/genome/qc/seurat_isoquant/transcript" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_TRANSCRIPT:SEURAT' { + publishDir = [ + path: { "${params.outdir}/${meta.id}/genome/qc/seurat_isoquant/transcript" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_seurat }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName: '.*:QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_GENE:COMBINE_SEURAT_STATS' { - ext.args = "-o isoquant_gene.tsv -f gene" - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_GENE:COMBINE_SEURAT_STATS' { + ext.args = "-o isoquant_gene.tsv -f gene" + publishDir = [ + enabled: false + ] } +} - process { - withName: '.*:QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_TRANSCRIPT:COMBINE_SEURAT_STATS' { - ext.args = "-o isoquant_transcript.tsv -f transcript" - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:QUANTIFY_SCRNA_ISOQUANT:QC_SCRNA_TRANSCRIPT:COMBINE_SEURAT_STATS' { + ext.args = "-o isoquant_transcript.tsv -f transcript" + publishDir = [ + enabled: false + ] } } @@ -1112,24 +1104,23 @@ process { } } -if (!params.skip_qc && !params.skip_seurat) { - process { - withName: '.*QUANTIFY_SCRNA_OARFISH:QC_SCRNA:SEURAT' { - publishDir = [ - path: { "${params.outdir}/${meta.id}/transcriptome/qc/seurat_oarfish/" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*QUANTIFY_SCRNA_OARFISH:QC_SCRNA:SEURAT' { + publishDir = [ + path: { "${params.outdir}/${meta.id}/transcriptome/qc/seurat_oarfish/" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_seurat }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName: '.*:QUANTIFY_SCRNA_OARFISH:QC_SCRNA:COMBINE_SEURAT_STATS' { - ext.args = "-o oarfish_transcript.tsv -f transcript" - publishDir = [ - enabled: false - ] - } +process { + withName: '.*:QUANTIFY_SCRNA_OARFISH:QC_SCRNA:COMBINE_SEURAT_STATS' { + ext.args = "-o oarfish_transcript.tsv -f transcript" + publishDir = [ + enabled: false + ] } } @@ -1137,26 +1128,26 @@ if (!params.skip_qc && !params.skip_seurat) { // MULTIQC // ///////////// -if (!params.skip_qc && !params.skip_multiqc) { - process { - withName: '.*:MULTIQC_FINALQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } - publishDir = [ - path: { "${params.outdir}/batch_qcs/multiqc/final_qc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*:MULTIQC_FINALQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + publishDir = [ + path: { "${params.outdir}/batch_qcs/multiqc/final_qc" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_multiqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } +} - process { - withName: '.*:MULTIQC_RAWQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } - publishDir = [ - path: { "${params.outdir}/batch_qcs/multiqc/raw_qc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*:MULTIQC_RAWQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + publishDir = [ + path: { "${params.outdir}/batch_qcs/multiqc/raw_qc" }, + mode: params.publish_dir_mode, + enabled: { !params.skip_qc && !params.skip_multiqc }, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/modules.json b/modules.json index 349815ff..e889bf4f 100644 --- a/modules.json +++ b/modules.json @@ -7,225 +7,185 @@ "nf-core": { "bamtools/split": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", - "installed_by": ["modules"] + "git_sha": "8c8ee20d5b87647b24df0c95296b2a9854a139aa", + "installed_by": [ + "modules" + ] }, "cat/cat": { "branch": "master", - "git_sha": "9437e6053dccf4aafa022bfd6e7e9de67e625af8", - "installed_by": ["modules"] + "git_sha": "7ed72ef972290b93d0bdd7c60ff00a693250f77a", + "installed_by": [ + "modules" + ] }, "cat/fastq": { "branch": "master", - "git_sha": "0997b47c93c06b49aa7b3fefda87e728312cf2ca", - "installed_by": ["modules"], + "git_sha": "5d28ea7cfaebcfae6f74d1067ea766d8ff19dff3", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/cat/fastq/cat-fastq.diff" }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "de45447d060b8c8b98575bc637a4a575fd0638e1", - "installed_by": ["modules"] + "git_sha": "ad65d06c959cff1da9e94c4a972deaf7430931fa", + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", - "git_sha": "dc94b6ee04a05ddb9f7ae050712ff30a13149164", - "installed_by": ["modules"] + "git_sha": "3009f27c4e4b6e99da4eeebe82799e13924a4a1f", + "installed_by": [ + "modules" + ] }, "minimap2/align": { "branch": "master", - "git_sha": "a33ef9475558c6b8da08c5f522ddaca1ec810306", - "installed_by": ["modules"] + "git_sha": "5c9f8d5b7671237c906abadc9ff732b301ca15ca", + "installed_by": [ + "modules" + ] }, "minimap2/index": { "branch": "master", - "git_sha": "72e277acfd9e61a9f1368eafb4a9e83f5bcaa9f5", - "installed_by": ["modules"], + "git_sha": "14980f759266eec42dac401fcafeb83d6c957b41", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/minimap2/index/minimap2-index.diff" }, "multiqc": { "branch": "master", - "git_sha": "f0719ae309075ae4a291533883847c3f7c441dad", - "installed_by": ["modules"] + "git_sha": "2c73cc8fa92cf48de3da0b643fdf357a8a290b36", + "installed_by": [ + "modules" + ] }, "nanocomp": { "branch": "master", - "git_sha": "f0c766af7e897ecf52c13f5424426f06d221194b", - "installed_by": ["modules"], + "git_sha": "2956d489fac13be1b7c8d54effd766a1965cd3de", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/nanocomp/nanocomp.diff" }, "nanoplot": { "branch": "master", - "git_sha": "a31407dfaf0cb0d04768d5cb439fc6f4523a6981", - "installed_by": ["modules"], + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/nanoplot/nanoplot.diff" }, "picard/markduplicates": { "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": ["modules"] + "git_sha": "a631e12055f6c23ba2c942d3902b3ed1b9eed859", + "installed_by": [ + "modules" + ] }, "pigz/compress": { "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", - "installed_by": ["modules"] + "git_sha": "c908ccaf0a5c802b6f8e814d8c5cf85da2364222", + "installed_by": [ + "modules" + ] }, "pigz/uncompress": { "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", - "installed_by": ["modules"], + "git_sha": "f84336b7fa91a65aa61d215b8c109fbb8e4b4ac6", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/pigz/uncompress/pigz-uncompress.diff" }, "rseqc/readdistribution": { "branch": "master", - "git_sha": "6c7d8f1d6247655e4bc4d97f37b68b2461f645f6", - "installed_by": ["modules"] + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", + "installed_by": [ + "modules" + ] }, "samtools/faidx": { "branch": "master", - "git_sha": "aeb02a39d4c463598bfdcb2d964dbb7acbcf1298", - "installed_by": ["modules"] + "git_sha": "b2e78932ef01165fd85829513eaca29eff8e640a", + "installed_by": [ + "modules" + ] }, "samtools/flagstat": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_stats_samtools"] + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/idxstats": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_stats_samtools"] + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/index": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_sort_stats_samtools"] + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", + "installed_by": [ + "bam_sort_stats_samtools" + ] }, "samtools/merge": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["modules"] + "git_sha": "440edf75d8782913115a7b72a88392a227f72cc1", + "installed_by": [ + "modules" + ] }, "samtools/sort": { "branch": "master", - "git_sha": "4352dbdb09ec40db71e9b172b97a01dcf5622c26", - "installed_by": ["bam_sort_stats_samtools"] + "git_sha": "5cb9a8694da0a0e550921636bb60bc8c56445fd7", + "installed_by": [ + "bam_sort_stats_samtools" + ] }, "samtools/stats": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_stats_samtools"] + "git_sha": "fe93fde0845f907fc91ad7cc7d797930408824df", + "installed_by": [ + "bam_stats_samtools" + ] }, "samtools/view": { "branch": "master", - "git_sha": "0bd7d2333a88483aa0476acea172e9f5f6dd83bb", - "installed_by": ["modules"], + "git_sha": "b2e78932ef01165fd85829513eaca29eff8e640a", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/view/samtools-view.diff" }, "toulligqc": { "branch": "master", - "git_sha": "061a322293b3487e53f044304710e54cbf657717", - "installed_by": ["modules"], + "git_sha": "d9137377f4dd6246242829772eb1949b96de1ef0", + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/toulligqc/toulligqc.diff" }, "umitools/dedup": { "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "git_sha": "bd6d730b3f32742f402189113ba9480006a3350f", + "installed_by": [ + "modules" + ] }, "unzipfiles": { "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] - }, - "nanocomp": { - "branch": "master", - "git_sha": "f0c766af7e897ecf52c13f5424426f06d221194b", - "installed_by": ["modules"], - "patch": "modules/nf-core/nanocomp/nanocomp.diff" - }, - "nanoplot": { - "branch": "master", - "git_sha": "a31407dfaf0cb0d04768d5cb439fc6f4523a6981", - "installed_by": ["modules"], - "patch": "modules/nf-core/nanoplot/nanoplot.diff" - }, - "picard/markduplicates": { - "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": ["modules"] - }, - "pigz/compress": { - "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", - "installed_by": ["modules"] - }, - "pigz/uncompress": { - "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", - "installed_by": ["modules"], - "patch": "modules/nf-core/pigz/uncompress/pigz-uncompress.diff" - }, - "rseqc/readdistribution": { - "branch": "master", - "git_sha": "6c7d8f1d6247655e4bc4d97f37b68b2461f645f6", - "installed_by": ["modules"] - }, - "samtools/faidx": { - "branch": "master", - "git_sha": "aeb02a39d4c463598bfdcb2d964dbb7acbcf1298", - "installed_by": ["modules"] - }, - "samtools/flagstat": { - "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_stats_samtools"] - }, - "samtools/idxstats": { - "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_stats_samtools"] - }, - "samtools/index": { - "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_sort_stats_samtools"] - }, - "samtools/merge": { - "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["modules"] - }, - "samtools/sort": { - "branch": "master", - "git_sha": "4352dbdb09ec40db71e9b172b97a01dcf5622c26", - "installed_by": ["bam_sort_stats_samtools"] - }, - "samtools/stats": { - "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_stats_samtools"] - }, - "samtools/view": { - "branch": "master", - "git_sha": "0bd7d2333a88483aa0476acea172e9f5f6dd83bb", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/view/samtools-view.diff" - }, - "toulligqc": { - "branch": "master", - "git_sha": "061a322293b3487e53f044304710e54cbf657717", - "installed_by": ["modules"], - "patch": "modules/nf-core/toulligqc/toulligqc.diff" - }, - "umitools/dedup": { - "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] - }, - "unzipfiles": { - "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", - "installed_by": ["modules"] + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "installed_by": [ + "modules" + ] } } }, @@ -233,31 +193,41 @@ "nf-core": { "bam_sort_stats_samtools": { "branch": "master", - "git_sha": "4352dbdb09ec40db71e9b172b97a01dcf5622c26", - "installed_by": ["subworkflows"] + "git_sha": "7ac6cbe7c17c2dad685da7f70496c8f48ea48687", + "installed_by": [ + "subworkflows" + ] }, "bam_stats_samtools": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", - "installed_by": ["bam_sort_stats_samtools"] + "git_sha": "7ac6cbe7c17c2dad685da7f70496c8f48ea48687", + "installed_by": [ + "bam_sort_stats_samtools" + ] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "1b89f75f1aa2021ec3360d0deccd0f6e97240551", - "installed_by": ["subworkflows"] + "git_sha": "f0b535b3ae20080f8db03dd5388876ad1ec29d70", + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "4b406a74dc0449c0401ed87d5bfff4252fd277fd", - "installed_by": ["subworkflows"] + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/local/blaze/main.nf b/modules/local/blaze/main.nf index ab03c24a..63e518eb 100644 --- a/modules/local/blaze/main.nf +++ b/modules/local/blaze/main.nf @@ -14,11 +14,11 @@ process BLAZE { path in_whitelist output: - tuple val(meta), path("*.putative_bc.no_header.csv") , emit: putative_bc - tuple val(meta), path("*.whitelist.csv") , emit: whitelist - tuple val(meta), path("*.bc_count.txt") , emit: bc_count - tuple val(meta), path("*.knee_plot.png") , emit: knee_plot - path "versions.yml" , emit: versions + tuple val(meta), path("*.putative_bc.no_header.csv"), emit: putative_bc + tuple val(meta), path("*.whitelist.csv") , emit: whitelist + tuple val(meta), path("*.bc_count.txt") , emit: bc_count + tuple val(meta), path("*.knee_plot.png") , emit: knee_plot + path "versions.yml" , emit: versions_blaze, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/chopper/main.nf b/modules/local/chopper/main.nf index 7fe6f57b..5f3c9bd3 100644 --- a/modules/local/chopper/main.nf +++ b/modules/local/chopper/main.nf @@ -12,7 +12,7 @@ process CHOPPER { output: tuple val(meta), path("*.filtered.fastq.gz"), emit: reads - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_chopper, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/combine_seurat_stats/main.nf b/modules/local/combine_seurat_stats/main.nf index 99369420..269c13bd 100644 --- a/modules/local/combine_seurat_stats/main.nf +++ b/modules/local/combine_seurat_stats/main.nf @@ -11,7 +11,7 @@ process COMBINE_SEURAT_STATS { output: path "*.tsv" , emit: combined_stats - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_combine_seurat_stats, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/correct_barcodes/main.nf b/modules/local/correct_barcodes/main.nf index 65aa370b..85429c99 100644 --- a/modules/local/correct_barcodes/main.nf +++ b/modules/local/correct_barcodes/main.nf @@ -12,7 +12,7 @@ process CORRECT_BARCODES { output: tuple val(meta), path("*.corrected_bc_umi.tsv"), emit: corrected_bc_info - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_correct_barcodes, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/group_transcripts/main.nf b/modules/local/group_transcripts/main.nf index e855ade2..74403c91 100644 --- a/modules/local/group_transcripts/main.nf +++ b/modules/local/group_transcripts/main.nf @@ -9,18 +9,17 @@ process GROUP_TRANSCRIPTS { input: tuple val(meta), path(fasta) - tuple val(meta), path(gtf) + tuple val(meta2), path(gtf) val delimiter output: path "*.transcripts.txt", emit: grouped_transcripts - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_group_transcripts, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def delim_arg = delimiter ? "-d '${delimiter}'" : '' """ diff --git a/modules/local/isoquant/main.nf b/modules/local/isoquant/main.nf index d04aa6c0..c27613ec 100644 --- a/modules/local/isoquant/main.nf +++ b/modules/local/isoquant/main.nf @@ -35,7 +35,7 @@ process ISOQUANT { tuple val(meta), path("*/*/*.extended_annotation.gtf"), emit: extended_gtf, optional: true tuple val(meta), path("*/*/*.transcript_model_grouped_counts.tsv"), emit: grouped_transcript_model_counts, optional: true tuple val(meta), path("*/*/*.transcript_model_grouped_tpm.tsv"), emit: grouped_transcript_model_tpm, optional: true - path "versions.yml", emit: versions + path "versions.yml", emit: versions_isoquant, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/merge_mtx/main.nf b/modules/local/merge_mtx/main.nf index eaa23ef0..eb83fc69 100644 --- a/modules/local/merge_mtx/main.nf +++ b/modules/local/merge_mtx/main.nf @@ -12,13 +12,12 @@ process MERGE_MTX { output: tuple val(meta), path("*.merged.tsv"), emit: merged_mtx - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_merge_mtx, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/oarfish/main.nf b/modules/local/oarfish/main.nf index 4a904f8d..8fbe32b1 100644 --- a/modules/local/oarfish/main.nf +++ b/modules/local/oarfish/main.nf @@ -15,7 +15,7 @@ process OARFISH { tuple val(meta), path("*barcodes.tsv.gz") , emit: barcodes tuple val(meta), path("*matrix.mtx.gz") , emit: mtx tuple val(meta), path("*meta_info.json") , emit: meta_info - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_oarfish, topic: versions when: task.ext.when == null || task.ext.when @@ -55,5 +55,10 @@ process OARFISH { touch ${prefix}.barcodes.tsv.gz touch ${prefix}.matrix.mtx.gz touch ${prefix}.meta_info.json + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + oarfish: \$(oarfish --version | sed 's#oarfish ##g') + END_VERSIONS """ } diff --git a/modules/local/preextract_fastq/main.nf b/modules/local/preextract_fastq/main.nf index e7b70ea7..4844bbe3 100644 --- a/modules/local/preextract_fastq/main.nf +++ b/modules/local/preextract_fastq/main.nf @@ -15,7 +15,7 @@ process PREEXTRACT_FASTQ { output: tuple val(meta), path("*.putative_bc_umi.tsv") , emit: barcode_info tuple val(meta), path("*.extracted.fastq") , emit: extracted_fastq - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_preextract_fastq, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/read_counts/main.nf b/modules/local/read_counts/main.nf index f4a8d0e7..72329aed 100644 --- a/modules/local/read_counts/main.nf +++ b/modules/local/read_counts/main.nf @@ -14,7 +14,7 @@ process READ_COUNTS { output: path "read_counts.csv" , emit: read_counts - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_read_counts, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/seurat/main.nf b/modules/local/seurat/main.nf index 5cbd3d8f..469dc512 100644 --- a/modules/local/seurat/main.nf +++ b/modules/local/seurat/main.nf @@ -15,7 +15,7 @@ process SEURAT { tuple val(meta), path("*.csv"), emit: seurat_stats tuple val(meta), path("*.png"), emit: seurat_qcs tuple val(meta), path("*.rds"), emit: seurat_rds - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_seurat, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/split_bam/main.nf b/modules/local/split_bam/main.nf index 8c97ff34..5f393344 100644 --- a/modules/local/split_bam/main.nf +++ b/modules/local/split_bam/main.nf @@ -12,7 +12,7 @@ process SPLIT_BAM { output: tuple val(meta), path("*.split.bam"), emit: split_bam - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_split_bam, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/split_fasta/main.nf b/modules/local/split_fasta/main.nf index 00d9fbb8..9830a58c 100644 --- a/modules/local/split_fasta/main.nf +++ b/modules/local/split_fasta/main.nf @@ -11,14 +11,12 @@ process SPLIT_FASTA { output: path "*.split.fa" , emit: split_fasta - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_split_fasta, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - """ awk '/^>/{chrom=(split(substr(\$0,2), a, " ")); filename=( a[1] ".split.fa"); print > filename; next}{print >> filename}' $fasta diff --git a/modules/local/split_file/main.nf b/modules/local/split_file/main.nf index d89b035b..9c04b587 100644 --- a/modules/local/split_file/main.nf +++ b/modules/local/split_file/main.nf @@ -14,13 +14,12 @@ process SPLIT_FILE { output: tuple val(meta), path("*$file_ext"), emit: split_files - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_split_file, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/split_gtf/main.nf b/modules/local/split_gtf/main.nf index 1f91ee7c..c589e13b 100644 --- a/modules/local/split_gtf/main.nf +++ b/modules/local/split_gtf/main.nf @@ -11,14 +11,12 @@ process SPLIT_GTF { output: path "*.split.gtf" , emit: split_gtf - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_split_gtf, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - """ grep -v '^#' $gtf | awk -F \$'\\t' '{print > \$1".split.gtf"}' diff --git a/modules/local/split_seq/main.nf b/modules/local/split_seq/main.nf index 725f9e6d..82684667 100644 --- a/modules/local/split_seq/main.nf +++ b/modules/local/split_seq/main.nf @@ -14,7 +14,7 @@ process SPLIT_SEQ { output: tuple val(meta), path("output/*$file_ext"), emit: split_files - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_split_seq, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/tag_barcodes/main.nf b/modules/local/tag_barcodes/main.nf index bbb48401..13b12f59 100644 --- a/modules/local/tag_barcodes/main.nf +++ b/modules/local/tag_barcodes/main.nf @@ -12,13 +12,12 @@ process TAG_BARCODES { output: tuple val(meta), path("*.tagged.bam"), emit: tagged_bam - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_tag_barcodes, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/ucsc_genepredtobed/main.nf b/modules/local/ucsc_genepredtobed/main.nf index 8296076f..95373950 100644 --- a/modules/local/ucsc_genepredtobed/main.nf +++ b/modules/local/ucsc_genepredtobed/main.nf @@ -12,7 +12,7 @@ process UCSC_GENEPREDTOBED { output: path "*.bed" , emit: bed - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_genepredtobed, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/local/ucsc_gtftogenepred/main.nf b/modules/local/ucsc_gtftogenepred/main.nf index 1e0ee26d..f3489f63 100644 --- a/modules/local/ucsc_gtftogenepred/main.nf +++ b/modules/local/ucsc_gtftogenepred/main.nf @@ -12,7 +12,7 @@ process UCSC_GTFTOGENEPRED { output: path "*.genepred" , emit: genepred - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions_gtftogenepred, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/bamtools/split/environment.yml b/modules/nf-core/bamtools/split/environment.yml index 995d25ee..5ee33607 100644 --- a/modules/nf-core/bamtools/split/environment.yml +++ b/modules/nf-core/bamtools/split/environment.yml @@ -1,7 +1,7 @@ -name: bamtools_split +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::bamtools=2.5.2 diff --git a/modules/nf-core/bamtools/split/main.nf b/modules/nf-core/bamtools/split/main.nf index 7c36501c..e26c4688 100644 --- a/modules/nf-core/bamtools/split/main.nf +++ b/modules/nf-core/bamtools/split/main.nf @@ -12,7 +12,7 @@ process BAMTOOLS_SPLIT { output: tuple val(meta), path("*.bam"), emit: bam - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bamtools'), eval("bamtools --version | sed '2!d;s/bamtools //g'"), emit: versions_bamtools, topic: versions when: task.ext.when == null || task.ext.when @@ -20,7 +20,7 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_list = bam.collect{"-in $it"}.join(' ') + def input_list = bam.collect{ bam_file -> "-in ${bam_file}"}.join(' ') """ bamtools \\ merge \\ @@ -29,10 +29,13 @@ process BAMTOOLS_SPLIT { split \\ -stub $prefix \\ $args + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bamtools: \$( bamtools --version | grep -e 'bamtools' | sed 's/^.*bamtools //' ) - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ + touch ${prefix}.split1.bam + touch ${prefix}.unmapped.bam + """ + } diff --git a/modules/nf-core/bamtools/split/meta.yml b/modules/nf-core/bamtools/split/meta.yml index e42242bb..921c7401 100644 --- a/modules/nf-core/bamtools/split/meta.yml +++ b/modules/nf-core/bamtools/split/meta.yml @@ -1,5 +1,6 @@ name: bamtools_split -description: BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files. +description: BamTools provides both a programmer's API and an end-user's toolkit for + handling BAM files. keywords: - bamtools - bamtools/split @@ -13,33 +14,54 @@ tools: documentation: https://github.com/pezmaster31/bamtools/wiki tool_dev_url: http://github.com/pezmaster31/bamtools licence: ["MIT"] + identifier: biotools:bamtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: A list of one or more BAM files to merge and then split - pattern: "*.bam" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: A list of one or more BAM files to merge and then split + pattern: "*.bam" + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bam: - type: file - description: Several Bam files - pattern: "*.bam" + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Several Bam files + pattern: "*.bam" + ontologies: [] + versions_bamtools: + - - "${task.process}": + type: string + description: The name of the process + - bamtools: + type: string + description: The name of the tool + - "bamtools --version | sed '2!d;s/bamtools //g'": + type: eval + description: The expression to obtain the version of the tool authors: - "@sguizard" - "@matthdsm" maintainers: - "@sguizard" - "@matthdsm" +topics: + versions: + - - "${task.process}": + type: string + description: The name of the process + - bamtools: + type: string + description: The name of the tool + - "bamtools --version | sed '2!d;s/bamtools //g'": + type: eval + description: The expression to obtain the version of the tool diff --git a/modules/nf-core/bamtools/split/tests/main.nf.test b/modules/nf-core/bamtools/split/tests/main.nf.test new file mode 100644 index 00000000..9407cb35 --- /dev/null +++ b/modules/nf-core/bamtools/split/tests/main.nf.test @@ -0,0 +1,81 @@ +nextflow_process { + + name "Test Process BAMTOOLS_SPLIT" + script "../main.nf" + process "BAMTOOLS_SPLIT" + + tag "modules" + tag "modules_nfcore" + tag "bamtools" + tag "bamtools/split" + + config "./nextflow.config" + test("single_bam") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("two_bams") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("single_bam - stub") { + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bamtools/split/tests/main.nf.test.snap b/modules/nf-core/bamtools/split/tests/main.nf.test.snap new file mode 100644 index 00000000..0706cb42 --- /dev/null +++ b/modules/nf-core/bamtools/split/tests/main.nf.test.snap @@ -0,0 +1,143 @@ +{ + "two_bams": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "1": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "versions_bamtools": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ] + } + ], + "timestamp": "2026-03-11T18:54:32.314097039", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "single_bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.split1.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.unmapped.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + [ + "test.split1.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.unmapped.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions_bamtools": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ] + } + ], + "timestamp": "2026-03-11T18:54:44.733616549", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "single_bam": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "1": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "versions_bamtools": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ] + } + ], + "timestamp": "2026-03-11T18:54:19.303851983", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/bamtools/split/tests/nextflow.config b/modules/nf-core/bamtools/split/tests/nextflow.config new file mode 100644 index 00000000..abaed7eb --- /dev/null +++ b/modules/nf-core/bamtools/split/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: BAMTOOLS_SPLIT { + ext.args = '-reference' + } +} diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml index 17a04ef2..98511769 100644 --- a/modules/nf-core/cat/cat/environment.yml +++ b/modules/nf-core/cat/cat/environment.yml @@ -1,7 +1,7 @@ -name: cat_cat +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - conda-forge::pigz=2.3.4 + - conda-forge::pigz=2.8 diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf index adbdbd7b..15274c4c 100644 --- a/modules/nf-core/cat/cat/main.nf +++ b/modules/nf-core/cat/cat/main.nf @@ -4,15 +4,15 @@ process CAT_CAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pigz:2.3.4' : - 'biocontainers/pigz:2.3.4' }" + 'https://depot.galaxyproject.org/singularity/pigz:2.8' : + 'biocontainers/pigz:2.8' }" input: tuple val(meta), path(files_in) output: tuple val(meta), path("${prefix}"), emit: file_out - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("pigz"), eval("pigz --version 2>&1 | sed 's/pigz //g'"), topic: versions, emit: versions_cat when: task.ext.when == null || task.ext.when @@ -20,7 +20,7 @@ process CAT_CAT { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def file_list = files_in.collect { it.toString() } + def file_list = files_in.collect { file -> file.toString() } // choose appropriate concatenation tool depending on input and output format @@ -55,7 +55,7 @@ process CAT_CAT { """ stub: - def file_list = files_in.collect { it.toString() } + def file_list = files_in.collect { file -> file.toString() } prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}" if(file_list.contains(prefix.trim())) { error "The name of the input file can't be the same as for the output prefix in the " + @@ -76,4 +76,3 @@ def getFileSuffix(filename) { def match = filename =~ /^.*?((\.\w{1,5})?(\.\w{1,5}\.gz$))/ return match ? match[0][1] : filename.substring(filename.lastIndexOf('.')) } - diff --git a/modules/nf-core/cat/cat/meta.yml b/modules/nf-core/cat/cat/meta.yml index 00a8db0b..36a7359b 100644 --- a/modules/nf-core/cat/cat/meta.yml +++ b/modules/nf-core/cat/cat/meta.yml @@ -9,25 +9,52 @@ tools: description: Just concatenation documentation: https://man7.org/linux/man-pages/man1/cat.1.html licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - files_in: - type: file - description: List of compressed / uncompressed files - pattern: "*" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - files_in: + type: file + description: List of compressed / uncompressed files + pattern: "*" + ontologies: [] output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - file_out: - type: file - description: Concatenated file. Will be gzipped if file_out ends with ".gz" - pattern: "${file_out}" + file_out: + - - meta: + type: map + description: Groovy Map containing sample information + - ${prefix}: + type: file + description: Concatenated file. Will be gzipped if file_out ends with + ".gz" + pattern: "${file_out}" + ontologies: [] + versions_cat: + - - ${task.process}: + type: string + description: The name of the process + - pigz: + type: string + description: The name of the tool + - "pigz --version 2>&1 | sed 's/pigz //g'": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - pigz: + type: string + description: The name of the tool + - "pigz --version 2>&1 | sed 's/pigz //g'": + type: eval + description: The expression to obtain the version of the tool + authors: - "@erikrikarddaniel" - "@FriederikeHanssen" diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test index fcee2d19..030c6649 100644 --- a/modules/nf-core/cat/cat/tests/main.nf.test +++ b/modules/nf-core/cat/cat/tests/main.nf.test @@ -3,16 +3,14 @@ nextflow_process { name "Test Process CAT_CAT" script "../main.nf" process "CAT_CAT" + tag "modules" tag "modules_nfcore" tag "cat" tag "cat/cat" - test("test_cat_name_conflict") { + test("sarscov2 - genome - error: name conflict") { when { - params { - outdir = "${outputDir}" - } process { """ input[0] = @@ -29,16 +27,14 @@ nextflow_process { then { assertAll( { assert !process.success }, - { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") } + { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") }, + { assert snapshot(process.out).match() } ) } } - test("test_cat_unzipped_unzipped") { + test("sarscov2 - [ fasta, sizes ] - unzipped") { when { - params { - outdir = "${outputDir}" - } process { """ input[0] = @@ -61,11 +57,8 @@ nextflow_process { } - test("test_cat_zipped_zipped") { + test("sarscov2 - [ gff3_gz, maf_gz ] - zipped") { when { - params { - outdir = "${outputDir}" - } process { """ input[0] = @@ -80,21 +73,20 @@ nextflow_process { } } then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_zipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_zipped_zipped_size")} + { assert snapshot(process.out).match() + } ) } } - test("test_cat_zipped_unzipped") { - config './nextflow_zipped_unzipped.config' + test("sarscov2 - [ gff3_gz, maf_gz ] - unzipped") { + config './nextflow.config' when { params { - outdir = "${outputDir}" + cat_prefix = "cat.txt" } process { """ @@ -119,11 +111,12 @@ nextflow_process { } - test("test_cat_unzipped_zipped") { - config './nextflow_unzipped_zipped.config' + test("sarscov2 - [ fasta, sizes ] - zipped") { + config './nextflow.config' + when { params { - outdir = "${outputDir}" + cat_prefix = "cat.txt.gz" } process { """ @@ -139,21 +132,44 @@ nextflow_process { } } then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_unzipped_zipped_size")} + { assert snapshot(process.out).match() } ) } } - test("test_cat_one_file_unzipped_zipped") { - config './nextflow_unzipped_zipped.config' + test("sarscov2 - fasta - zipped") { + config './nextflow.config' + when { params { - outdir = "${outputDir}" + cat_prefix = "cat.txt.gz" + } + process { + """ + input[0] = + [ + [ id:'test', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + ] + """ } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - fasta - unzipped - stub") { + options "-stub" + + when { process { """ input[0] = @@ -167,11 +183,9 @@ nextflow_process { } } then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_one_file_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_one_file_unzipped_zipped_size")} + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap index 423571ba..5b4e4cc3 100644 --- a/modules/nf-core/cat/cat/tests/main.nf.test.snap +++ b/modules/nf-core/cat/cat/tests/main.nf.test.snap @@ -1,11 +1,5 @@ { - "test_cat_unzipped_zipped_size": { - "content": [ - 375 - ], - "timestamp": "2023-10-16T14:33:08.049445686" - }, - "test_cat_unzipped_unzipped": { + "sarscov2 - [ gff3_gz, maf_gz ] - unzipped": { "content": [ { "0": [ @@ -14,11 +8,15 @@ "id": "test", "single_end": true }, - "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" ] ], "1": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + [ + "CAT_CAT", + "pigz", + "2.8" + ] ], "file_out": [ [ @@ -26,17 +24,25 @@ "id": "test", "single_end": true }, - "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" ] ], - "versions": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] ] } ], - "timestamp": "2023-10-16T14:32:18.500464399" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T09:08:31.479828" }, - "test_cat_zipped_unzipped": { + "sarscov2 - fasta - unzipped - stub": { "content": [ { "0": [ @@ -45,11 +51,15 @@ "id": "test", "single_end": true }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + [ + "CAT_CAT", + "pigz", + "2.8" + ] ], "file_out": [ [ @@ -57,65 +67,217 @@ "id": "test", "single_end": true }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] ] } ], - "timestamp": "2023-10-16T14:32:49.642741302" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:16:28.118094" }, - "test_cat_zipped_zipped_lines": { + "sarscov2 - [ fasta, sizes ] - zipped": { "content": [ - [ - "MT192765.1\tGenbank\ttranscript\t259\t29667\t.\t+\t.\tID=unknown_transcript_1;geneID=orf1ab;gene_name=orf1ab", - "MT192765.1\tGenbank\tgene\t259\t21548\t.\t+\t.\tParent=unknown_transcript_1", - "MT192765.1\tGenbank\tCDS\t259\t13461\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", - "MT192765.1\tGenbank\tCDS\t13461\t21548\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", - "MT192765.1\tGenbank\tCDS\t21556\t25377\t.\t+\t0\tParent=unknown_transcript_1;gbkey=CDS;gene=S;note=\"structural protein\";product=\"surface glycoprotein\";protein_id=QIK50427.1", - "MT192765.1\tGenbank\tgene\t21556\t25377\t.\t+\t.\tParent=unknown_transcript_1" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:32:33.629048645" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:15:56.529595" }, - "test_cat_unzipped_zipped_lines": { + "sarscov2 - genome - error: name conflict": { "content": [ - [ - ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", - "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT", - "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG", - "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", - "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", - "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" - ] + { + "0": [ + + ], + "1": [ + + ], + "file_out": [ + + ], + "versions_cat": [ + + ] + } ], - "timestamp": "2023-10-16T14:33:08.038830506" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:14:54.496538" }, - "test_cat_one_file_unzipped_zipped_lines": { + "sarscov2 - [ fasta, sizes ] - unzipped": { "content": [ - [ - ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", - "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT", - "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG", - "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", - "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", - "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:33:21.39642399" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T11:26:29.942203" }, - "test_cat_zipped_zipped_size": { + "sarscov2 - [ gff3_gz, maf_gz ] - zipped": { "content": [ - 78 + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.gff3.gz:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "test.gff3.gz:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:32:33.641869244" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T11:26:45.679401" }, - "test_cat_one_file_unzipped_zipped_size": { + "sarscov2 - fasta - zipped": { "content": [ - 374 + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,6e9fe4042a72f2345f644f239272b7e6" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,6e9fe4042a72f2345f644f239272b7e6" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:33:21.4094373" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:16:12.439911" } } \ No newline at end of file diff --git a/modules/nf-core/cat/cat/tests/nextflow.config b/modules/nf-core/cat/cat/tests/nextflow.config new file mode 100644 index 00000000..5bc9bf50 --- /dev/null +++ b/modules/nf-core/cat/cat/tests/nextflow.config @@ -0,0 +1,6 @@ + +process { + withName: CAT_CAT { + ext.prefix = "${params.cat_prefix}" + } +} diff --git a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config b/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config deleted file mode 100644 index ec26b0fd..00000000 --- a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config +++ /dev/null @@ -1,6 +0,0 @@ - -process { - withName: CAT_CAT { - ext.prefix = 'cat.txt.gz' - } -} diff --git a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config b/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config deleted file mode 100644 index fbc79783..00000000 --- a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config +++ /dev/null @@ -1,8 +0,0 @@ - -process { - - withName: CAT_CAT { - ext.prefix = 'cat.txt' - } - -} diff --git a/modules/nf-core/cat/cat/tests/tags.yml b/modules/nf-core/cat/cat/tests/tags.yml deleted file mode 100644 index 37b578f5..00000000 --- a/modules/nf-core/cat/cat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/cat: - - modules/nf-core/cat/cat/** diff --git a/modules/nf-core/cat/fastq/cat-fastq.diff b/modules/nf-core/cat/fastq/cat-fastq.diff index 37e6ce28..e51fbf6a 100644 --- a/modules/nf-core/cat/fastq/cat-fastq.diff +++ b/modules/nf-core/cat/fastq/cat-fastq.diff @@ -4,53 +4,47 @@ Changes in component 'nf-core/cat/fastq' Changes in 'cat/fastq/main.nf': --- modules/nf-core/cat/fastq/main.nf +++ modules/nf-core/cat/fastq/main.nf +@@ -14,7 +14,7 @@ + tuple val(meta), path("*.merged.fastq.gz"), emit: reads +- tuple val("${task.process}"), val("cat"), eval("cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//'"), emit: versions_cat, topic: versions ++ tuple val("${task.process}"), val("python"), eval("python --version | sed 's/Python //'"), emit: versions_python, topic: versions + @@ -20,34 +20,20 @@ script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" -- def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] +- def readList = reads instanceof List ? reads.collect { item -> item.toString() } : [reads.toString()] +- def compress = readList[0]?.endsWith('.gz') ? '' : '| gzip' - if (meta.single_end) { - if (readList.size >= 1) { - """ -- cat ${readList.join(' ')} > ${prefix}.merged.fastq.gz -+ def read_list_str = reads instanceof List ? reads.join(' ') : reads.toString() -+ def single_end_flag = meta.single_end ? '--single_end' : '' - -- cat <<-END_VERSIONS > versions.yml -- "${task.process}": -- cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') -- END_VERSIONS +- cat ${readList.join(' ')} ${compress} > ${prefix}.merged.fastq.gz - """ +- } else { +- error("Could not find any FASTQ files to concatenate in the process input") - } -- } else { +- } +- else { - if (readList.size >= 2) { - def read1 = [] - def read2 = [] -- readList.eachWithIndex{ v, ix -> ( ix & 1 ? read2 : read1 ) << v } +- readList.eachWithIndex { v, ix -> (ix & 1 ? read2 : read1) << v } - """ -- cat ${read1.join(' ')} > ${prefix}_1.merged.fastq.gz -- cat ${read2.join(' ')} > ${prefix}_2.merged.fastq.gz +- cat ${read1.join(' ')} ${compress} > ${prefix}_1.merged.fastq.gz +- cat ${read2.join(' ')} ${compress} > ${prefix}_2.merged.fastq.gz +- """ +- } else { +- error("Could not find any FASTQ file pairs to concatenate in the process input") +- } +- } ++ def read_list_str = reads instanceof List ? reads.join(' ') : reads.toString() ++ def single_end_flag = meta.single_end ? '--single_end' : '' ++ + """ + cat_fastq.py \\ + --prefix ${prefix} \\ + ${single_end_flag} \\ + --reads ${read_list_str} - -- cat <<-END_VERSIONS > versions.yml -- "${task.process}": -- cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') -- END_VERSIONS -- """ -- } -- } -+ cat <<-END_VERSIONS > versions.yml -+ "${task.process}": -+ python: \$(python --version | sed 's/Python //') -+ END_VERSIONS + """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" 'modules/nf-core/cat/fastq/tests/tags.yml' is unchanged 'modules/nf-core/cat/fastq/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml index 8c69b121..9b926b1f 100644 --- a/modules/nf-core/cat/fastq/environment.yml +++ b/modules/nf-core/cat/fastq/environment.yml @@ -1,7 +1,12 @@ -name: cat_fastq +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - conda-forge::coreutils=8.30 + - conda-forge::coreutils=9.5 + - conda-forge::grep=3.11 + - conda-forge::gzip=1.13 + - conda-forge::lbzip2=2.5 + - conda-forge::sed=4.8 + - conda-forge::tar=1.34 diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index d93005eb..ea2d64c6 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -1,24 +1,23 @@ process CAT_FASTQ { - tag "$meta.id" + tag "${meta.id}" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/52/52ccce28d2ab928ab862e25aae26314d69c8e38bd41ca9431c67ef05221348aa/data' + : 'community.wave.seqera.io/library/coreutils_grep_gzip_lbzip2_pruned:838ba80435a629f8'}" input: tuple val(meta), path(reads, stageAs: "input*/*") output: tuple val(meta), path("*.merged.fastq.gz"), emit: reads - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("python"), eval("python --version | sed 's/Python //'"), emit: versions_python, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def read_list_str = reads instanceof List ? reads.join(' ') : reads.toString() def single_end_flag = meta.single_end ? '--single_end' : '' @@ -28,38 +27,28 @@ process CAT_FASTQ { --prefix ${prefix} \\ ${single_end_flag} \\ --reads ${read_list_str} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python --version | sed 's/Python //') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" - def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] + def readList = reads instanceof List ? reads.collect { item -> item.toString() } : [reads.toString()] if (meta.single_end) { - if (readList.size > 1) { + if (readList.size >= 1) { """ - touch ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + echo '' | gzip > ${prefix}.merged.fastq.gz """ + } else { + error("Could not find any FASTQ files to concatenate in the process input") } - } else { - if (readList.size > 2) { + } + else { + if (readList.size >= 2) { """ - touch ${prefix}_1.merged.fastq.gz - touch ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + echo '' | gzip > ${prefix}_1.merged.fastq.gz + echo '' | gzip > ${prefix}_2.merged.fastq.gz """ + } else { + error("Could not find any FASTQ file pairs to concatenate in the process input") } } } diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml index db4ac3c7..6fefd6e0 100644 --- a/modules/nf-core/cat/fastq/meta.yml +++ b/modules/nf-core/cat/fastq/meta.yml @@ -1,39 +1,64 @@ name: cat_fastq -description: Concatenates fastq files +description: Concatenates fastq files. Supports both compressed (.gz) and uncompressed inputs; uncompressed files are automatically gzip-compressed during concatenation. keywords: - cat - fastq - concatenate + - compress tools: - cat: description: | The cat utility reads files sequentially, writing them to the standard output. documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files to be concatenated. + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files to be concatenated. + Accepts both gzip-compressed (.fastq.gz) and uncompressed (.fastq) files. + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Merged fastq file - pattern: "*.{merged.fastq.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + reads: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.merged.fastq.gz": + type: file + description: Merged fastq file + pattern: "*.{merged.fastq.gz}" + ontologies: [] + versions_cat: + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test index dab2e14c..21052d90 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test +++ b/modules/nf-core/cat/fastq/tests/main.nf.test @@ -7,13 +7,11 @@ nextflow_process { tag "modules_nfcore" tag "cat" tag "cat/fastq" + tag "gunzip" test("test_cat_fastq_single_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -36,9 +34,6 @@ nextflow_process { test("test_cat_fastq_paired_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -63,9 +58,6 @@ nextflow_process { test("test_cat_fastq_single_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -88,9 +80,6 @@ nextflow_process { test("test_cat_fastq_paired_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -112,12 +101,202 @@ nextflow_process { } } + test("test_cat_fastq_single_end_uncompressed") { + + setup { + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.of( + [[ id:'r1' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)], + [[ id:'r2' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + .toSortedList { a, b -> a[0].id <=> b[0].id } + .map { items -> [[ id: 'test', single_end: true ], items.collect { it[1] }] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end_uncompressed") { + + setup { + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.of( + [[ id:'a' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)], + [[ id:'b' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)], + [[ id:'c' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true)], + [[ id:'d' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + .toSortedList { a, b -> a[0].id <=> b[0].id } + .map { items -> [[ id: 'test', single_end: false ], items.collect { it[1] }] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + test("test_cat_fastq_single_end_single_file") { when { - params { - outdir = "$outputDir" + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_same_name - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end_same_name - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + """ } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_single_file - stub") { + + options "-stub" + + when { process { """ input[0] = Channel.of([ @@ -135,4 +314,92 @@ nextflow_process { ) } } + + test("test_cat_fastq_single_end_no_files") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_paired_end_no_files") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_single_end_no_files - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_paired_end_no_files - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } } diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index 43dfe28f..6375b2ab 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -1,4 +1,247 @@ { + "test_cat_fastq_paired_end_no_files - stub": { + "content": [ + " Could not find any FASTQ file pairs to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:51.248685461" + }, + "test_cat_fastq_single_end_single_file": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:42.84401526" + }, + "test_cat_fastq_paired_end_same_name": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:36.820489323" + }, + "test_cat_fastq_paired_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:06.262192935" + }, + "test_cat_fastq_single_end_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-02-09T10:03:24.344628" + }, + "test_cat_fastq_paired_end_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-02-09T10:03:37.568053" + }, "test_cat_fastq_single_end": { "content": [ { @@ -12,7 +255,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -23,12 +270,20 @@ "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:30:39.816981" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:18.859169785" }, "test_cat_fastq_single_end_same_name": { "content": [ @@ -43,7 +298,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -54,14 +313,22 @@ "test.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:32:35.229332" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:30.942615287" }, - "test_cat_fastq_single_end_single_file": { + "test_cat_fastq_single_end - stub": { "content": [ { "0": [ @@ -70,11 +337,15 @@ "id": "test", "single_end": true }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -82,17 +353,88 @@ "id": "test", "single_end": true }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:34:00.058829" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:48.827990633" }, - "test_cat_fastq_paired_end_same_name": { + "test_cat_fastq_paired_end_no_files": { + "content": [ + " Could not find any FASTQ file pairs to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:40.806088747" + }, + "test_cat_fastq_single_end_no_files - stub": { + "content": [ + " Could not find any FASTQ files to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:45.852365218" + }, + "test_cat_fastq_single_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:00.586584379" + }, + "test_cat_fastq_paired_end": { "content": [ { "0": [ @@ -108,7 +450,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -122,14 +468,32 @@ ] ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:33:33.031555" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:25.159365603" }, - "test_cat_fastq_paired_end": { + "test_cat_fastq_single_end_no_files": { + "content": [ + " Could not find any FASTQ files to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:35.695192409" + }, + "test_cat_fastq_paired_end - stub": { "content": [ { "0": [ @@ -139,13 +503,17 @@ "single_end": false }, [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -154,16 +522,67 @@ "single_end": false }, [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:54.850702874" + }, + "test_cat_fastq_single_end_single_file - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:32:02.270935" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:11.746498148" } } \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/tests/tags.yml b/modules/nf-core/cat/fastq/tests/tags.yml deleted file mode 100644 index 6ac43614..00000000 --- a/modules/nf-core/cat/fastq/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/fastq: - - modules/nf-core/cat/fastq/** diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml index b48ced26..c3b3413f 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/environment.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/environment.yml @@ -1,7 +1,7 @@ -name: custom_dumpsoftwareversions +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::multiqc=1.20 + - bioconda::multiqc=1.27 diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 105f9265..874e18cc 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -4,8 +4,8 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.20--pyhdfd78af_0' : - 'biocontainers/multiqc:1.20--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.27--pyhdfd78af_0' : + 'biocontainers/multiqc:1.27--pyhdfd78af_0' }" input: path versions @@ -19,6 +19,14 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def deprecation_message = """ +WARNING: This module has been deprecated. + +Reason: +This module is no longer recommended for use, as it is replaced by the function softwareVersionsToYAML +in the utils_nfcore_pipeline subworkflow that is included in the nf-core template. + +""" + assert false: deprecation_message template 'dumpsoftwareversions.py' } diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index 5f15a5fd..b81907e6 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,34 +1,48 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: custom_dumpsoftwareversions -description: Custom module used to dump software versions within the nf-core pipeline template +description: Custom module used to dump software versions within the nf-core pipeline + template keywords: - custom - dump - version tools: - custom: - description: Custom module used to dump software versions within the nf-core pipeline template + description: Custom module used to dump software versions within the nf-core pipeline + template homepage: https://github.com/nf-core/tools documentation: https://github.com/nf-core/tools licence: ["MIT"] + identifier: "" input: - versions: type: file description: YML file containing software versions pattern: "*.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML output: - - yml: - type: file - description: Standard YML file containing software versions - pattern: "software_versions.yml" - - mqc_yml: - type: file - description: MultiQC custom content YML file containing software versions - pattern: "software_versions_mqc.yml" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + yml: + - software_versions.yml: + type: file + description: Standard YML file containing software versions + pattern: "software_versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + mqc_yml: + - software_versions_mqc.yml: + type: file + description: MultiQC custom content YML file containing software versions + pattern: "software_versions_mqc.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" - "@grst" diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py index da033408..aa40e5e3 100755 --- a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py @@ -3,11 +3,11 @@ """Provide functions to merge multiple versions.yml files.""" - -import yaml import platform from textwrap import dedent +import yaml + def _make_versions_html(versions): """Generate a tabular HTML output of all versions for MultiQC.""" @@ -37,7 +37,7 @@ def _make_versions_html(versions): dedent( f"""\\ - {process if (i == 0) else ''} + {process if (i == 0) else ""} {tool} {version} diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test index b1e1630b..296c2c90 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test @@ -30,13 +30,7 @@ nextflow_process { then { assertAll( - { assert process.success }, - { assert snapshot( - process.out.versions, - file(process.out.mqc_yml[0]).readLines()[0..10], - file(process.out.yml[0]).readLines()[0..7] - ).match() - } + { assert process.failed } ) } } diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap index 5f59a936..74e42fb1 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "Should run without failures": { "content": [ [ - "versions.yml:md5,76d454d92244589d32455833f7c1ba6d" + "versions.yml:md5,42bedca466554ea4ad0b586f8a18be28" ], [ "data: \"