diff --git a/.github/workflows/nextflow-lint.yml b/.github/workflows/nextflow-lint.yml new file mode 100644 index 000000000..b3f020498 --- /dev/null +++ b/.github/workflows/nextflow-lint.yml @@ -0,0 +1,17 @@ +name: Nextflow strict syntax lint +on: + pull_request: + push: + branches: [master, dev] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + + - name: Nextflow strict syntax lint + run: nextflow lint -o concise . diff --git a/.nf-core.yml b/.nf-core.yml index db72db000..7008615a2 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,5 +1,6 @@ lint: actions_nf_test: false + nf_test_content: false files_exist: - conf/modules.config files_unchanged: diff --git a/CHANGELOG.md b/CHANGELOG.md index d4049a677..287136b7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Special thanks to the following for their contributions to the release: - [PR #1667](https://github.com/nf-core/rnaseq/pull/1667) - Enhance RSEM output exports and remove unnecessary star_rsem check - [PR #1669](https://github.com/nf-core/rnaseq/pull/1669) - Enable SeqKit stats MultiQC module for RiboDetector rRNA removal - [PR #1672](https://github.com/nf-core/rnaseq/pull/1672) - Document star_rsem STAR aligner settings and customization +- [PR #1677](https://github.com/nf-core/rnaseq/pull/1677) - Apply Nextflow 25 strict syntax fixes ### Parameters diff --git a/docs/output.md b/docs/output.md index 3c0348b56..bb09a004d 100644 --- a/docs/output.md +++ b/docs/output.md @@ -335,8 +335,10 @@ The STAR section of the MultiQC report shows a bar plot with alignment rates: go - `*.transcript.bam`: If `--save_align_intermeds` is specified the BAM file from STAR alignment containing read alignments to the transcriptome will be placed in this directory. These files can be reused as `transcriptome_bam` input in future pipeline runs. - `star_rsem/.stat/` - `*.cnt`, `*.model`, `*.theta`: RSEM counts and statistics for each sample. - - `star_rsem/log/` - - `*.log`: STAR alignment report containing the mapping results summary. +- `star_rsem/log/` + - `*.SJ.out.tab`: File containing filtered splice junctions detected after mapping the reads. + - `*.Log.final.out`: STAR alignment report containing the mapping results summary. + - `*.Log.out` and `*.Log.progress.out`: STAR log files containing detailed information about the run. Typically only useful for debugging purposes. diff --git a/main.nf b/main.nf index 12883b1fc..128447be9 100755 --- a/main.nf +++ b/main.nf @@ -54,7 +54,7 @@ workflow NFCORE_RNASEQ { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // SUBWORKFLOW: Prepare reference genome files @@ -94,17 +94,17 @@ workflow NFCORE_RNASEQ { PREPARE_GENOME .out .fai - .map { checkMaxContigSize(it) } + .map { fai -> checkMaxContigSize(fai) } } // // WORKFLOW: Run nf-core/rnaseq workflow // - ch_samplesheet = Channel.value(file(params.input, checkIfExists: true)) + ch_samplesheet = channel.value(file(params.input, checkIfExists: true)) // Bowtie2 rRNA index is built on-demand inside the fastq_remove_rrna subworkflow // rather than in PREPARE_GENOME, to avoid duplicating the rRNA FASTA preparation logic - ch_bowtie2_index = Channel.empty() + ch_bowtie2_index = channel.empty() RNASEQ ( ch_samplesheet, diff --git a/modules.json b/modules.json index 9728e6d20..a5b7cf1d5 100644 --- a/modules.json +++ b/modules.json @@ -7,7 +7,7 @@ "nf-core": { "bbmap/bbsplit": { "branch": "master", - "git_sha": "2ddc92b750c7553f7a7becb4982851cef3ab848e", + "git_sha": "6d1d4b987af3ee5852d852abf99f8883028cea9c", "installed_by": ["fastq_qc_trim_filter_setstrandedness", "modules"] }, "bedtools/genomecov": { @@ -27,17 +27,17 @@ }, "bracken/bracken": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "004e773fc35ebd24063ca4cbef057c94a24208aa", "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "f4743b089085121497b7c1c81a28810ce2740dde", + "git_sha": "cf735af4433f2dc8e410f67012dff824ef9990eb", "installed_by": ["fastq_qc_trim_filter_setstrandedness", "modules"] }, "custom/catadditionalfasta": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "96c57dfd98a0641886a67bd449fe33ee2ec0e374", "installed_by": ["modules"] }, "custom/tx2gene": { @@ -52,7 +52,7 @@ }, "fastp": { "branch": "master", - "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", + "git_sha": "b8f1de0ac853ae5b56c63450d47438f899c553d0", "installed_by": ["fastq_fastqc_umitools_fastp", "modules"] }, "fastqc": { @@ -72,12 +72,12 @@ }, "gffread": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "51f2b493a7ff28b40a9f99faca64245521f2bb24", "installed_by": ["modules"] }, "gunzip": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "96c57dfd98a0641886a67bd449fe33ee2ec0e374", "installed_by": ["modules"] }, "hisat2/align": { @@ -93,7 +93,7 @@ }, "hisat2/extractsplicesites": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "004e773fc35ebd24063ca4cbef057c94a24208aa", "installed_by": ["modules"] }, "kallisto/index": { @@ -108,7 +108,7 @@ }, "kraken2/kraken2": { "branch": "master", - "git_sha": "1a9dc0fd9f8f61099b3c912df1ab97fac72a1f86", + "git_sha": "71a39f3598935d64ffd65f0960e4d2d4a42ab778", "installed_by": ["modules"] }, "multiqc": { @@ -144,7 +144,7 @@ }, "rsem/preparereference": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "004e773fc35ebd24063ca4cbef057c94a24208aa", "installed_by": ["modules"] }, "rseqc/bamstat": { @@ -174,7 +174,7 @@ }, "rseqc/readdistribution": { "branch": "master", - "git_sha": "0145202ae8a9f39a4e7c533f667c38989af799b2", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["bam_rseqc"] }, "rseqc/readduplication": { @@ -184,7 +184,7 @@ }, "rseqc/tin": { "branch": "master", - "git_sha": "0145202ae8a9f39a4e7c533f667c38989af799b2", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["bam_rseqc"] }, "salmon/index": { @@ -194,7 +194,7 @@ }, "salmon/quant": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "9ebc300e05af07c770b86ff089581a2d41346c8b", "installed_by": ["fastq_subsample_fq_salmon", "modules", "quantify_pseudo_alignment"] }, "samtools/faidx": { @@ -244,17 +244,17 @@ }, "sentieon/rsemcalculateexpression": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "a3588330b09a84d3b7254ec0bdc27a746a403dad", "installed_by": ["modules"] }, "sentieon/rsempreparereference": { "branch": "master", - "git_sha": "256557155b2439c5d551f1a668bf6a7ff6b10f93", + "git_sha": "a3588330b09a84d3b7254ec0bdc27a746a403dad", "installed_by": ["modules"] }, "sentieon/staralign": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "a3588330b09a84d3b7254ec0bdc27a746a403dad", "installed_by": ["modules"] }, "seqkit/replace": { @@ -269,7 +269,7 @@ }, "sortmerna": { "branch": "master", - "git_sha": "ddb0d667cf6cdee3bab9497241de4bbf6b88d8cc", + "git_sha": "6d1d4b987af3ee5852d852abf99f8883028cea9c", "installed_by": ["fastq_qc_trim_filter_setstrandedness", "fastq_remove_rrna", "modules"] }, "star/align": { @@ -299,7 +299,7 @@ }, "sylph/profile": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "004e773fc35ebd24063ca4cbef057c94a24208aa", "installed_by": ["modules"] }, "sylphtax/taxprof": { @@ -309,7 +309,7 @@ }, "trimgalore": { "branch": "master", - "git_sha": "1b32b48b7d2803ae78a1beb20b7e9657dbcda776", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["fastq_fastqc_umitools_trimgalore"] }, "tximeta/tximport": { @@ -319,12 +319,12 @@ }, "ucsc/bedclip": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "51f2b493a7ff28b40a9f99faca64245521f2bb24", "installed_by": ["bedgraph_bedclip_bedgraphtobigwig"] }, "ucsc/bedgraphtobigwig": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "51f2b493a7ff28b40a9f99faca64245521f2bb24", "installed_by": ["bedgraph_bedclip_bedgraphtobigwig"] }, "umicollapse": { @@ -361,22 +361,22 @@ "nf-core": { "bam_dedup_stats_samtools_umicollapse": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["bam_dedup_umi", "subworkflows"] }, "bam_dedup_stats_samtools_umitools": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["bam_dedup_umi", "subworkflows"] }, "bam_dedup_umi": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["subworkflows"] }, "bam_markduplicates_picard": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["subworkflows"] }, "bam_rseqc": { @@ -386,12 +386,12 @@ }, "bam_sort_stats_samtools": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["bam_dedup_umi", "fastq_align_hisat2"] }, "bam_stats_samtools": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": [ "bam_dedup_stats_samtools_umicollapse", "bam_dedup_stats_samtools_umitools", @@ -401,42 +401,42 @@ }, "bedgraph_bedclip_bedgraphtobigwig": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "51f2b493a7ff28b40a9f99faca64245521f2bb24", "installed_by": ["subworkflows"] }, "fastq_align_hisat2": { "branch": "master", - "git_sha": "20b042e352fc47ab6dab717a622253e96429e887", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["subworkflows"] }, "fastq_fastqc_umitools_fastp": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["fastq_qc_trim_filter_setstrandedness", "subworkflows"] }, "fastq_fastqc_umitools_trimgalore": { "branch": "master", - "git_sha": "1b32b48b7d2803ae78a1beb20b7e9657dbcda776", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["fastq_qc_trim_filter_setstrandedness", "subworkflows"] }, "fastq_qc_trim_filter_setstrandedness": { "branch": "master", - "git_sha": "0745ffcda877676de0d0b21208377e841db6218f", + "git_sha": "6d1d4b987af3ee5852d852abf99f8883028cea9c", "installed_by": ["subworkflows"] }, "fastq_remove_rrna": { "branch": "master", - "git_sha": "0745ffcda877676de0d0b21208377e841db6218f", + "git_sha": "6d1d4b987af3ee5852d852abf99f8883028cea9c", "installed_by": ["fastq_qc_trim_filter_setstrandedness"] }, "fastq_subsample_fq_salmon": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "9ebc300e05af07c770b86ff089581a2d41346c8b", "installed_by": ["fastq_qc_trim_filter_setstrandedness", "subworkflows"] }, "quantify_pseudo_alignment": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "9ebc300e05af07c770b86ff089581a2d41346c8b", "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { diff --git a/modules/local/multiqc_custom_biotype/nextflow.config b/modules/local/multiqc_custom_biotype/nextflow.config index 6326efeb5..76ab02a7c 100644 --- a/modules/local/multiqc_custom_biotype/nextflow.config +++ b/modules/local/multiqc_custom_biotype/nextflow.config @@ -1,13 +1,9 @@ -if (!params.skip_qc) { - if (!params.skip_biotype_qc && params.featurecounts_group_type) { - process { - withName: 'MULTIQC_CUSTOM_BIOTYPE' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: 'MULTIQC_CUSTOM_BIOTYPE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/modules/local/star_align_igenomes/main.nf b/modules/local/star_align_igenomes/main.nf index c19fe93af..74c323fa3 100644 --- a/modules/local/star_align_igenomes/main.nf +++ b/modules/local/star_align_igenomes/main.nf @@ -38,10 +38,10 @@ process STAR_ALIGN_IGENOMES { def prefix = task.ext.prefix ?: "${meta.id}" def reads1 = [] def reads2 = [] - meta.single_end ? [reads].flatten().each{reads1 << it} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } - def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" - def seq_platform = seq_platform ? "'PL:$seq_platform'" : "" - def seq_center = seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$seq_center' 'SM:$prefix' $seq_platform " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform " + meta.single_end ? [reads].flatten().each{ read -> reads1 << read } : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } + def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" + def seq_platform_str = seq_platform ? "'PL:$seq_platform'" : "" + def seq_center_str = seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$seq_center' 'SM:$prefix' $seq_platform_str " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform_str " def out_sam_type = (args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted' def mv_unsorted_bam = (args.contains('--outSAMtype BAM Unsorted SortedByCoordinate')) ? "mv ${prefix}.Aligned.out.bam ${prefix}.Aligned.unsort.out.bam" : '' """ @@ -52,7 +52,7 @@ process STAR_ALIGN_IGENOMES { --outFileNamePrefix $prefix. \\ $out_sam_type \\ $ignore_gtf \\ - $seq_center \\ + $seq_center_str \\ $args $mv_unsorted_bam diff --git a/modules/nf-core/bbmap/bbsplit/main.nf b/modules/nf-core/bbmap/bbsplit/main.nf index c9af070c5..bce220832 100644 --- a/modules/nf-core/bbmap/bbsplit/main.nf +++ b/modules/nf-core/bbmap/bbsplit/main.nf @@ -21,7 +21,7 @@ process BBMAP_BBSPLIT { tuple val(meta), path('*fastq.gz') , optional:true, emit: all_fastq tuple val(meta), path('*txt') , optional:true, emit: stats tuple val(meta), path('*.log') , optional:true, emit: log - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bbmap'), eval('bbversion.sh | grep -v "Duplicate cpuset"'), topic: versions, emit: versions_bbmap when: task.ext.when == null || task.ext.when @@ -38,8 +38,8 @@ process BBMAP_BBSPLIT { } def other_refs = [] - other_ref_names.eachWithIndex { name, index -> - other_refs << "ref_${name}=${other_ref_paths[index]}" + other_ref_names.eachWithIndex { name, idx -> + other_refs << "ref_${name}=${other_ref_paths[idx]}" } def fastq_in='' @@ -103,17 +103,12 @@ process BBMAP_BBSPLIT { done mv bbsplit_build bbsplit_index fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bbmap: \$(bbversion.sh | grep -v "Duplicate cpuset") - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" def other_refs = '' - other_ref_names.eachWithIndex { name, index -> + other_ref_names.eachWithIndex { name, _idx -> other_refs += "echo '' | gzip > ${prefix}_${name}.fastq.gz" } def will_build_index = only_build_index || (!index && primary_ref && other_ref_names && other_ref_paths) @@ -131,10 +126,5 @@ process BBMAP_BBSPLIT { fi touch ${prefix}.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bbmap: \$(bbversion.sh | grep -v "Duplicate cpuset") - END_VERSIONS """ } diff --git a/modules/nf-core/bbmap/bbsplit/meta.yml b/modules/nf-core/bbmap/bbsplit/meta.yml index 66f87cce0..ecab992d0 100644 --- a/modules/nf-core/bbmap/bbsplit/meta.yml +++ b/modules/nf-core/bbmap/bbsplit/meta.yml @@ -96,13 +96,29 @@ output: description: Log file pattern: "*.log" ontologies: [] + versions_bbmap: + - - ${task.process}: + type: string + description: The process the versions were collected from + - bbmap: + type: string + description: The tool name + - bbversion.sh | grep -v "Duplicate cpuset": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - bbmap: + type: string + description: The tool name + - bbversion.sh | grep -v "Duplicate cpuset": + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bbmap/bbsplit/nextflow.config b/modules/nf-core/bbmap/bbsplit/nextflow.config index 8d71e9d85..b1bd66c35 100644 --- a/modules/nf-core/bbmap/bbsplit/nextflow.config +++ b/modules/nf-core/bbmap/bbsplit/nextflow.config @@ -1,20 +1,18 @@ -if (!params.skip_bbsplit) { - process { - withName: 'BBMAP_BBSPLIT' { - ext.args = 'build=1 ambiguous2=all maxindel=150000 ow=f' - publishDir = [ - [ - path: { "${params.outdir}/bbsplit" }, - mode: params.publish_dir_mode, - pattern: '*.txt' - ], - [ - path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_bbsplit_reads ? it : null } - ] +process { + withName: 'BBMAP_BBSPLIT' { + ext.args = 'build=1 ambiguous2=all maxindel=150000 ow=f' + publishDir = [ + [ + path: { "${params.outdir}/bbsplit" }, + mode: params.publish_dir_mode, + pattern: '*.txt' + ], + [ + path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { filename -> params.save_bbsplit_reads ? filename : null } ] - } + ] } } diff --git a/modules/nf-core/bbmap/bbsplit/tests/main.nf.test b/modules/nf-core/bbmap/bbsplit/tests/main.nf.test index 2f942f39c..82985102f 100644 --- a/modules/nf-core/bbmap/bbsplit/tests/main.nf.test +++ b/modules/nf-core/bbmap/bbsplit/tests/main.nf.test @@ -30,7 +30,7 @@ nextflow_process { { assert process.success }, { assert path("${process.out.index[0]}").exists() }, { assert path(process.out.log[0][1]).text.contains("No index available") }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } ) } } @@ -104,7 +104,7 @@ nextflow_process { { assert snapshot( process.out.primary_fastq, process.out.stats, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match()} ) } diff --git a/modules/nf-core/bbmap/bbsplit/tests/main.nf.test.snap b/modules/nf-core/bbmap/bbsplit/tests/main.nf.test.snap index 7e739a663..b5fbb54f3 100644 --- a/modules/nf-core/bbmap/bbsplit/tests/main.nf.test.snap +++ b/modules/nf-core/bbmap/bbsplit/tests/main.nf.test.snap @@ -19,26 +19,38 @@ "test.stats.txt:md5,2cbf69b72e5f4f8508306b54e8fe2861" ] ], - [ - "versions.yml:md5,b75d21d7649b5a512e7b54dd15cd3eba" - ] + { + "versions_bbmap": [ + [ + "BBMAP_BBSPLIT", + "bbmap", + "39.18" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-07T12:36:23.511852" + "timestamp": "2026-01-19T14:51:21.775776" }, "sarscov2_se_fastq_fasta_chr22_fasta - build index": { "content": [ - [ - "versions.yml:md5,b75d21d7649b5a512e7b54dd15cd3eba" - ] + { + "versions_bbmap": [ + [ + "BBMAP_BBSPLIT", + "bbmap", + "39.18" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-07T11:05:45.517832" + "timestamp": "2026-01-19T14:50:28.922018" } } \ No newline at end of file diff --git a/modules/nf-core/bracken/bracken/main.nf b/modules/nf-core/bracken/bracken/main.nf index 360980c35..17c71e9ac 100644 --- a/modules/nf-core/bracken/bracken/main.nf +++ b/modules/nf-core/bracken/bracken/main.nf @@ -14,7 +14,7 @@ process BRACKEN_BRACKEN { output: tuple val(meta), path(bracken_report) , emit: reports tuple val(meta), path(bracken_kraken_style_report), emit: txt - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bracken'), eval('bracken -v | cut -f2 -d"v"'), topic: versions, emit: versions_bracken when: task.ext.when == null || task.ext.when @@ -31,25 +31,14 @@ process BRACKEN_BRACKEN { -i '${kraken_report}' \\ -o '${bracken_report}' \\ -w '${bracken_kraken_style_report}' - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bracken: \$(echo \$(bracken -v) | cut -f2 -d'v') - END_VERSIONS """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" bracken_report = "${prefix}.tsv" bracken_kraken_style_report = "${prefix}.kraken2.report_bracken.txt" """ touch ${prefix}.tsv touch ${bracken_kraken_style_report} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bracken: \$(echo \$(bracken -v) | cut -f2 -d'v') - END_VERSIONS """ } diff --git a/modules/nf-core/bracken/bracken/meta.yml b/modules/nf-core/bracken/bracken/meta.yml index 6f89df938..447e77983 100644 --- a/modules/nf-core/bracken/bracken/meta.yml +++ b/modules/nf-core/bracken/bracken/meta.yml @@ -60,13 +60,29 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] pattern: "*.txt" + versions_bracken: + - - ${task.process}: + type: string + description: The process the versions were collected from + - bracken: + type: string + description: The tool name + - bracken -v | cut -f2 -d"v": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - bracken: + type: string + description: The tool name + - bracken -v | cut -f2 -d"v": + type: eval + description: The expression to obtain the version of the tool + authors: - "@Midnighter" maintainers: diff --git a/modules/nf-core/bracken/bracken/nextflow.config b/modules/nf-core/bracken/bracken/nextflow.config index d5e2a2e00..4f2d8be0f 100644 --- a/modules/nf-core/bracken/bracken/nextflow.config +++ b/modules/nf-core/bracken/bracken/nextflow.config @@ -1,13 +1,9 @@ -if (!params.skip_qc) { - if (params.contaminant_screening == 'kraken2_bracken') { - process { - withName: 'BRACKEN' { - ext.args = "-l ${params.bracken_precision}" - publishDir = [ - path: { "${params.outdir}/${params.aligner}/contaminants/bracken" }, - mode: params.publish_dir_mode - ] - } - } +process { + withName: 'BRACKEN' { + ext.args = "-l ${params.bracken_precision}" + publishDir = [ + path: { "${params.outdir}/${params.aligner}/contaminants/bracken" }, + mode: params.publish_dir_mode + ] } } diff --git a/modules/nf-core/bracken/bracken/tests/main.nf.test.snap b/modules/nf-core/bracken/bracken/tests/main.nf.test.snap index 482e55d43..45c641b65 100644 --- a/modules/nf-core/bracken/bracken/tests/main.nf.test.snap +++ b/modules/nf-core/bracken/bracken/tests/main.nf.test.snap @@ -21,7 +21,11 @@ ] ], "2": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ], "reports": [ [ @@ -41,16 +45,20 @@ "test.kraken2.report_bracken.txt:md5,ca0fbeedc4353b5fdd081688823a33df" ] ], - "versions": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + "versions_bracken": [ + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-02T13:17:09.050813" + "timestamp": "2026-01-19T14:03:31.299124251" }, "sarscov2 - paired-end - fastq - genus config": { "content": [ @@ -74,7 +82,11 @@ ] ], "2": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ], "reports": [ [ @@ -94,16 +106,20 @@ "test.kraken2.report_bracken.txt:md5,2ce58814420a3690da1f08e10e8d3a30" ] ], - "versions": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + "versions_bracken": [ + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-02T13:17:22.479694" + "timestamp": "2026-01-19T14:03:38.094543816" }, "sarscov2 - paired-end - fastq": { "content": [ @@ -127,7 +143,11 @@ ] ], "2": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ], "reports": [ [ @@ -147,16 +167,20 @@ "test.kraken2.report_bracken.txt:md5,ca0fbeedc4353b5fdd081688823a33df" ] ], - "versions": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + "versions_bracken": [ + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-02T13:17:35.489383" + "timestamp": "2026-01-19T14:03:44.706209228" }, "sarscov2 - stub - fastq": { "content": [ @@ -178,7 +202,11 @@ ] ], "2": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ], "reports": [ [ @@ -196,15 +224,19 @@ "test.kraken2.report_bracken.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,e3d2c4366550ad48484aa3cae6e67ad4" + "versions_bracken": [ + [ + "BRACKEN_BRACKEN", + "bracken", + "3.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-02T13:17:47.183592" + "timestamp": "2026-01-19T14:03:50.763300237" } } \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index 8480e383f..0a195a3b7 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -19,7 +19,7 @@ process CAT_FASTQ { script: 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) { """ @@ -45,7 +45,7 @@ process CAT_FASTQ { 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) { """ diff --git a/modules/nf-core/custom/catadditionalfasta/main.nf b/modules/nf-core/custom/catadditionalfasta/main.nf index 9925ca322..86d39a6eb 100644 --- a/modules/nf-core/custom/catadditionalfasta/main.nf +++ b/modules/nf-core/custom/catadditionalfasta/main.nf @@ -26,12 +26,12 @@ process CUSTOM_CATADDITIONALFASTA { def prefix = task.ext.prefix ?: "${meta.id}" """ mkdir out - touch out/genome_transcriptome.fasta - touch out/genome_transcriptome.gtf + touch out/${prefix}.fasta + touch out/${prefix}.gtf cat <<-END_VERSIONS > versions.yml "${task.process}": - python: \$(python --version | grep -v "Python ") + python: \$(python --version | sed 's/Python //') END_VERSIONS """ } diff --git a/modules/nf-core/custom/catadditionalfasta/tests/main.nf.test.snap b/modules/nf-core/custom/catadditionalfasta/tests/main.nf.test.snap index 6dd1afeb1..6f7151cf2 100644 --- a/modules/nf-core/custom/catadditionalfasta/tests/main.nf.test.snap +++ b/modules/nf-core/custom/catadditionalfasta/tests/main.nf.test.snap @@ -38,7 +38,7 @@ "id": "test", "single_end": false }, - "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -47,11 +47,11 @@ "id": "test", "single_end": false }, - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "2": [ - "versions.yml:md5,451e5a1afee71b2b916b6f2ccc47e508" + "versions.yml:md5,8ab7a953e43316a447ad37b2e29e9c75" ], "fasta": [ [ @@ -59,7 +59,7 @@ "id": "test", "single_end": false }, - "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "gtf": [ @@ -68,11 +68,11 @@ "id": "test", "single_end": false }, - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ - "versions.yml:md5,451e5a1afee71b2b916b6f2ccc47e508" + "versions.yml:md5,8ab7a953e43316a447ad37b2e29e9c75" ] } ], diff --git a/modules/nf-core/dupradar/nextflow.config b/modules/nf-core/dupradar/nextflow.config index aa2004e50..af30e170c 100644 --- a/modules/nf-core/dupradar/nextflow.config +++ b/modules/nf-core/dupradar/nextflow.config @@ -1,35 +1,31 @@ -if (!params.skip_qc) { - if (!params.skip_dupradar) { - process { - withName: 'DUPRADAR' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/dupradar/scatter_plot" }, - mode: params.publish_dir_mode, - pattern: "*Dens.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/box_plot" }, - mode: params.publish_dir_mode, - pattern: "*Boxplot.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/histogram" }, - mode: params.publish_dir_mode, - pattern: "*Hist.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/gene_data" }, - mode: params.publish_dir_mode, - pattern: "*Matrix.txt" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/intercepts_slope" }, - mode: params.publish_dir_mode, - pattern: "*slope.txt" - ] - ] - } - } +process { + withName: 'DUPRADAR' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/dupradar/scatter_plot" }, + mode: params.publish_dir_mode, + pattern: "*Dens.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/box_plot" }, + mode: params.publish_dir_mode, + pattern: "*Boxplot.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/histogram" }, + mode: params.publish_dir_mode, + pattern: "*Hist.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/gene_data" }, + mode: params.publish_dir_mode, + pattern: "*Matrix.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/intercepts_slope" }, + mode: params.publish_dir_mode, + pattern: "*slope.txt" + ] + ] } } diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index 85013f5d7..7538fc3a6 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -29,9 +29,9 @@ process FASTP { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def adapter_list = adapter_fasta ? "--adapter_fasta ${adapter_fasta}" : "" - def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' - def out_fq1 = discard_trimmed_pass ?: ( meta.single_end ? "--out1 ${prefix}.fastp.fastq.gz" : "--out1 ${prefix}_1.fastp.fastq.gz" ) - def out_fq2 = discard_trimmed_pass ?: "--out2 ${prefix}_2.fastp.fastq.gz" + def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_R1.fail.fastq.gz --unpaired2 ${prefix}_R2.fail.fastq.gz" : '' + def out_fq1 = discard_trimmed_pass ?: ( meta.single_end ? "--out1 ${prefix}.fastp.fastq.gz" : "--out1 ${prefix}_R1.fastp.fastq.gz" ) + def out_fq2 = discard_trimmed_pass ?: "--out2 ${prefix}_R2.fastp.fastq.gz" // Added soft-links to original fastqs for consistent naming in MultiQC // Use single ended for interleaved. Add --interleaved_in in config. if ( task.ext.args?.contains('--interleaved_in') ) { @@ -78,11 +78,11 @@ process FASTP { } else { def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : '' """ - [ ! -f ${prefix}_1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_1.fastq.gz - [ ! -f ${prefix}_2.fastq.gz ] && ln -sf ${reads[1]} ${prefix}_2.fastq.gz + [ ! -f ${prefix}_R1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_R1.fastq.gz + [ ! -f ${prefix}_R2.fastq.gz ] && ln -sf ${reads[1]} ${prefix}_R2.fastq.gz fastp \\ - --in1 ${prefix}_1.fastq.gz \\ - --in2 ${prefix}_2.fastq.gz \\ + --in1 ${prefix}_R1.fastq.gz \\ + --in2 ${prefix}_R2.fastq.gz \\ $out_fq1 \\ $out_fq2 \\ --json ${prefix}.fastp.json \\ @@ -105,9 +105,9 @@ process FASTP { stub: def prefix = task.ext.prefix ?: "${meta.id}" def is_single_output = task.ext.args?.contains('--interleaved_in') || meta.single_end - def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_2.fastp.fastq.gz" + def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_R1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_R2.fastp.fastq.gz" def touch_merged = (!is_single_output && save_merged) ? "echo '' | gzip > ${prefix}.merged.fastq.gz" : "" - def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_1.fail.fastq.gz ; echo '' | gzip > ${prefix}_2.fail.fastq.gz" + def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_R1.fail.fastq.gz ; echo '' | gzip > ${prefix}_R2.fail.fastq.gz" """ $touch_reads $touch_fail_fastq diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap index a30c680d1..2276fc089 100644 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -97,8 +97,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -113,10 +113,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:12.436191" + "timestamp": "2025-12-22T14:32:22.887952042" }, "test_fastp_paired_end_merged_adapterlist": { "content": [ @@ -127,8 +127,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] ], @@ -149,10 +149,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:32.267735" + "timestamp": "2025-12-22T14:32:53.752975682" }, "test_fastp_single_end_qc_only": { "content": [ @@ -193,8 +193,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" + "test_R1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_R2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" ] ] ], @@ -206,8 +206,8 @@ }, [ "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + "test_R1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_R2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" ] ] ], @@ -219,10 +219,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:24.23891" + "timestamp": "2025-12-22T14:32:41.270456637" }, "fastp - stub test_fastp_interleaved": { "content": [ @@ -436,8 +436,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -517,8 +517,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -540,10 +540,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:37.413738" + "timestamp": "2025-12-22T14:33:44.204950729" }, "test_fastp_paired_end_merged - stub": { "content": [ @@ -555,8 +555,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -636,8 +636,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -659,10 +659,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:32.965652" + "timestamp": "2025-12-22T14:33:38.518882433" }, "test_fastp_paired_end_merged": { "content": [ @@ -673,8 +673,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] ], @@ -695,10 +695,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:28.074624" + "timestamp": "2025-12-22T14:32:47.366974895" }, "test_fastp_paired_end - stub": { "content": [ @@ -710,8 +710,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -785,8 +785,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -802,10 +802,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:14.414258" + "timestamp": "2025-12-22T14:33:16.494574544" }, "test_fastp_single_end": { "content": [ @@ -957,8 +957,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -997,8 +997,8 @@ }, [ "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1042,8 +1042,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1055,8 +1055,8 @@ }, [ "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1069,10 +1069,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:28.399328" + "timestamp": "2025-12-22T14:33:32.863505882" }, "fastp test_fastp_interleaved": { "content": [ diff --git a/modules/nf-core/gffread/main.nf b/modules/nf-core/gffread/main.nf index da55cbab7..198afa8d6 100644 --- a/modules/nf-core/gffread/main.nf +++ b/modules/nf-core/gffread/main.nf @@ -15,7 +15,7 @@ process GFFREAD { tuple val(meta), path("*.gtf") , emit: gtf , optional: true tuple val(meta), path("*.gff3") , emit: gffread_gff , optional: true tuple val(meta), path("*.fasta"), emit: gffread_fasta , optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('gffread'), eval('gffread --version 2>&1'), topic: versions, emit: versions_gffread when: task.ext.when == null || task.ext.when @@ -23,11 +23,11 @@ process GFFREAD { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { args.contains(it) } ) ? 'fasta' : 'gff3' ) + def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { flag -> args.contains(flag) } ) ? 'fasta' : 'gff3' ) def fasta_arg = fasta ? "-g $fasta" : '' def output_name = "${prefix}.${extension}" def output = extension == "fasta" ? "$output_name" : "-o $output_name" - def args_sorted = args.replaceAll(/(.*)(-[wxy])(.*)/) { all, pre, param, post -> "$pre $post $param" }.trim() + def args_sorted = args.replaceAll(/(.*)(-[wxy])(.*)/) { _all, pre, param, post -> "$pre $post $param" }.trim() // args_sorted = Move '-w', '-x', and '-y' to the end of the args string as gffread expects the file name after these parameters if ( "$output_name" in [ "$gff", "$fasta" ] ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ @@ -36,25 +36,15 @@ process GFFREAD { $fasta_arg \\ $args_sorted \\ $output - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffread: \$(gffread --version 2>&1) - END_VERSIONS """ stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { args.contains(it) } ) ? 'fasta' : 'gff3' ) + def extension = args.contains("-T") ? 'gtf' : ( ( ['-w', '-x', '-y' ].any { flag -> args.contains(flag) } ) ? 'fasta' : 'gff3' ) def output_name = "${prefix}.${extension}" if ( "$output_name" in [ "$gff", "$fasta" ] ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ touch $output_name - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gffread: \$(gffread --version 2>&1) - END_VERSIONS """ } diff --git a/modules/nf-core/gffread/meta.yml b/modules/nf-core/gffread/meta.yml index 715efec8e..abdae64d2 100644 --- a/modules/nf-core/gffread/meta.yml +++ b/modules/nf-core/gffread/meta.yml @@ -68,13 +68,29 @@ output: is present pattern: "*.fasta" ontologies: [] + versions_gffread: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gffread: + type: string + description: The tool name + - gffread --version 2>&1: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - gffread: + type: string + description: The tool name + - gffread --version 2>&1: + type: eval + description: The expression to obtain the version of the tool + authors: - "@edmundmiller" maintainers: diff --git a/modules/nf-core/gffread/tests/main.nf.test.snap b/modules/nf-core/gffread/tests/main.nf.test.snap index 15262320d..cfdbe9ffc 100644 --- a/modules/nf-core/gffread/tests/main.nf.test.snap +++ b/modules/nf-core/gffread/tests/main.nf.test.snap @@ -17,7 +17,11 @@ ], "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ], "gffread_fasta": [ @@ -33,16 +37,20 @@ "test.gtf:md5,1ea0ae98d3388e0576407dc4a24ef428" ] ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + "versions_gffread": [ + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-09T10:48:56.496187" + "timestamp": "2026-01-19T14:04:00.517880519" }, "sarscov2-gff3-gff3": { "content": [ @@ -62,7 +70,11 @@ ], "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ], "gffread_fasta": [ @@ -78,16 +90,20 @@ "gtf": [ ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + "versions_gffread": [ + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-09T10:49:00.892782" + "timestamp": "2026-01-19T14:04:11.054206957" }, "sarscov2-gff3-gtf-stub": { "content": [ @@ -107,7 +123,11 @@ ], "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ], "gffread_fasta": [ @@ -123,16 +143,20 @@ "test.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + "versions_gffread": [ + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-09T11:11:26.975666" + "timestamp": "2026-01-19T14:04:05.79250369" }, "sarscov2-gff3-fasta-stub": { "content": [ @@ -152,7 +176,11 @@ ] ], "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ], "gffread_fasta": [ [ @@ -168,16 +196,20 @@ "gtf": [ ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + "versions_gffread": [ + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-09T11:11:44.34792" + "timestamp": "2026-01-19T14:04:26.781173161" }, "sarscov2-gff3-gff3-stub": { "content": [ @@ -197,7 +229,11 @@ ], "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ], "gffread_fasta": [ @@ -213,16 +249,20 @@ "gtf": [ ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + "versions_gffread": [ + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-09T11:11:35.221671" + "timestamp": "2026-01-19T14:04:16.265299123" }, "sarscov2-gff3-fasta": { "content": [ @@ -242,7 +282,11 @@ ] ], "3": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ], "gffread_fasta": [ [ @@ -258,15 +302,19 @@ "gtf": [ ], - "versions": [ - "versions.yml:md5,05f671c6c6e530acedad0af0a5948dbd" + "versions_gffread": [ + [ + "GFFREAD", + "gffread", + "0.12.7" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-04-09T10:54:02.88143" + "timestamp": "2026-01-19T14:04:21.551846584" } } \ No newline at end of file diff --git a/modules/nf-core/gunzip/main.nf b/modules/nf-core/gunzip/main.nf index 3ffc8e926..a8533e74b 100644 --- a/modules/nf-core/gunzip/main.nf +++ b/modules/nf-core/gunzip/main.nf @@ -12,7 +12,7 @@ process GUNZIP { output: tuple val(meta), path("${gunzip}"), emit: gunzip - path "versions.yml", emit: versions + tuple val("${task.process}"), val('gunzip'), eval('gunzip --version 2>&1 | head -1 | sed "s/^.*(gzip) //; s/ Copyright.*//"'), topic: versions, emit: versions_gunzip when: task.ext.when == null || task.ext.when @@ -32,24 +32,14 @@ process GUNZIP { ${args} \\ ${archive} \\ > ${gunzip} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') - END_VERSIONS """ stub: - def args = task.ext.args ?: '' def extension = (archive.toString() - '.gz').tokenize('.')[-1] def name = archive.toString() - '.gz' - ".${extension}" def prefix = task.ext.prefix ?: name gunzip = prefix + ".${extension}" """ touch ${gunzip} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - gunzip: \$(echo \$(gunzip --version 2>&1) | sed 's/^.*(gzip) //; s/ Copyright.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/gunzip/meta.yml b/modules/nf-core/gunzip/meta.yml index 926bb22ac..bba6b3ba7 100644 --- a/modules/nf-core/gunzip/meta.yml +++ b/modules/nf-core/gunzip/meta.yml @@ -34,13 +34,29 @@ output: description: Compressed/uncompressed file pattern: "*.*" ontologies: [] + versions_gunzip: + - - ${task.process}: + type: string + description: The process the versions were collected from + - gunzip: + type: string + description: The tool name + - gunzip --version 2>&1 | head -1 | sed "s/^.*(gzip) //; s/ Copyright.*//": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - gunzip: + type: string + description: The tool name + - gunzip --version 2>&1 | head -1 | sed "s/^.*(gzip) //; s/ Copyright.*//": + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/gunzip/tests/main.nf.test.snap b/modules/nf-core/gunzip/tests/main.nf.test.snap index a0f0e67ed..111ba1bce 100644 --- a/modules/nf-core/gunzip/tests/main.nf.test.snap +++ b/modules/nf-core/gunzip/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + [ + "GUNZIP", + "gunzip", + "1.13" + ] ], "gunzip": [ [ @@ -21,16 +25,20 @@ "test.xyz.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + "versions_gunzip": [ + [ + "GUNZIP", + "gunzip", + "1.13" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-12-13T11:48:22.080222697" + "timestamp": "2026-01-19T17:21:56.633550769" }, "Should run without failures - stub": { "content": [ @@ -44,7 +52,11 @@ ] ], "1": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + [ + "GUNZIP", + "gunzip", + "1.13" + ] ], "gunzip": [ [ @@ -54,16 +66,20 @@ "test_1.fastq:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + "versions_gunzip": [ + [ + "GUNZIP", + "gunzip", + "1.13" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-12-13T11:48:14.593020264" + "timestamp": "2026-01-19T17:21:51.435621199" }, "Should run without failures": { "content": [ @@ -77,7 +93,11 @@ ] ], "1": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + [ + "GUNZIP", + "gunzip", + "1.13" + ] ], "gunzip": [ [ @@ -87,16 +107,20 @@ "test_1.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" ] ], - "versions": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + "versions_gunzip": [ + [ + "GUNZIP", + "gunzip", + "1.13" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-12-13T11:48:01.295397925" + "timestamp": "2026-01-19T17:21:40.613975821" }, "Should run without failures - prefix": { "content": [ @@ -110,7 +134,11 @@ ] ], "1": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + [ + "GUNZIP", + "gunzip", + "1.13" + ] ], "gunzip": [ [ @@ -120,15 +148,19 @@ "test.xyz.fastq:md5,4161df271f9bfcd25d5845a1e220dbec" ] ], - "versions": [ - "versions.yml:md5,d327e4a19a6d5c5e974136cef8999d8c" + "versions_gunzip": [ + [ + "GUNZIP", + "gunzip", + "1.13" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-12-13T11:48:07.414271387" + "timestamp": "2026-01-19T17:21:46.086880414" } } \ No newline at end of file diff --git a/modules/nf-core/hisat2/extractsplicesites/main.nf b/modules/nf-core/hisat2/extractsplicesites/main.nf index 6fbe33d0f..3d778d8fe 100644 --- a/modules/nf-core/hisat2/extractsplicesites/main.nf +++ b/modules/nf-core/hisat2/extractsplicesites/main.nf @@ -12,7 +12,7 @@ process HISAT2_EXTRACTSPLICESITES { output: tuple val(meta), path("*.splice_sites.txt"), emit: txt - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('hisat2'), eval('hisat2 --version | grep -o "version [^ ]*" | cut -d " " -f 2'), topic: versions, emit: versions_hisat2 when: task.ext.when == null || task.ext.when @@ -20,20 +20,14 @@ process HISAT2_EXTRACTSPLICESITES { script: def args = task.ext.args ?: '' """ - hisat2_extract_splice_sites.py $gtf > ${gtf.baseName}.splice_sites.txt - cat <<-END_VERSIONS > versions.yml - "${task.process}": - hisat2: \$(hisat2 --version | grep -o 'version [^ ]*' | cut -d ' ' -f 2) - END_VERSIONS + hisat2_extract_splice_sites.py \\ + $args \\ + $gtf \\ + > ${gtf.baseName}.splice_sites.txt """ stub: """ touch ${gtf.baseName}.splice_sites.txt - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - hisat2: \$(hisat2 --version | grep -o 'version [^ ]*' | cut -d ' ' -f 2) - END_VERSIONS """ } diff --git a/modules/nf-core/hisat2/extractsplicesites/meta.yml b/modules/nf-core/hisat2/extractsplicesites/meta.yml index dafe87069..c13cc5b9d 100644 --- a/modules/nf-core/hisat2/extractsplicesites/meta.yml +++ b/modules/nf-core/hisat2/extractsplicesites/meta.yml @@ -38,13 +38,29 @@ output: description: Splice sites in txt file pattern: "*.txt" ontologies: [] + versions_hisat2: + - - ${task.process}: + type: string + description: The process the versions were collected from + - hisat2: + type: string + description: The tool name + - hisat2 --version | grep -o "version [^ ]*" | cut -d " " -f 2: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - hisat2: + type: string + description: The tool name + - hisat2 --version | grep -o "version [^ ]*" | cut -d " " -f 2: + type: eval + description: The expression to obtain the version of the tool + authors: - "@ntoda03" - "@ramprasadn" diff --git a/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test b/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test index 14129cfff..a827a0fc5 100644 --- a/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test +++ b/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test @@ -28,7 +28,7 @@ nextflow_process { assertAll( { assert process.success }, { assert path("${process.out.txt[0][1]}").exists() }, - { assert snapshot(process.out.versions).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } ) } } diff --git a/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test.snap b/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test.snap index 1dcd8af23..341c32024 100644 --- a/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test.snap +++ b/modules/nf-core/hisat2/extractsplicesites/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,eeea7231fe197810659b8bad4133aff2" + [ + "HISAT2_EXTRACTSPLICESITES", + "hisat2", + "2.2.1" + ] ], "txt": [ [ @@ -21,27 +25,37 @@ "genome.splice_sites.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,eeea7231fe197810659b8bad4133aff2" + "versions_hisat2": [ + [ + "HISAT2_EXTRACTSPLICESITES", + "hisat2", + "2.2.1" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-06-20T17:34:13.229903" + "timestamp": "2026-01-19T13:53:18.228211649" }, "Should run without failures": { "content": [ - [ - "versions.yml:md5,eeea7231fe197810659b8bad4133aff2" - ] + { + "versions_hisat2": [ + [ + "HISAT2_EXTRACTSPLICESITES", + "hisat2", + "2.2.1" + ] + ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-01-18T20:56:30.71763" + "timestamp": "2026-01-19T13:53:12.997365366" } } \ No newline at end of file diff --git a/modules/nf-core/kraken2/kraken2/main.nf b/modules/nf-core/kraken2/kraken2/main.nf index ab48972a2..c826eecf5 100644 --- a/modules/nf-core/kraken2/kraken2/main.nf +++ b/modules/nf-core/kraken2/kraken2/main.nf @@ -18,7 +18,8 @@ process KRAKEN2_KRAKEN2 { tuple val(meta), path('*.unclassified{.,_}*') , optional:true, emit: unclassified_reads_fastq tuple val(meta), path('*classifiedreads.txt') , optional:true, emit: classified_reads_assignment tuple val(meta), path('*report.txt') , emit: report - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('kraken2'), eval('kraken2 --version 2>&1 | head -1 | sed "s/^.*Kraken version //; s/ .*//"'), topic: versions, emit: versions_kraken2 + tuple val("${task.process}"), val('pigz'), eval('pigz --version 2>&1 | sed "s/pigz //g"'), topic: versions, emit: versions_pigz when: task.ext.when == null || task.ext.when @@ -48,22 +49,12 @@ process KRAKEN2_KRAKEN2 { $reads $compress_reads_command - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - kraken2: \$(echo \$(kraken2 --version 2>&1) | sed 's/^.*Kraken version //; s/ .*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def paired = meta.single_end ? "" : "--paired" def classified = meta.single_end ? "${prefix}.classified.fastq.gz" : "${prefix}.classified_1.fastq.gz ${prefix}.classified_2.fastq.gz" def unclassified = meta.single_end ? "${prefix}.unclassified.fastq.gz" : "${prefix}.unclassified_1.fastq.gz ${prefix}.unclassified_2.fastq.gz" - def readclassification_option = save_reads_assignment ? "--output ${prefix}.kraken2.classifiedreads.txt" : "--output /dev/null" - def compress_reads_command = save_output_fastqs ? "pigz -p $task.cpus *.fastq" : "" """ touch ${prefix}.kraken2.report.txt @@ -74,12 +65,6 @@ process KRAKEN2_KRAKEN2 { if [ "$save_reads_assignment" == "true" ]; then touch ${prefix}.kraken2.classifiedreads.txt fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - kraken2: \$(echo \$(kraken2 --version 2>&1) | sed 's/^.*Kraken version //; s/ .*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS """ } diff --git a/modules/nf-core/kraken2/kraken2/meta.yml b/modules/nf-core/kraken2/kraken2/meta.yml index a6a09061b..b60868de6 100644 --- a/modules/nf-core/kraken2/kraken2/meta.yml +++ b/modules/nf-core/kraken2/kraken2/meta.yml @@ -91,13 +91,48 @@ output: and not classified reads. pattern: "*.{report.txt}" ontologies: [] + versions_kraken2: + - - ${task.process}: + type: string + description: The process the versions were collected from + - kraken2: + type: string + description: The tool name + - kraken2 --version 2>&1 | head -1 | sed "s/^.*Kraken version //; s/ .*//": + type: eval + description: The expression to obtain the version of the tool + versions_pigz: + - - ${task.process}: + type: string + description: The process the versions were collected from + - pigz: + type: string + description: The tool name + - pigz --version 2>&1 | sed "s/pigz //g": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - kraken2: + type: string + description: The tool name + - kraken2 --version 2>&1 | head -1 | sed "s/^.*Kraken version //; s/ .*//": + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - pigz: + type: string + description: The tool name + - pigz --version 2>&1 | sed "s/pigz //g": + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/kraken2/kraken2/nextflow.config b/modules/nf-core/kraken2/kraken2/nextflow.config index e7055a915..8e25d96ee 100644 --- a/modules/nf-core/kraken2/kraken2/nextflow.config +++ b/modules/nf-core/kraken2/kraken2/nextflow.config @@ -1,15 +1,11 @@ -if (!params.skip_qc) { - if (params.contaminant_screening in ['kraken2', 'kraken2_bracken']) { - process { - withName: 'KRAKEN2' { - // See https://doi.org/10.1080/19490976.2024.2323235 for the confidence level - // and https://doi.org/10.1038/s41596-022-00738-y for the minimum-hit-groups - ext.args = "--confidence 0.05 --minimum-hit-groups 3" - publishDir = [ - path: { "${params.outdir}/${params.aligner}/contaminants/kraken2/kraken_reports" }, - mode: params.publish_dir_mode - ] - } - } +process { + withName: 'KRAKEN2' { + // See https://doi.org/10.1080/19490976.2024.2323235 for the confidence level + // and https://doi.org/10.1038/s41596-022-00738-y for the minimum-hit-groups + ext.args = "--confidence 0.05 --minimum-hit-groups 3" + publishDir = [ + path: { "${params.outdir}/${params.aligner}/contaminants/kraken2/kraken_reports" }, + mode: params.publish_dir_mode + ] } } diff --git a/modules/nf-core/kraken2/kraken2/tests/main.nf.test b/modules/nf-core/kraken2/kraken2/tests/main.nf.test index 40f471e66..72dc33c05 100644 --- a/modules/nf-core/kraken2/kraken2/tests/main.nf.test +++ b/modules/nf-core/kraken2/kraken2/tests/main.nf.test @@ -48,7 +48,7 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.report, - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, ).match() }, { assert process.out.classified_reads_fastq.get(0).get(1) ==~ ".*/test.classified.fastq.gz" }, @@ -91,7 +91,7 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.report, - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, ).match() }, { assert process.out.classified_reads_fastq.get(0).get(1).get(0) @@ -133,7 +133,7 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.report, - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.classified_reads_assignment, ).match() }, @@ -164,7 +164,7 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.report, - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, ).match() }, { assert process.out.classified_reads_fastq.get(0).get(1) ==~ ".*/test.classified.fastq.gz" }, @@ -196,7 +196,7 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.report, - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, ).match() }, { assert process.out.classified_reads_fastq.get(0).get(1).get(0) diff --git a/modules/nf-core/kraken2/kraken2/tests/main.nf.test.snap b/modules/nf-core/kraken2/kraken2/tests/main.nf.test.snap index defe4e24d..4aa2ece7f 100644 --- a/modules/nf-core/kraken2/kraken2/tests/main.nf.test.snap +++ b/modules/nf-core/kraken2/kraken2/tests/main.nf.test.snap @@ -10,15 +10,28 @@ "test.kraken2.report.txt:md5,4227755fe40478b8d7dc8634b489761e" ] ], - [ - "versions.yml:md5,3f1efbca96594bcbd7759bd992f3ffda" - ] + { + "versions_kraken2": [ + [ + "KRAKEN2_KRAKEN2", + "kraken2", + "2.1.6" + ] + ], + "versions_pigz": [ + [ + "KRAKEN2_KRAKEN2", + "pigz", + "2.8" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-10-29T10:39:33.16840511" + "timestamp": "2026-01-19T17:22:36.682041524" }, "paired_end - stub": { "content": [ @@ -31,15 +44,28 @@ "test.kraken2.report.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - [ - "versions.yml:md5,3f1efbca96594bcbd7759bd992f3ffda" - ] + { + "versions_kraken2": [ + [ + "KRAKEN2_KRAKEN2", + "kraken2", + "2.1.6" + ] + ], + "versions_pigz": [ + [ + "KRAKEN2_KRAKEN2", + "pigz", + "2.8" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-10-29T10:57:46.285333986" + "timestamp": "2026-01-19T17:22:59.824433284" }, "sarscov2 custom_prefix - stub": { "content": [ @@ -76,15 +102,28 @@ "test.kraken2.report.txt:md5,4227755fe40478b8d7dc8634b489761e" ] ], - [ - "versions.yml:md5,3f1efbca96594bcbd7759bd992f3ffda" - ] + { + "versions_kraken2": [ + [ + "KRAKEN2_KRAKEN2", + "kraken2", + "2.1.6" + ] + ], + "versions_pigz": [ + [ + "KRAKEN2_KRAKEN2", + "pigz", + "2.8" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-26T10:40:12.99538483" + "timestamp": "2026-01-19T17:22:42.807626617" }, "sarscov2 illumina single end [fastq] + save_reads_assignment": { "content": [ @@ -97,9 +136,22 @@ "test.kraken2.report.txt:md5,4227755fe40478b8d7dc8634b489761e" ] ], - [ - "versions.yml:md5,3f1efbca96594bcbd7759bd992f3ffda" - ], + { + "versions_kraken2": [ + [ + "KRAKEN2_KRAKEN2", + "kraken2", + "2.1.6" + ] + ], + "versions_pigz": [ + [ + "KRAKEN2_KRAKEN2", + "pigz", + "2.8" + ] + ] + }, [ [ { @@ -111,10 +163,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T16:53:38.496195464" + "timestamp": "2026-01-19T17:22:48.87201447" }, "single_end - stub": { "content": [ @@ -127,14 +179,27 @@ "test.kraken2.report.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - [ - "versions.yml:md5,3f1efbca96594bcbd7759bd992f3ffda" - ] + { + "versions_kraken2": [ + [ + "KRAKEN2_KRAKEN2", + "kraken2", + "2.1.6" + ] + ], + "versions_pigz": [ + [ + "KRAKEN2_KRAKEN2", + "pigz", + "2.8" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-10-29T10:44:44.698158761" + "timestamp": "2026-01-19T17:22:54.351663948" } } \ No newline at end of file diff --git a/modules/nf-core/multiqc/nextflow.config b/modules/nf-core/multiqc/nextflow.config index 0714dbccd..c0a3af18b 100644 --- a/modules/nf-core/multiqc/nextflow.config +++ b/modules/nf-core/multiqc/nextflow.config @@ -1,18 +1,16 @@ -if (!params.skip_multiqc) { - process { - withName: 'MULTIQC' { - ext.args = { [ - ((params.multiqc_title == null) ? '' : "--title \"${params.multiqc_title}\"") - ].join(' ').trim() } - ext.prefix = "multiqc_report" - publishDir = [ - path: { [ - "${params.outdir}/multiqc", - params.skip_alignment? '' : "/${params.aligner}" - ].join('') }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: 'MULTIQC' { + ext.args = { [ + ((params.multiqc_title == null) ? '' : "--title \"${params.multiqc_title}\"") + ].join(' ').trim() } + ext.prefix = "multiqc_report" + publishDir = [ + path: { [ + "${params.outdir}/multiqc", + params.skip_alignment? '' : "/${params.aligner}" + ].join('') }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/modules/nf-core/preseq/lcextrap/nextflow.config b/modules/nf-core/preseq/lcextrap/nextflow.config index 220496967..27e66dc30 100644 --- a/modules/nf-core/preseq/lcextrap/nextflow.config +++ b/modules/nf-core/preseq/lcextrap/nextflow.config @@ -1,21 +1,17 @@ -if (!params.skip_qc) { - if (!params.skip_preseq) { - process { - withName: 'PRESEQ_LCEXTRAP' { - ext.args = '-verbose -bam -seed 1 -seg_len 100000000' - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/preseq" }, - mode: params.publish_dir_mode, - pattern: "*.txt" - ], - [ - path: { "${params.outdir}/${params.aligner}/preseq/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ] - ] - } - } +process { + withName: 'PRESEQ_LCEXTRAP' { + ext.args = '-verbose -bam -seed 1 -seg_len 100000000' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/preseq" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/preseq/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ] + ] } } diff --git a/modules/nf-core/qualimap/rnaseq/nextflow.config b/modules/nf-core/qualimap/rnaseq/nextflow.config index 5c1b59423..e2078fca6 100644 --- a/modules/nf-core/qualimap/rnaseq/nextflow.config +++ b/modules/nf-core/qualimap/rnaseq/nextflow.config @@ -1,22 +1,18 @@ -if (!params.skip_qc) { - if (!params.skip_qualimap) { - process { - withName: 'SAMTOOLS_SORT_QUALIMAP' { - ext.args = '-n' - ext.prefix = { "${meta.id}.namesorted" } - publishDir = [ - enabled: false - ] - } +process { + withName: 'SAMTOOLS_SORT_QUALIMAP' { + ext.args = '-n' + ext.prefix = { "${meta.id}.namesorted" } + publishDir = [ + enabled: false + ] + } - withName: 'QUALIMAP_RNASEQ' { - ext.args = '--sorted' - publishDir = [ - path: { "${params.outdir}/${params.aligner}/qualimap" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } + withName: 'QUALIMAP_RNASEQ' { + ext.args = '--sorted' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/qualimap" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/modules/nf-core/rsem/preparereference/main.nf b/modules/nf-core/rsem/preparereference/main.nf index 4d7c65996..e014ce6fa 100644 --- a/modules/nf-core/rsem/preparereference/main.nf +++ b/modules/nf-core/rsem/preparereference/main.nf @@ -14,7 +14,8 @@ process RSEM_PREPAREREFERENCE { output: path "rsem" , emit: index path "*transcripts.fa", emit: transcript_fasta - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('rsem'), eval('rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"'), topic: versions, emit: versions_rsem + tuple val("${task.process}"), val('star'), eval('STAR --version | sed -e "s/STAR_//g"'), topic: versions, emit: versions_star when: task.ext.when == null || task.ext.when @@ -24,7 +25,7 @@ process RSEM_PREPAREREFERENCE { def args2 = task.ext.args2 ?: '' def args_list = args.tokenize() if (args_list.contains('--star')) { - args_list.removeIf { it.contains('--star') } + args_list.removeIf { arg -> arg.contains('--star') } def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : '' """ STAR \\ @@ -44,12 +45,6 @@ process RSEM_PREPAREREFERENCE { rsem/genome cp rsem/genome.transcripts.fa . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - END_VERSIONS """ } else { """ @@ -61,23 +56,11 @@ process RSEM_PREPAREREFERENCE { rsem/genome cp rsem/genome.transcripts.fa . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - END_VERSIONS """ } stub: """ touch genome.transcripts.fa - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - END_VERSIONS """ } diff --git a/modules/nf-core/rsem/preparereference/meta.yml b/modules/nf-core/rsem/preparereference/meta.yml index ea5c0ef11..4a3a5a2d2 100644 --- a/modules/nf-core/rsem/preparereference/meta.yml +++ b/modules/nf-core/rsem/preparereference/meta.yml @@ -36,13 +36,48 @@ output: description: Fasta file of transcripts pattern: "rsem/*transcripts.fa" ontologies: [] + versions_rsem: + - - ${task.process}: + type: string + description: The process the versions were collected from + - rsem: + type: string + description: The tool name + - 'rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"': + type: eval + description: The expression to obtain the version of the tool + versions_star: + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - STAR --version | sed -e "s/STAR_//g": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - rsem: + type: string + description: The tool name + - 'rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - STAR --version | sed -e "s/STAR_//g": + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" - "@kevinmenden" diff --git a/modules/nf-core/rsem/preparereference/tests/main.nf.test b/modules/nf-core/rsem/preparereference/tests/main.nf.test index 9f618ad4c..958d5e2e8 100644 --- a/modules/nf-core/rsem/preparereference/tests/main.nf.test +++ b/modules/nf-core/rsem/preparereference/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_process { { assert process.success }, { assert snapshot(process.out.index).match("index")}, { assert snapshot(process.out.transcript_fasta).match("transcript_fasta")}, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions") } ) } } diff --git a/modules/nf-core/rsem/preparereference/tests/main.nf.test.snap b/modules/nf-core/rsem/preparereference/tests/main.nf.test.snap index 0c3c10896..2941d1a22 100644 --- a/modules/nf-core/rsem/preparereference/tests/main.nf.test.snap +++ b/modules/nf-core/rsem/preparereference/tests/main.nf.test.snap @@ -11,7 +11,18 @@ "genome.transcripts.fa:md5,d41d8cd98f00b204e9800998ecf8427e" ], "2": [ - "versions.yml:md5,517611c42f6354d3609db1b35fffa397" + [ + "RSEM_PREPAREREFERENCE", + "rsem", + "1.3.1" + ] + ], + "3": [ + [ + "RSEM_PREPAREREFERENCE", + "star", + "2.7.10a" + ] ], "index": [ [ @@ -21,28 +32,52 @@ "transcript_fasta": [ "genome.transcripts.fa:md5,d41d8cd98f00b204e9800998ecf8427e" ], - "versions": [ - "versions.yml:md5,517611c42f6354d3609db1b35fffa397" + "versions_rsem": [ + [ + "RSEM_PREPAREREFERENCE", + "rsem", + "1.3.1" + ] + ], + "versions_star": [ + [ + "RSEM_PREPAREREFERENCE", + "star", + "2.7.10a" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-02T14:24:38.229417" + "timestamp": "2026-01-19T14:06:19.387360983" }, "versions": { "content": [ - [ - "versions.yml:md5,517611c42f6354d3609db1b35fffa397" - ] + { + "versions_rsem": [ + [ + "RSEM_PREPAREREFERENCE", + "rsem", + "1.3.1" + ] + ], + "versions_star": [ + [ + "RSEM_PREPAREREFERENCE", + "star", + "2.7.10a" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-02T14:24:27.489566" + "timestamp": "2026-01-19T14:53:27.239498" }, "index": { "content": [ diff --git a/modules/nf-core/rseqc/readdistribution/main.nf b/modules/nf-core/rseqc/readdistribution/main.nf index 5f4b800fb..e055485b1 100644 --- a/modules/nf-core/rseqc/readdistribution/main.nf +++ b/modules/nf-core/rseqc/readdistribution/main.nf @@ -23,6 +23,7 @@ process RSEQC_READDISTRIBUTION { def prefix = task.ext.prefix ?: "${meta.id}" """ read_distribution.py \\ + $args \\ -i $bam \\ -r $bed \\ > ${prefix}.read_distribution.txt diff --git a/modules/nf-core/rseqc/tin/main.nf b/modules/nf-core/rseqc/tin/main.nf index fee27d448..e7cfda0bb 100644 --- a/modules/nf-core/rseqc/tin/main.nf +++ b/modules/nf-core/rseqc/tin/main.nf @@ -27,12 +27,15 @@ process RSEQC_TIN { -i $bam \\ -r $bed \\ $args + + mv ${bam.baseName}.summary.txt ${prefix}.summary.txt + mv ${bam.baseName}.tin.xls ${prefix}.tin.xls """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${bam.fileName}.summary.txt - touch ${bam.fileName}.tin.xls + touch ${prefix}.summary.txt + touch ${prefix}.tin.xls """ } diff --git a/modules/nf-core/rseqc/tin/tests/main.nf.test.snap b/modules/nf-core/rseqc/tin/tests/main.nf.test.snap index 13e5830cf..83b1a2cbe 100644 --- a/modules/nf-core/rseqc/tin/tests/main.nf.test.snap +++ b/modules/nf-core/rseqc/tin/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.summary.txt:md5,9d98447e178b89a89f6f5aba7a772fe6" + "test.summary.txt:md5,9d98447e178b89a89f6f5aba7a772fe6" ] ], "1": [ @@ -17,7 +17,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.tin.xls:md5,abdbb6d51a5cd7038cd862ce241ecef1" + "test.tin.xls:md5,abdbb6d51a5cd7038cd862ce241ecef1" ] ], "2": [ @@ -33,7 +33,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.summary.txt:md5,9d98447e178b89a89f6f5aba7a772fe6" + "test.summary.txt:md5,9d98447e178b89a89f6f5aba7a772fe6" ] ], "versions_rseqc": [ @@ -49,7 +49,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.tin.xls:md5,abdbb6d51a5cd7038cd862ce241ecef1" + "test.tin.xls:md5,abdbb6d51a5cd7038cd862ce241ecef1" ] ] } @@ -69,7 +69,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.bam.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -78,7 +78,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.bam.tin.xls:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.tin.xls:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "2": [ @@ -94,7 +94,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.bam.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions_rseqc": [ @@ -110,7 +110,7 @@ "id": "test", "single_end": false }, - "test.paired_end.sorted.bam.tin.xls:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.tin.xls:md5,d41d8cd98f00b204e9800998ecf8427e" ] ] } diff --git a/modules/nf-core/salmon/quant/main.nf b/modules/nf-core/salmon/quant/main.nf index b7c71871c..eed3b3d54 100644 --- a/modules/nf-core/salmon/quant/main.nf +++ b/modules/nf-core/salmon/quant/main.nf @@ -19,7 +19,7 @@ process SALMON_QUANT { tuple val(meta), path("${prefix}"), emit: results tuple val(meta), path("*info.json"), emit: json_info, optional: true tuple val(meta), path("*lib_format_counts.json"), emit: lib_format_counts, optional: true - path "versions.yml", emit: versions + tuple val("${task.process}"), val('salmon'), eval('salmon --version | sed -e "s/salmon //g"'), topic: versions, emit: versions_salmon when: task.ext.when == null || task.ext.when @@ -31,7 +31,7 @@ process SALMON_QUANT { def reference = "--index ${index}" def reads1 = [] def reads2 = [] - meta.single_end ? [reads].flatten().each { reads1 << it } : reads.eachWithIndex { v, ix -> (ix & 1 ? reads2 : reads1) << v } + meta.single_end ? [reads].flatten().each { r -> reads1 << r } : reads.eachWithIndex { v, ix -> (ix & 1 ? reads2 : reads1) << v } def input_reads = meta.single_end ? "-r ${reads1.join(" ")}" : "-1 ${reads1.join(" ")} -2 ${reads2.join(" ")}" if (alignment_mode) { reference = "-t ${transcript_fasta}" @@ -90,11 +90,6 @@ process SALMON_QUANT { if [ -f ${prefix}/lib_format_counts.json ]; then cp ${prefix}/lib_format_counts.json "${prefix}_lib_format_counts.json" fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g") - END_VERSIONS """ stub: @@ -103,10 +98,5 @@ process SALMON_QUANT { mkdir ${prefix} touch ${prefix}_meta_info.json touch ${prefix}_lib_format_counts.json - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g") - END_VERSIONS """ } diff --git a/modules/nf-core/salmon/quant/meta.yml b/modules/nf-core/salmon/quant/meta.yml index 40e8eb965..634507e6f 100644 --- a/modules/nf-core/salmon/quant/meta.yml +++ b/modules/nf-core/salmon/quant/meta.yml @@ -77,13 +77,29 @@ output: pattern: "*lib_format_counts.json" ontologies: - edam: http://edamontology.org/format_3464 # JSON + versions_salmon: + - - ${task.process}: + type: string + description: The process the versions were collected from + - salmon: + type: string + description: The tool name + - salmon --version | sed -e "s/salmon //g": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - salmon: + type: string + description: The tool name + - salmon --version | sed -e "s/salmon //g": + type: eval + description: The expression to obtain the version of the tool + authors: - "@kevinmenden" - "@drpatelh" diff --git a/modules/nf-core/salmon/quant/tests/main.nf.test b/modules/nf-core/salmon/quant/tests/main.nf.test index 2964cc3d0..c687a170f 100644 --- a/modules/nf-core/salmon/quant/tests/main.nf.test +++ b/modules/nf-core/salmon/quant/tests/main.nf.test @@ -49,7 +49,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -84,7 +84,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -119,7 +119,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -154,7 +154,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -192,7 +192,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -230,7 +230,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -270,7 +270,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) @@ -310,7 +310,7 @@ nextflow_process { { assert path(process.out.json_info.get(0).get(1)).exists() }, { assert path(process.out.results.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, process.out.lib_format_counts ).match() } ) diff --git a/modules/nf-core/salmon/quant/tests/main.nf.test.snap b/modules/nf-core/salmon/quant/tests/main.nf.test.snap index ea22a80ce..8f96b544f 100644 --- a/modules/nf-core/salmon/quant/tests/main.nf.test.snap +++ b/modules/nf-core/salmon/quant/tests/main.nf.test.snap @@ -1,9 +1,15 @@ { "sarscov2 - single_end": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -15,16 +21,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:01:16.989080539" + "timestamp": "2026-01-19T14:53:59.375252" }, "sarscov2 - single_end stub": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -36,16 +48,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:01:29.340996235" + "timestamp": "2026-01-19T14:54:06.507228" }, "sarscov2 - single_end lib type A": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -57,16 +75,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:01:43.056167576" + "timestamp": "2026-01-19T14:54:15.005117" }, "sarscov2 - pair_end multiple": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -78,16 +102,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:03:05.500792631" + "timestamp": "2026-01-19T14:54:48.338822" }, "sarscov2 - pair_end multiple stub": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -99,16 +129,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:03:26.428959203" + "timestamp": "2026-01-19T14:54:56.134603" }, "sarscov2 - single_end lib type A stub": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -120,16 +156,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:02:03.420850208" + "timestamp": "2026-01-19T14:54:22.024404" }, "sarscov2 - pair_end": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -141,16 +183,22 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:02:16.130074696" + "timestamp": "2026-01-19T14:54:30.967174" }, "sarscov2 - pair_end stub": { "content": [ - [ - "versions.yml:md5,0d510d5db6398e2c8ca9443330740607" - ], + { + "versions_salmon": [ + [ + "SALMON_QUANT", + "salmon", + "1.10.3" + ] + ] + }, [ [ { @@ -162,9 +210,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:02:39.470004547" + "timestamp": "2026-01-19T14:54:38.572004" } } \ No newline at end of file diff --git a/modules/nf-core/sentieon/rsemcalculateexpression/main.nf b/modules/nf-core/sentieon/rsemcalculateexpression/main.nf index fbd72ef45..b2efb5dc2 100644 --- a/modules/nf-core/sentieon/rsemcalculateexpression/main.nf +++ b/modules/nf-core/sentieon/rsemcalculateexpression/main.nf @@ -17,12 +17,15 @@ process SENTIEON_RSEMCALCULATEEXPRESSION { tuple val(meta), path("*.isoforms.results"), emit: counts_transcript tuple val(meta), path("*.stat") , emit: stat tuple val(meta), path("*.log") , emit: logs, optional:true - path "versions.yml" , emit: versions tuple val(meta), path("*.STAR.genome.bam") , optional:true, emit: bam_star tuple val(meta), path("${prefix}.genome.bam") , optional:true, emit: bam_genome tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript + tuple val("${task.process}"), val('rsem'), eval('rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"'), topic: versions, emit: versions_rsem + tuple val("${task.process}"), val('star'), eval('STAR --version | sed -e "s/STAR_//g"'), topic: versions, emit: versions_star + tuple val("${task.process}"), val('sentieon'), eval('sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"'), topic: versions, emit: versions_sentieon + when: task.ext.when == null || task.ext.when @@ -49,6 +52,8 @@ process SENTIEON_RSEMCALCULATEEXPRESSION { : "" """ + $sentieonLicense + INDEX=`find -L ./ -name "*.grp" | sed 's/\\.grp\$//'` # Create symlink to sentieon in PATH @@ -76,19 +81,16 @@ process SENTIEON_RSEMCALCULATEEXPRESSION { $reads \\ \$INDEX \\ $prefix - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS """ stub: prefix = task.ext.prefix ?: "${meta.id}" def is_bam = reads.toString().toLowerCase().endsWith('.bam') """ + # Create symlink to sentieon in PATH for version detection + ln -sf \$(which sentieon) ./STAR + export PATH=".:\$PATH" + touch ${prefix}.genes.results touch ${prefix}.isoforms.results touch ${prefix}.stat @@ -101,12 +103,5 @@ process SENTIEON_RSEMCALCULATEEXPRESSION { touch ${prefix}.genome.bam touch ${prefix}.transcript.bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS """ } diff --git a/modules/nf-core/sentieon/rsemcalculateexpression/meta.yml b/modules/nf-core/sentieon/rsemcalculateexpression/meta.yml index 87a966363..eaf0729b3 100644 --- a/modules/nf-core/sentieon/rsemcalculateexpression/meta.yml +++ b/modules/nf-core/sentieon/rsemcalculateexpression/meta.yml @@ -76,13 +76,6 @@ output: description: RSEM logs pattern: "*.log" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML bam_star: - - meta: type: map @@ -116,6 +109,67 @@ output: description: Transcript BAM file (optional) pattern: "*.transcript.bam" ontologies: [] + versions_rsem: + - - ${task.process}: + type: string + description: The process the versions were collected from + - rsem: + type: string + description: The tool name + - 'rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"': + type: eval + description: The expression to obtain the version of the tool + versions_star: + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - STAR --version | sed -e "s/STAR_//g": + type: eval + description: The expression to obtain the version of the tool + versions_sentieon: + - - ${task.process}: + type: string + description: The process the versions were collected from + - sentieon: + type: string + description: The tool name + - sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g": + 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 + - rsem: + type: string + description: The tool name + - 'rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - STAR --version | sed -e "s/STAR_//g": + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - sentieon: + type: string + description: The tool name + - sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g": + type: eval + description: The expression to obtain the version of the tool + authors: - "@FriederikeHanssen" maintainers: diff --git a/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test b/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test index e99eaf4c3..e7d7d42b2 100644 --- a/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test +++ b/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test @@ -47,7 +47,7 @@ nextflow_process { process.out.counts_gene, process.out.counts_transcript, process.out.stat, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } @@ -93,7 +93,7 @@ nextflow_process { process.out.counts_gene, process.out.counts_transcript, process.out.stat, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() }, { assert path(process.out.logs.get(0).get(1)).exists() } ) @@ -140,7 +140,7 @@ nextflow_process { { assert path(process.out.stat.get(0).get(1)).exists() }, { assert path(process.out.logs.get(0).get(1)).exists() }, { assert snapshot( - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } diff --git a/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test.snap b/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test.snap index 539a2b0f5..a773f4675 100644 --- a/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/rsemcalculateexpression/tests/main.nf.test.snap @@ -1,9 +1,29 @@ { "homo_sapiens - stub": { "content": [ - [ - "versions.yml:md5,2c37927aa617a24c43688228944f4a96" - ] + { + "versions_rsem": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "rsem", + "1.3.1" + ] + ], + "versions_sentieon": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "star", + "2.7.10b" + ] + ] + } ], "meta": { "nf-test": "0.9.2", @@ -44,9 +64,29 @@ ] ] ], - [ - "versions.yml:md5,253b43edb079232ffcdf0b741134cce9" - ] + { + "versions_rsem": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "rsem", + "1.3.1" + ] + ], + "versions_sentieon": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "star", + "2.7.10b" + ] + ] + } ], "meta": { "nf-test": "0.9.2", @@ -87,9 +127,29 @@ ] ] ], - [ - "versions.yml:md5,253b43edb079232ffcdf0b741134cce9" - ] + { + "versions_rsem": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "rsem", + "1.3.1" + ] + ], + "versions_sentieon": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_RSEMCALCULATEEXPRESSION", + "star", + "2.7.10b" + ] + ] + } ], "meta": { "nf-test": "0.9.2", diff --git a/modules/nf-core/sentieon/rsemcalculateexpression/tests/nextflow.config b/modules/nf-core/sentieon/rsemcalculateexpression/tests/nextflow.config index 0d7b82c43..71db586af 100644 --- a/modules/nf-core/sentieon/rsemcalculateexpression/tests/nextflow.config +++ b/modules/nf-core/sentieon/rsemcalculateexpression/tests/nextflow.config @@ -14,9 +14,11 @@ process { env { // NOTE This is how pipeline users will use Sentieon in real world use - SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" + // TODO: Update to `env('SENTIEON_LICSRVR_IP')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') // NOTE This should only happen in GitHub actions or nf-core MegaTests - SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" + // TODO: Update to `env('SENTIEON_AUTH_MECH')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA // NOTE This is how pipeline users will test out Sentieon with a license file // nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/modules/nf-core/sentieon/rsempreparereference/main.nf b/modules/nf-core/sentieon/rsempreparereference/main.nf index 28a666850..9acf192ac 100644 --- a/modules/nf-core/sentieon/rsempreparereference/main.nf +++ b/modules/nf-core/sentieon/rsempreparereference/main.nf @@ -15,7 +15,9 @@ process SENTIEON_RSEMPREPAREREFERENCE { output: path "rsem" , emit: index path "*transcripts.fa", emit: transcript_fasta - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('rsem'), eval('rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"'), topic: versions, emit: versions_rsem + tuple val("${task.process}"), val('star'), eval('STAR --version | sed -e "s/STAR_//g"'), topic: versions, emit: versions_star + tuple val("${task.process}"), val('sentieon'), eval('sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"'), topic: versions, emit: versions_sentieon when: task.ext.when == null || task.ext.when @@ -24,14 +26,16 @@ process SENTIEON_RSEMPREPAREREFERENCE { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def args_list = args.tokenize() + def star_symlink = """ + # Create symlink to sentieon in PATH for version detection + ln -sf \$(which sentieon) ./STAR + export PATH=".:\$PATH" + """ if (args_list.contains('--star')) { - args_list.removeIf { it.contains('--star') } + args_list.removeIf { arg -> arg.contains('--star') } def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : '' """ - - # Create symlink to sentieon in PATH - ln -sf \$(which sentieon) ./STAR - export PATH=".:\$PATH" + $star_symlink STAR \\ --runMode genomeGenerate \\ @@ -50,16 +54,11 @@ process SENTIEON_RSEMPREPAREREFERENCE { rsem/genome cp rsem/genome.transcripts.fa . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS """ } else { """ + $star_symlink + rsem-prepare-reference \\ --gtf $gtf \\ --num-threads $task.cpus \\ @@ -68,25 +67,16 @@ process SENTIEON_RSEMPREPAREREFERENCE { rsem/genome cp rsem/genome.transcripts.fa . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS """ } stub: """ - touch genome.transcripts.fa + # Create symlink to sentieon in PATH for version detection + ln -sf \$(which sentieon) ./STAR + export PATH=".:\$PATH" - cat <<-END_VERSIONS > versions.yml - "${task.process}": - rsem: \$(rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g") - star: \$(STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS + mkdir -p rsem + touch genome.transcripts.fa """ } diff --git a/modules/nf-core/sentieon/rsempreparereference/meta.yml b/modules/nf-core/sentieon/rsempreparereference/meta.yml index a05f8e9be..b1fd9268a 100644 --- a/modules/nf-core/sentieon/rsempreparereference/meta.yml +++ b/modules/nf-core/sentieon/rsempreparereference/meta.yml @@ -37,13 +37,67 @@ output: description: Fasta file of transcripts pattern: "rsem/*transcripts.fa" ontologies: [] + versions_rsem: + - - ${task.process}: + type: string + description: The process the versions were collected from + - rsem: + type: string + description: The tool name + - 'rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"': + type: eval + description: The expression to obtain the version of the tool + versions_star: + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - 'STAR --version | sed -e "s/STAR_//g"': + type: eval + description: The expression to obtain the version of the tool + versions_sentieon: + - - ${task.process}: + type: string + description: The process the versions were collected from + - sentieon: + type: string + description: The tool name + - 'sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"': + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - rsem: + type: string + description: The tool name + - 'rsem-calculate-expression --version | sed -e "s/Current version: RSEM v//g"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - 'STAR --version | sed -e "s/STAR_//g"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - sentieon: + type: string + description: The tool name + - 'sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"': + type: eval + description: The expression to obtain the version of the tool + authors: - "@FriederikeHanssen" maintainers: diff --git a/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test b/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test index 0b7387b22..715c3c6ee 100644 --- a/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test +++ b/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test @@ -28,7 +28,7 @@ nextflow_process { { assert snapshot( process.out.index, process.out.transcript_fasta, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } diff --git a/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test.snap b/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test.snap index 84e704e66..115c81d37 100644 --- a/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/rsempreparereference/tests/main.nf.test.snap @@ -11,7 +11,25 @@ "genome.transcripts.fa:md5,d41d8cd98f00b204e9800998ecf8427e" ], "2": [ - "versions.yml:md5,5701c66cf1e2c8475b2903d95df99db5" + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "rsem", + "1.3.1" + ] + ], + "3": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "star", + "2.7.10b" + ] + ], + "4": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "sentieon", + "202503.01" + ] ], "index": [ [ @@ -21,8 +39,26 @@ "transcript_fasta": [ "genome.transcripts.fa:md5,d41d8cd98f00b204e9800998ecf8427e" ], - "versions": [ - "versions.yml:md5,5701c66cf1e2c8475b2903d95df99db5" + "versions_rsem": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "rsem", + "1.3.1" + ] + ], + "versions_sentieon": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "star", + "2.7.10b" + ] ] } ], @@ -50,11 +86,27 @@ "genome.transcripts.fa:md5,050c521a2719c2ae48267c1e65218f29" ], { - "SENTIEON_RSEMPREPAREREFERENCE": { - "rsem": "1.3.1", - "star": null, - "sentieon": 202503.01 - } + "versions_rsem": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "rsem", + "1.3.1" + ] + ], + "versions_sentieon": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_RSEMPREPAREREFERENCE", + "star", + "2.7.10b" + ] + ] } ], "meta": { diff --git a/modules/nf-core/sentieon/rsempreparereference/tests/nextflow.config b/modules/nf-core/sentieon/rsempreparereference/tests/nextflow.config index c1e9e4864..4214d91de 100644 --- a/modules/nf-core/sentieon/rsempreparereference/tests/nextflow.config +++ b/modules/nf-core/sentieon/rsempreparereference/tests/nextflow.config @@ -1,8 +1,10 @@ env { // NOTE This is how pipeline users will use Sentieon in real world use - SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" + // TODO: Update to `env('SENTIEON_LICSRVR_IP')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') // NOTE This should only happen in GitHub actions or nf-core MegaTests - SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" + // TODO: Update to `env('SENTIEON_AUTH_MECH')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA // NOTE This is how pipeline users will test out Sentieon with a license file // nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/modules/nf-core/sentieon/staralign/main.nf b/modules/nf-core/sentieon/staralign/main.nf index 0ae8b9ca0..3eab1b62a 100644 --- a/modules/nf-core/sentieon/staralign/main.nf +++ b/modules/nf-core/sentieon/staralign/main.nf @@ -34,7 +34,8 @@ process SENTIEON_STARALIGN { tuple val(meta), path('*.out.sam'), emit: sam, optional: true tuple val(meta), path('*.wig'), emit: wig, optional: true tuple val(meta), path('*.bg'), emit: bedgraph, optional: true - path "versions.yml", emit: versions + tuple val("${task.process}"), val('star'), eval('sentieon STAR --version | sed -e "s/STAR_//g"'), topic: versions, emit: versions_star + tuple val("${task.process}"), val('sentieon'), eval('sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"'), topic: versions, emit: versions_sentieon when: task.ext.when == null || task.ext.when @@ -44,7 +45,7 @@ process SENTIEON_STARALIGN { prefix = task.ext.prefix ?: "${meta.id}" def reads1 = [] def reads2 = [] - meta.single_end ? [reads].flatten().each { reads1 << it } : reads.eachWithIndex { v, ix -> (ix & 1 ? reads2 : reads1) << v } + meta.single_end ? [reads].flatten().each { r -> reads1 << r } : reads.eachWithIndex { v, ix -> (ix & 1 ? reads2 : reads1) << v } def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile ${gtf}" def seq_platform_arg = seq_platform ? "'PL:${seq_platform}'" : "" def seq_center_arg = seq_center ? "'CN:${seq_center}'" : "" @@ -56,6 +57,8 @@ process SENTIEON_STARALIGN { ? "export SENTIEON_LICENSE=\$(mktemp);echo -e \"${secrets.SENTIEON_LICENSE_BASE64}\" | base64 -d > \$SENTIEON_LICENSE; " : "" """ + $sentieonLicense + sentieon STAR \\ --genomeDir ${index} \\ --readFilesIn ${reads1.join(",")} ${reads2.join(",")} \\ @@ -76,12 +79,6 @@ process SENTIEON_STARALIGN { mv ${prefix}.Unmapped.out.mate2 ${prefix}.unmapped_2.fastq gzip ${prefix}.unmapped_2.fastq fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(sentieon STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS """ stub: @@ -104,11 +101,5 @@ process SENTIEON_STARALIGN { touch ${prefix}.out.sam touch ${prefix}.Signal.UniqueMultiple.str1.out.wig touch ${prefix}.Signal.UniqueMultiple.str1.out.bg - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(sentieon STAR --version | sed -e "s/STAR_//g") - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS """ } diff --git a/modules/nf-core/sentieon/staralign/meta.yml b/modules/nf-core/sentieon/staralign/meta.yml index beda95799..e114c769f 100644 --- a/modules/nf-core/sentieon/staralign/meta.yml +++ b/modules/nf-core/sentieon/staralign/meta.yml @@ -88,13 +88,26 @@ output: description: STAR log progress file pattern: "*Log.progress.out" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + versions_star: + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - 'sentieon STAR --version | sed -e "s/STAR_//g"': + type: eval + description: The expression to obtain the version of the tool + versions_sentieon: + - - ${task.process}: + type: string + description: The process the versions were collected from + - sentieon: + type: string + description: The tool name + - 'sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"': + type: eval + description: The expression to obtain the version of the tool bam: - - meta: type: map @@ -242,6 +255,28 @@ output: description: STAR output bedGraph format file(s) (optional) pattern: "*.bg" ontologies: [] + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - star: + type: string + description: The tool name + - 'sentieon STAR --version | sed -e "s/STAR_//g"': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The process the versions were collected from + - sentieon: + type: string + description: The tool name + - 'sentieon driver --version 2>&1 | sed -e "s/sentieon-genomics-//g"': + type: eval + description: The expression to obtain the version of the tool + authors: - "@FriederikeHanssen" maintainers: diff --git a/modules/nf-core/sentieon/staralign/tests/main.nf.test b/modules/nf-core/sentieon/staralign/tests/main.nf.test index 6516ade21..cc406387c 100644 --- a/modules/nf-core/sentieon/staralign/tests/main.nf.test +++ b/modules/nf-core/sentieon/staralign/tests/main.nf.test @@ -65,7 +65,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } @@ -130,7 +130,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } @@ -194,7 +194,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } @@ -259,7 +259,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } @@ -326,7 +326,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - path(process.out.versions[0]).yaml + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } diff --git a/modules/nf-core/sentieon/staralign/tests/main.nf.test.snap b/modules/nf-core/sentieon/staralign/tests/main.nf.test.snap index 6b976ea28..a00d1b07c 100644 --- a/modules/nf-core/sentieon/staralign/tests/main.nf.test.snap +++ b/modules/nf-core/sentieon/staralign/tests/main.nf.test.snap @@ -75,7 +75,18 @@ ] ], "16": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ], + "17": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] ], "2": [ [ @@ -306,8 +317,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] ], "wig": [ [ @@ -402,7 +424,18 @@ ] ], "16": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ], + "17": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] ], "2": [ [ @@ -633,8 +666,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] ], "wig": [ [ @@ -703,10 +747,20 @@ ], { - "SENTIEON_STARALIGN": { - "star": "2.7.10b", - "sentieon": 202503.01 - } + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ] } ], "meta": { @@ -765,10 +819,20 @@ ], { - "SENTIEON_STARALIGN": { - "star": "2.7.10b", - "sentieon": 202503.01 - } + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ] } ], "meta": { @@ -853,7 +917,18 @@ ] ], "16": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ], + "17": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] ], "2": [ [ @@ -1084,8 +1159,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] ], "wig": [ [ @@ -1180,7 +1266,18 @@ ] ], "16": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ], + "17": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] ], "2": [ [ @@ -1411,8 +1508,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] ], "wig": [ [ @@ -1481,10 +1589,20 @@ ], { - "SENTIEON_STARALIGN": { - "star": "2.7.10b", - "sentieon": 202503.01 - } + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ] } ], "meta": { @@ -1534,10 +1652,20 @@ ], { - "SENTIEON_STARALIGN": { - "star": "2.7.10b", - "sentieon": 202503.01 - } + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ] } ], "meta": { @@ -1586,10 +1714,20 @@ ], { - "SENTIEON_STARALIGN": { - "star": "2.7.10b", - "sentieon": 202503.01 - } + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ] } ], "meta": { @@ -1674,7 +1812,18 @@ ] ], "16": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] + ], + "17": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] ], "2": [ [ @@ -1905,8 +2054,19 @@ ] ] ], - "versions": [ - "versions.yml:md5,59e385f30cd29a68b9ea0791b7343457" + "versions_sentieon": [ + [ + "SENTIEON_STARALIGN", + "sentieon", + "202503.01" + ] + ], + "versions_star": [ + [ + "SENTIEON_STARALIGN", + "star", + "2.7.10b" + ] ], "wig": [ [ diff --git a/modules/nf-core/sentieon/staralign/tests/nextflow.arriba.config b/modules/nf-core/sentieon/staralign/tests/nextflow.arriba.config index f6fccb8fa..980884dea 100644 --- a/modules/nf-core/sentieon/staralign/tests/nextflow.arriba.config +++ b/modules/nf-core/sentieon/staralign/tests/nextflow.arriba.config @@ -12,9 +12,11 @@ process { env { // NOTE This is how pipeline users will use Sentieon in real world use - SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" + // TODO: Update to `env('SENTIEON_LICSRVR_IP')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') // NOTE This should only happen in GitHub actions or nf-core MegaTests - SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" + // TODO: Update to `env('SENTIEON_AUTH_MECH')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA // NOTE This is how pipeline users will test out Sentieon with a license file // nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/modules/nf-core/sentieon/staralign/tests/nextflow.config b/modules/nf-core/sentieon/staralign/tests/nextflow.config index 6c89ce9e0..7c980f5eb 100644 --- a/modules/nf-core/sentieon/staralign/tests/nextflow.config +++ b/modules/nf-core/sentieon/staralign/tests/nextflow.config @@ -12,9 +12,11 @@ process { env { // NOTE This is how pipeline users will use Sentieon in real world use - SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" + // TODO: Update to `env('SENTIEON_LICSRVR_IP')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') // NOTE This should only happen in GitHub actions or nf-core MegaTests - SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" + // TODO: Update to `env('SENTIEON_AUTH_MECH')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA // NOTE This is how pipeline users will test out Sentieon with a license file // nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/modules/nf-core/sentieon/staralign/tests/nextflow.starfusion.config b/modules/nf-core/sentieon/staralign/tests/nextflow.starfusion.config index 39093b5a6..8430eca75 100644 --- a/modules/nf-core/sentieon/staralign/tests/nextflow.starfusion.config +++ b/modules/nf-core/sentieon/staralign/tests/nextflow.starfusion.config @@ -12,9 +12,11 @@ process { env { // NOTE This is how pipeline users will use Sentieon in real world use - SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" + // TODO: Update to `env('SENTIEON_LICSRVR_IP')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') // NOTE This should only happen in GitHub actions or nf-core MegaTests - SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" + // TODO: Update to `env('SENTIEON_AUTH_MECH')` when minimum Nextflow version is >= 26.04.0 + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA // NOTE This is how pipeline users will test out Sentieon with a license file // nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/modules/nf-core/sortmerna/main.nf b/modules/nf-core/sortmerna/main.nf index d63baf236..28c4ab3b9 100644 --- a/modules/nf-core/sortmerna/main.nf +++ b/modules/nf-core/sortmerna/main.nf @@ -16,7 +16,7 @@ process SORTMERNA { tuple val(meta), path("*non_rRNA.fastq.gz"), emit: reads, optional: true tuple val(meta), path("*.log") , emit: log, optional: true tuple val(meta2), path("idx") , emit: index, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('sortmerna'), eval('sortmerna --version 2>&1 | grep -oE "[0-9]+\\.[0-9]+\\.[0-9]+" | head -1'), topic: versions, emit: versions_sortmerna when: task.ext.when == null || task.ext.when @@ -33,11 +33,11 @@ process SORTMERNA { def out2_cmd = '' def mv_cmd = '' def reads_input = '' - def refs_input = '' + def refs_input = (skip_index && index) ? "--idx-dir ${index}" : '' if (! index_only){ reads_args = '--aligned rRNA_reads --fastx --other non_rRNA_reads' - reads_input = paired_end ? reads.collect{"--reads $it"}.join(' ') : "--reads $reads" + reads_input = paired_end ? reads.collect{ r -> "--reads $r"}.join(' ') : "--reads $reads" def n_fastq = paired_end ? reads.size() : 1 if ( n_fastq == 1 ) { mv_cmd = """ @@ -67,11 +67,6 @@ process SORTMERNA { $args $mv_cmd - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS """ stub: @@ -80,13 +75,9 @@ process SORTMERNA { def index_only = args.contains('--index 1')? true : false def paired_end = reads instanceof List - def paired_cmd = '' - def out2_cmd = '' def mv_cmd = '' - def reads_input = '' if (! index_only){ - reads_input = paired_end ? reads.collect{"--reads $it"}.join(' ') : "--reads $reads" def n_fastq = paired_end ? reads.size() : 1 if ( n_fastq == 1 ) { mv_cmd = "echo | gzip > ${prefix}.non_rRNA.fastq.gz" @@ -101,10 +92,5 @@ process SORTMERNA { $mv_cmd mkdir -p idx touch ${prefix}.sortmerna.log - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sortmerna: \$(echo \$(sortmerna --version 2>&1) | sed 's/^.*SortMeRNA version //; s/ Build Date.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/sortmerna/meta.yml b/modules/nf-core/sortmerna/meta.yml index 1862dfcec..bd94d8a68 100644 --- a/modules/nf-core/sortmerna/meta.yml +++ b/modules/nf-core/sortmerna/meta.yml @@ -86,13 +86,29 @@ output: type: directory description: | Path to index directory generated by sortmern + versions_sortmerna: + - - ${task.process}: + type: string + description: The process the versions were collected from + - sortmerna: + type: string + description: The tool name + - sortmerna --version 2>&1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+" | head -1: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - sortmerna: + type: string + description: The tool name + - sortmerna --version 2>&1 | grep -oE "[0-9]+\.[0-9]+\.[0-9]+" | head -1: + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" - "@mashehu" diff --git a/modules/nf-core/sortmerna/nextflow.config b/modules/nf-core/sortmerna/nextflow.config index 953da5a39..2ce5dc579 100644 --- a/modules/nf-core/sortmerna/nextflow.config +++ b/modules/nf-core/sortmerna/nextflow.config @@ -1,20 +1,18 @@ -if (params.remove_ribo_rna) { - process { - withName: 'SORTMERNA' { - ext.args = '--num_alignments 1 -v --index 0' - publishDir = [ - [ - path: { "${params.outdir}/sortmerna" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_non_ribo_reads ? it : null } - ] +process { + withName: 'SORTMERNA' { + ext.args = '--num_alignments 1 -v --index 0' + publishDir = [ + [ + path: { "${params.outdir}/sortmerna" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_non_ribo_reads ? filename : null } ] - } + ] } -} \ No newline at end of file +} diff --git a/modules/nf-core/sortmerna/tests/main.nf.test b/modules/nf-core/sortmerna/tests/main.nf.test index a228b5996..4f6dc5789 100644 --- a/modules/nf-core/sortmerna/tests/main.nf.test +++ b/modules/nf-core/sortmerna/tests/main.nf.test @@ -29,7 +29,7 @@ nextflow_process { { assert ! process.out.reads }, { assert snapshot( file(process.out.index[0][1]).listFiles().findAll { !it.name.endsWith(".stats") }.sort { it.name }, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) } @@ -58,7 +58,7 @@ nextflow_process { { assert process.success }, { assert ! process.out.reads }, { assert snapshot(process.out.index).match("index_only_stub") }, - { assert snapshot(process.out.versions).match("versions_index_only_stub") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_index_only_stub") } ) } @@ -97,7 +97,7 @@ nextflow_process { { assert snapshot( file(process.out.index[0][1]).listFiles().findAll { !it.name.endsWith(".stats") }.sort { it.name } ).match("index_single_end")}, - { assert snapshot(process.out.versions).match("versions_single_end") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_single_end") } ) } @@ -134,7 +134,7 @@ nextflow_process { ).match("sarscov2 single_end-for_stub_match") }, { assert snapshot(process.out.index).match("index_single_end_stub") }, - { assert snapshot(process.out.versions).match("versions_single_end_stub") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_single_end_stub") } ) } @@ -177,7 +177,7 @@ nextflow_process { { assert snapshot( file(process.out.index[0][1]).listFiles().findAll { !it.name.endsWith(".stats") }.sort { it.name } ).match("index_paired_end") }, - { assert snapshot(process.out.versions).match("versions_paired_end") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_paired_end") } ) } @@ -218,7 +218,7 @@ nextflow_process { ).match("sarscov2 paired_end-for_stub_match") }, { assert snapshot(process.out.index).match("index_paired_end_stub") }, - { assert snapshot(process.out.versions).match("versions_paired_end_stub") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_paired_end_stub") } ) } @@ -275,7 +275,7 @@ nextflow_process { { assert snapshot( file(process.out.index[0][1]).listFiles().findAll { !it.name.endsWith(".stats") }.sort{ it.name } ).match("index_single_end_premade_index") }, - { assert snapshot(process.out.versions).match("versions_single_end_premade_index") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_single_end_premade_index") } ) } } @@ -329,7 +329,7 @@ nextflow_process { ).match("sarscov2 single_end_premade_index_match_stub") }, { assert snapshot(process.out.index).match("index_single_end_premade_index_stub") }, - { assert snapshot(process.out.versions).match("versions_single_end_premade_index_stub") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions_single_end_premade_index_stub") } ) } } diff --git a/modules/nf-core/sortmerna/tests/main.nf.test.snap b/modules/nf-core/sortmerna/tests/main.nf.test.snap index ee2b46795..1b27283ad 100644 --- a/modules/nf-core/sortmerna/tests/main.nf.test.snap +++ b/modules/nf-core/sortmerna/tests/main.nf.test.snap @@ -1,15 +1,21 @@ { "versions_paired_end_stub": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:48:08.251216694" + "timestamp": "2026-01-19T17:23:41.371837471" }, "index_paired_end_stub": { "content": [ @@ -32,27 +38,39 @@ }, "versions_paired_end": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:47:57.934896622" + "timestamp": "2026-01-19T17:23:35.889332842" }, "versions_single_end_stub": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:47:46.144044374" + "timestamp": "2026-01-19T17:23:29.270369464" }, "sarscov2 single_end_match": { "content": [ @@ -103,15 +121,21 @@ }, "versions_single_end_premade_index": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:48:20.839706567" + "timestamp": "2026-01-19T17:23:48.659750701" }, "sarscov2 paired_end-for_stub_match": { "content": [ @@ -137,15 +161,21 @@ "2415186086593376314.kmer_0.dat:md5,4a0bcb71b120f6a6949b7969292ef2e7", "2415186086593376314.pos_0.dat:md5,bc2875e4cc4017707306565e396839ef" ], - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-06-03T09:42:00.868287579" + "timestamp": "2026-01-19T17:23:11.933438391" }, "index_paired_end": { "content": [ @@ -208,27 +238,39 @@ }, "versions_single_end": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:47:35.26956893" + "timestamp": "2026-01-19T17:23:23.954370601" }, "versions_single_end_premade_index_stub": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:48:32.170638722" + "timestamp": "2026-01-19T17:23:54.679653966" }, "index_single_end_stub": { "content": [ @@ -251,15 +293,21 @@ }, "versions_index_only_stub": { "content": [ - [ - "versions.yml:md5,1ba8f45ec168b6ebfceb9d4a4203f655" - ] + { + "versions_sortmerna": [ + [ + "SORTMERNA", + "sortmerna", + "4.3.7" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-05-27T16:47:23.422761188" + "timestamp": "2026-01-19T17:23:17.3325412" }, "index_single_end_premade_index_stub": { "content": [ diff --git a/modules/nf-core/stringtie/stringtie/nextflow.config b/modules/nf-core/stringtie/stringtie/nextflow.config index abc40e2ce..6048a28e0 100644 --- a/modules/nf-core/stringtie/stringtie/nextflow.config +++ b/modules/nf-core/stringtie/stringtie/nextflow.config @@ -1,15 +1,13 @@ -if (!params.skip_stringtie) { - process { - withName: 'STRINGTIE_STRINGTIE' { - ext.args = { [ - '-v', - params.stringtie_ignore_gtf ? '' : '-e' - ].join(' ').trim() } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/stringtie" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: 'STRINGTIE_STRINGTIE' { + ext.args = { [ + '-v', + params.stringtie_ignore_gtf ? '' : '-e' + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/stringtie" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/modules/nf-core/subread/featurecounts/nextflow.config b/modules/nf-core/subread/featurecounts/nextflow.config index b86d1b8e5..f94e42133 100644 --- a/modules/nf-core/subread/featurecounts/nextflow.config +++ b/modules/nf-core/subread/featurecounts/nextflow.config @@ -1,26 +1,22 @@ -if (!params.skip_qc) { - if (!params.skip_biotype_qc && params.featurecounts_group_type) { - process { - withName: 'SUBREAD_FEATURECOUNTS' { - ext.args = { [ - '-B -C', - params.gencode ? "-g gene_type" : "-g $params.featurecounts_group_type", - "-t $params.featurecounts_feature_type" - ].join(' ').trim() } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: 'SUBREAD_FEATURECOUNTS' { + ext.args = { [ + '-B -C', + params.gencode ? "-g gene_type" : "-g $params.featurecounts_group_type", + "-t $params.featurecounts_feature_type" + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: 'MULTIQC_CUSTOM_BIOTYPE' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } + withName: 'MULTIQC_CUSTOM_BIOTYPE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/modules/nf-core/sylph/profile/environment.yml b/modules/nf-core/sylph/profile/environment.yml index ae8337cc8..9b3d985e7 100644 --- a/modules/nf-core/sylph/profile/environment.yml +++ b/modules/nf-core/sylph/profile/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::sylph=0.7.0 + - bioconda::sylph=0.9.0 diff --git a/modules/nf-core/sylph/profile/main.nf b/modules/nf-core/sylph/profile/main.nf index 1231bab39..c96f1cf5e 100644 --- a/modules/nf-core/sylph/profile/main.nf +++ b/modules/nf-core/sylph/profile/main.nf @@ -1,19 +1,19 @@ process SYLPH_PROFILE { - tag "$meta.id" + tag "${meta.id}" label 'process_high' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sylph:0.7.0--h919a2d8_0' : - 'biocontainers/sylph:0.7.0--h919a2d8_0' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/sylph:0.9.0--ha6fb395_0' + : 'biocontainers/sylph:0.9.0--ha6fb395_0'}" input: tuple val(meta), path(reads) - path(database) + path database output: tuple val(meta), path('*.tsv'), emit: profile_out - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('sylph'), eval('sylph -V | awk "{print \$2}"'), topic: versions, emit: versions_sylph when: task.ext.when == null || task.ext.when @@ -24,28 +24,16 @@ process SYLPH_PROFILE { def input = meta.single_end ? "${reads}" : "-1 ${reads[0]} -2 ${reads[1]}" """ sylph profile \\ - -t $task.cpus \\ - $args \\ - $database\\ - $input \\ + -t ${task.cpus} \\ + ${args} \\ + ${database}\\ + ${input} \\ -o ${prefix}.tsv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sylph: \$(sylph -V | awk '{print \$2}') - END_VERSIONS """ stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input = meta.single_end ? "${reads}" : "-1 ${reads[0]} -2 ${reads[1]}" """ touch ${prefix}.tsv - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sylph: \$(sylph -V | awk '{print \$2}') - END_VERSIONS """ - } diff --git a/modules/nf-core/sylph/profile/meta.yml b/modules/nf-core/sylph/profile/meta.yml index c78b0f33c..bf33d4d19 100644 --- a/modules/nf-core/sylph/profile/meta.yml +++ b/modules/nf-core/sylph/profile/meta.yml @@ -45,13 +45,29 @@ output: and ANIs. pattern: "*tsv" ontologies: [] + versions_sylph: + - - ${task.process}: + type: string + description: The process the versions were collected from + - sylph: + type: string + description: The tool name + - sylph -V | awk "{print \$2}": + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - sylph: + type: string + description: The tool name + - sylph -V | awk "{print \$2}": + type: eval + description: The expression to obtain the version of the tool + authors: - "@jiahang1234" - "@sofstam" diff --git a/modules/nf-core/sylph/profile/nextflow.config b/modules/nf-core/sylph/profile/nextflow.config index e781837d4..ffb139464 100644 --- a/modules/nf-core/sylph/profile/nextflow.config +++ b/modules/nf-core/sylph/profile/nextflow.config @@ -1,16 +1,12 @@ -if (!params.skip_qc) { - if (params.contaminant_screening in ['sylph']) { - process { - withName: 'SYLPH_PROFILE' { - // -c 100 is recommended compression for reads - // -u option provides information on unknown reads, but this does not appear in the sylph-tax MultiQC output - // See https://sylph-docs.github.io/sylph-cookbook/ for full details - ext.args = "-c 100 -u" - publishDir = [ - path: { "${params.outdir}/${params.aligner}/contaminants/sylph" }, - mode: params.publish_dir_mode - ] - } - } +process { + withName: 'SYLPH_PROFILE' { + // -c 100 is recommended compression for reads + // -u option provides information on unknown reads, but this does not appear in the sylph-tax MultiQC output + // See https://sylph-docs.github.io/sylph-cookbook/ for full details + ext.args = "-c 100 -u" + publishDir = [ + path: { "${params.outdir}/${params.aligner}/contaminants/sylph" }, + mode: params.publish_dir_mode + ] } } diff --git a/modules/nf-core/sylph/profile/tests/main.nf.test b/modules/nf-core/sylph/profile/tests/main.nf.test index cfdddf685..4728d0dff 100644 --- a/modules/nf-core/sylph/profile/tests/main.nf.test +++ b/modules/nf-core/sylph/profile/tests/main.nf.test @@ -25,7 +25,7 @@ nextflow_process { then { assert process.success assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, file(process.out.profile_out[0][1]).readLines()[0] ).match() } @@ -49,7 +49,7 @@ nextflow_process { then { assert process.success assert snapshot( - process.out.versions, + process.out.findAll { key, val -> key.startsWith("versions") }, file(process.out.profile_out[0][1]).readLines()[0] ).match() } diff --git a/modules/nf-core/sylph/profile/tests/main.nf.test.snap b/modules/nf-core/sylph/profile/tests/main.nf.test.snap index 5541ce615..61f9edd75 100644 --- a/modules/nf-core/sylph/profile/tests/main.nf.test.snap +++ b/modules/nf-core/sylph/profile/tests/main.nf.test.snap @@ -1,29 +1,41 @@ { "sarscov2 illumina paired-end [fastq_gz]": { "content": [ - [ - "versions.yml:md5,7b5a545483277cc0ff9189f8891e737f" - ], + { + "versions_sylph": [ + [ + "SYLPH_PROFILE", + "sylph", + "sylph 0.9.0" + ] + ] + }, "Sample_file\tGenome_file\tTaxonomic_abundance\tSequence_abundance\tAdjusted_ANI\tEff_cov\tANI_5-95_percentile\tEff_lambda\tLambda_5-95_percentile\tMedian_cov\tMean_cov_geq1\tContainment_ind\tNaive_ANI\tkmers_reassigned\tContig_name" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-03-05T11:07:00.061876287" + "timestamp": "2026-01-19T13:53:39.426666755" }, "sarscov2 illumina single-end [fastq_gz]": { "content": [ - [ - "versions.yml:md5,7b5a545483277cc0ff9189f8891e737f" - ], + { + "versions_sylph": [ + [ + "SYLPH_PROFILE", + "sylph", + "sylph 0.9.0" + ] + ] + }, "Sample_file\tGenome_file\tTaxonomic_abundance\tSequence_abundance\tAdjusted_ANI\tEff_cov\tANI_5-95_percentile\tEff_lambda\tLambda_5-95_percentile\tMedian_cov\tMean_cov_geq1\tContainment_ind\tNaive_ANI\tkmers_reassigned\tContig_name" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-03-05T11:05:21.230604092" + "timestamp": "2026-01-19T13:53:34.383249183" }, "sarscov2 illumina paired-end [fastq_gz]-stub": { "content": [ @@ -37,7 +49,11 @@ ] ], "1": [ - "versions.yml:md5,7b5a545483277cc0ff9189f8891e737f" + [ + "SYLPH_PROFILE", + "sylph", + "sylph 0.9.0" + ] ], "profile_out": [ [ @@ -47,15 +63,19 @@ "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,7b5a545483277cc0ff9189f8891e737f" + "versions_sylph": [ + [ + "SYLPH_PROFILE", + "sylph", + "sylph 0.9.0" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-03-05T11:08:35.882851964" + "timestamp": "2026-01-19T13:53:44.570456167" } } \ No newline at end of file diff --git a/modules/nf-core/sylphtax/taxprof/nextflow.config b/modules/nf-core/sylphtax/taxprof/nextflow.config index 3837f70ce..7185e0b75 100644 --- a/modules/nf-core/sylphtax/taxprof/nextflow.config +++ b/modules/nf-core/sylphtax/taxprof/nextflow.config @@ -1,12 +1,8 @@ -if (!params.skip_qc) { - if (params.contaminant_screening in ['sylph']) { - process { - withName: 'SYLPHTAX_TAXPROF' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/contaminants/sylph" }, - mode: params.publish_dir_mode - ] - } - } +process { + withName: 'SYLPHTAX_TAXPROF' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/contaminants/sylph" }, + mode: params.publish_dir_mode + ] } } diff --git a/modules/nf-core/trimgalore/main.nf b/modules/nf-core/trimgalore/main.nf index 7372e720b..5790b5207 100644 --- a/modules/nf-core/trimgalore/main.nf +++ b/modules/nf-core/trimgalore/main.nf @@ -44,7 +44,7 @@ process TRIMGALORE { def prefix = task.ext.prefix ?: "${meta.id}" if (meta.single_end) { def args_list = args.split("\\s(?=--)").toList() - args_list.removeAll { it.toLowerCase().contains('_r2 ') } + args_list.removeAll { arg -> arg.toLowerCase().contains('_r2 ') } """ [ ! -f ${prefix}.fastq.gz ] && ln -s ${reads} ${prefix}.fastq.gz trim_galore \\ diff --git a/modules/nf-core/ucsc/bedclip/main.nf b/modules/nf-core/ucsc/bedclip/main.nf index d3e09dc11..2e54667ba 100755 --- a/modules/nf-core/ucsc/bedclip/main.nf +++ b/modules/nf-core/ucsc/bedclip/main.nf @@ -2,7 +2,6 @@ process UCSC_BEDCLIP { tag "$meta.id" label 'process_medium' - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ucsc-bedclip:377--h0b8a92a_2' : @@ -14,7 +13,7 @@ process UCSC_BEDCLIP { output: tuple val(meta), path("*.bedGraph"), emit: bedgraph - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('ucsc'), eval("echo $VERSION"), topic: versions, emit: versions_ucsc when: task.ext.when == null || task.ext.when @@ -22,28 +21,19 @@ process UCSC_BEDCLIP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ bedClip \\ + $args \\ $bedgraph \\ $sizes \\ ${prefix}.bedGraph - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc: $VERSION - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + VERSION = '377' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ touch ${prefix}.bedGraph - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc: $VERSION - END_VERSIONS """ } diff --git a/modules/nf-core/ucsc/bedclip/meta.yml b/modules/nf-core/ucsc/bedclip/meta.yml index 951f9b0d3..4544a7623 100644 --- a/modules/nf-core/ucsc/bedclip/meta.yml +++ b/modules/nf-core/ucsc/bedclip/meta.yml @@ -37,13 +37,29 @@ output: description: bedGraph file pattern: "*.{bedgraph}" ontologies: [] + versions_ucsc: + - - ${task.process}: + type: string + description: The process the versions were collected from + - ucsc: + type: string + description: The tool name + - echo $VERSION: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - ucsc: + type: string + description: The tool name + - echo $VERSION: + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/ucsc/bedclip/tests/main.nf.test.snap b/modules/nf-core/ucsc/bedclip/tests/main.nf.test.snap index 77e893808..8ae98caff 100644 --- a/modules/nf-core/ucsc/bedclip/tests/main.nf.test.snap +++ b/modules/nf-core/ucsc/bedclip/tests/main.nf.test.snap @@ -12,7 +12,11 @@ ] ], "1": [ - "versions.yml:md5,b92248ce2a138ad4d146ac0d9e71fb34" + [ + "UCSC_BEDCLIP", + "ucsc", + "377" + ] ], "bedgraph": [ [ @@ -23,16 +27,20 @@ "test.clip.bedGraph:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,b92248ce2a138ad4d146ac0d9e71fb34" + "versions_ucsc": [ + [ + "UCSC_BEDCLIP", + "ucsc", + "377" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-06-21T10:31:42.86304" + "timestamp": "2026-01-19T14:08:43.009868476" }, "sarscov2": { "content": [ @@ -47,7 +55,11 @@ ] ], "1": [ - "versions.yml:md5,b92248ce2a138ad4d146ac0d9e71fb34" + [ + "UCSC_BEDCLIP", + "ucsc", + "377" + ] ], "bedgraph": [ [ @@ -58,15 +70,19 @@ "test.clip.bedGraph:md5,e02395e1f7c593b3f79563067159ebc2" ] ], - "versions": [ - "versions.yml:md5,b92248ce2a138ad4d146ac0d9e71fb34" + "versions_ucsc": [ + [ + "UCSC_BEDCLIP", + "ucsc", + "377" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-02-07T16:04:04.165478" + "timestamp": "2026-01-19T14:08:37.884007523" } } \ No newline at end of file diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf index 81cdee953..f5bd3d521 100644 --- a/modules/nf-core/ucsc/bedgraphtobigwig/main.nf +++ b/modules/nf-core/ucsc/bedgraphtobigwig/main.nf @@ -2,7 +2,6 @@ process UCSC_BEDGRAPHTOBIGWIG { tag "$meta.id" label 'process_single' - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/ucsc-bedgraphtobigwig:469--h9b8f530_0' : @@ -14,7 +13,7 @@ process UCSC_BEDGRAPHTOBIGWIG { output: tuple val(meta), path("*.bigWig"), emit: bigwig - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('ucsc'), eval("echo $VERSION"), topic: versions, emit: versions_ucsc when: task.ext.when == null || task.ext.when @@ -22,28 +21,19 @@ process UCSC_BEDGRAPHTOBIGWIG { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '469' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + VERSION = '469' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ bedGraphToBigWig \\ + $args \\ $bedgraph \\ $sizes \\ ${prefix}.bigWig - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc: $VERSION - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '469' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + VERSION = '469' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. """ touch ${prefix}.bigWig - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ucsc: $VERSION - END_VERSIONS """ } diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml index 33bf8caf4..53d99c55d 100755 --- a/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml +++ b/modules/nf-core/ucsc/bedgraphtobigwig/meta.yml @@ -41,13 +41,29 @@ output: description: bigWig file pattern: "*.{bigWig}" ontologies: [] + versions_ucsc: + - - ${task.process}: + type: string + description: The process the versions were collected from + - ucsc: + type: string + description: The tool name + - echo $VERSION: + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - ucsc: + type: string + description: The tool name + - echo $VERSION: + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/tests/main.nf.test.snap b/modules/nf-core/ucsc/bedgraphtobigwig/tests/main.nf.test.snap index 7c731f651..8da5bd01a 100644 --- a/modules/nf-core/ucsc/bedgraphtobigwig/tests/main.nf.test.snap +++ b/modules/nf-core/ucsc/bedgraphtobigwig/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,db26514184acfdf220bb2f061382cf8c" + [ + "UCSC_BEDGRAPHTOBIGWIG", + "ucsc", + "469" + ] ], "bigwig": [ [ @@ -21,16 +25,20 @@ "test.bigWig:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,db26514184acfdf220bb2f061382cf8c" + "versions_ucsc": [ + [ + "UCSC_BEDGRAPHTOBIGWIG", + "ucsc", + "469" + ] ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:47:58.558813949" + "timestamp": "2026-01-19T14:08:59.289945641" }, "Should run without failures": { "content": [ @@ -44,7 +52,11 @@ ] ], "1": [ - "versions.yml:md5,db26514184acfdf220bb2f061382cf8c" + [ + "UCSC_BEDGRAPHTOBIGWIG", + "ucsc", + "469" + ] ], "bigwig": [ [ @@ -54,15 +66,19 @@ "test.bigWig:md5,910ecc7f57e3bbd5fac5a8edba4f615d" ] ], - "versions": [ - "versions.yml:md5,db26514184acfdf220bb2f061382cf8c" + "versions_ucsc": [ + [ + "UCSC_BEDGRAPHTOBIGWIG", + "ucsc", + "469" + ] ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:47:36.476844229" + "timestamp": "2026-01-19T14:08:54.132930562" } } \ No newline at end of file diff --git a/nf-test.config b/nf-test.config index 7b871be9c..b5c9a880f 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,24 +1,24 @@ config { // location for all nf-test tests - testsDir "." + testsDir = "." // nf-test directory including temporary files for each test - workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + workDir = System.getenv("NFT_WORKDIR") ?: ".nf-test" // location of an optional nextflow.config file specific for executing tests - configFile "tests/nextflow.config" + configFile = "tests/nextflow.config" // ignore tests coming from the nf-core/modules repo // Also ignore sentieon tests when SKIP_SENTIEON env var is set (forks/ARM) - ignore System.getenv("SKIP_SENTIEON") == "true" + ignore = System.getenv("SKIP_SENTIEON") == "true" ? ['modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*', 'tests/sentieon_default.nf.test', 'subworkflows/local/align_star/tests/main.sentieon.nf.test', 'subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test'] : ['modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*'] // run all test with defined profile(s) from the main nextflow.config - profile "test" + profile = "test" // list of filenames or patterns that should be trigger a full test run - triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore', 'modules.json' + triggers = ['nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore', 'modules.json'] // load the necessary plugins plugins { diff --git a/subworkflows/local/align_star/main.nf b/subworkflows/local/align_star/main.nf index 35113457a..16fb0efac 100644 --- a/subworkflows/local/align_star/main.nf +++ b/subworkflows/local/align_star/main.nf @@ -10,7 +10,7 @@ include { BAM_SORT_STATS_SAMTOOLS } from '../../nf-core/bam_so // // Function that parses and returns the alignment rate from the STAR log output // -def getStarPercentMapped(params, align_log) { +def getStarPercentMapped(_params, align_log) { def percent_aligned = 0 def pattern = /Uniquely mapped reads %\s*\|\s*([\d\.]+)%/ align_log.eachLine { line -> @@ -37,7 +37,7 @@ workflow ALIGN_STAR { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Map reads with STAR @@ -47,16 +47,19 @@ workflow ALIGN_STAR { SENTIEON_STAR_ALIGN(reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center) ch_star_out = SENTIEON_STAR_ALIGN + // SENTIEON_STAR_ALIGN uses topic-based version reporting } else if (is_aws_igenome) { STAR_ALIGN_IGENOMES(reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center) ch_star_out = STAR_ALIGN_IGENOMES + ch_versions = ch_versions.mix(STAR_ALIGN_IGENOMES.out.versions.first()) } else { STAR_ALIGN(reads, index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center) ch_star_out = STAR_ALIGN + ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) } @@ -68,7 +71,6 @@ workflow ALIGN_STAR { ch_bam_transcript = ch_star_out.out.bam_transcript ch_fastq = ch_star_out.out.fastq ch_tab = ch_star_out.out.tab - ch_versions = ch_versions.mix(ch_star_out.out.versions.first()) ch_percent_mapped = ch_log_final.map { meta, log -> [ meta, getStarPercentMapped(params, log) ] } // diff --git a/subworkflows/local/align_star/nextflow.config b/subworkflows/local/align_star/nextflow.config index 41626bc7c..07e697a41 100644 --- a/subworkflows/local/align_star/nextflow.config +++ b/subworkflows/local/align_star/nextflow.config @@ -1,111 +1,127 @@ -def generateStarAlignArgs(save_unaligned, contaminant_screening, extra_star_align_args, quantifier = 'salmon') { - def argsToMap = { String args -> - args.split(/\s(?=--)/).collectEntries { - def parts = it.trim().split(/\s+/, 2) - [(parts[0]): parts.size() > 1 ? parts[1] : ''] - } - } +process { - // Common args between pipeline and RSEM - def base_args = """ - --quantMode TranscriptomeSAM - --outSAMtype BAM Unsorted - --outSAMattributes NH HI AS NM MD - --readFilesCommand zcat - """.trim() + // STAR alignment configuration + // Conditionals for when these processes run are handled in the workflow - // Add quantifier-specific args - if (quantifier == 'rsem') { - // RSEM-compatible configuration - base_args += " " + """ - --outSAMunmapped Within - --outFilterType BySJout - --outFilterMultimapNmax 20 - --outFilterMismatchNmax 999 - --outFilterMismatchNoverLmax 0.04 - --alignIntronMin 20 - --alignIntronMax 1000000 - --alignMatesGapMax 1000000 - --alignSJoverhangMin 8 - --alignSJDBoverhangMin 1 - --sjdbScore 1 - """.trim() - } else { - // Standard pipeline configuration - base_args += " " + """ - --twopassMode Basic - --runRNGseed 0 - --outFilterMultimapNmax 20 - --alignSJDBoverhangMin 1 - --outSAMstrandField intronMotif - """.trim() - } + withName: '.*:ALIGN_STAR:STAR_ALIGN' { + ext.args = { + def quantifier = params.aligner == 'star_rsem' ? 'rsem' : 'salmon' + + // Common args + def args = [ + '--quantMode TranscriptomeSAM', + '--outSAMtype BAM Unsorted', + '--outSAMattributes NH HI AS NM MD', + '--readFilesCommand zcat' + ] + + // Add quantifier-specific args + if (quantifier == 'rsem') { + args += [ + '--outSAMunmapped Within', + '--outFilterType BySJout', + '--outFilterMultimapNmax 20', + '--outFilterMismatchNmax 999', + '--outFilterMismatchNoverLmax 0.04', + '--alignIntronMin 20', + '--alignIntronMax 1000000', + '--alignMatesGapMax 1000000', + '--alignSJoverhangMin 8', + '--alignSJDBoverhangMin 1', + '--sjdbScore 1' + ] + } else { + args += [ + '--twopassMode Basic', + '--runRNGseed 0', + '--outFilterMultimapNmax 20', + '--alignSJDBoverhangMin 1', + '--outSAMstrandField intronMotif', + '--quantTranscriptomeSAMoutput BanSingleEnd' + ] + } + + if (params.save_unaligned || params.contaminant_screening) { + args += ['--outReadsUnmapped Fastx'] + } + + if (params.extra_star_align_args) { + args += [params.extra_star_align_args] + } - if (save_unaligned || contaminant_screening) { - base_args += " --outReadsUnmapped Fastx" + args.join(' ') + } } - def final_args_map = argsToMap(base_args) + (extra_star_align_args ? argsToMap(extra_star_align_args) : [:]) - final_args_map.collect { key, value -> "${key} ${value}".trim() }.join(' ') -} + withName: '.*:ALIGN_STAR:STAR_ALIGN_IGENOMES|.*:ALIGN_STAR:SENTIEON_STAR_ALIGN' { + ext.args = { + def quantifier = params.aligner == 'star_rsem' ? 'rsem' : 'salmon' -if (!params.skip_alignment && (params.aligner == 'star_salmon' || params.aligner == 'star_rsem')) { - process { + // Common args + def args = [ + '--quantMode TranscriptomeSAM', + '--outSAMtype BAM Unsorted', + '--outSAMattributes NH HI AS NM MD', + '--readFilesCommand zcat' + ] - // We have to condition this, because the args are slightly different between the latest STAR and the one compatible with iGenomes - // The Sentieon implementation also uses the older arguments version + // Add quantifier-specific args + if (quantifier == 'rsem') { + args += [ + '--outSAMunmapped Within', + '--outFilterType BySJout', + '--outFilterMultimapNmax 20', + '--outFilterMismatchNmax 999', + '--outFilterMismatchNoverLmax 0.04', + '--alignIntronMin 20', + '--alignIntronMax 1000000', + '--alignMatesGapMax 1000000', + '--alignSJoverhangMin 8', + '--alignSJDBoverhangMin 1', + '--sjdbScore 1' + ] + } else { + args += [ + '--twopassMode Basic', + '--runRNGseed 0', + '--outFilterMultimapNmax 20', + '--alignSJDBoverhangMin 1', + '--outSAMstrandField intronMotif', + '--quantTranscriptomeBan Singleend' + ] + } - withName: '.*:ALIGN_STAR:STAR_ALIGN' { - ext.args = { - def quantifier = params.aligner == 'star_rsem' ? 'rsem' : 'salmon' - def extra_args = params.extra_star_align_args ?: '' - if (quantifier == 'salmon') { - extra_args += ' --quantTranscriptomeSAMoutput BanSingleEnd' - } - generateStarAlignArgs( - params.save_unaligned, - params.contaminant_screening, - extra_args, - quantifier - ) + if (params.save_unaligned || params.contaminant_screening) { + args += ['--outReadsUnmapped Fastx'] } - } - withName: '.*:ALIGN_STAR:STAR_ALIGN_IGENOMES|.*:ALIGN_STAR:SENTIEON_STAR_ALIGN' { - ext.args = { - def quantifier = params.aligner == 'star_rsem' ? 'rsem' : 'salmon' - def extra_args = params.extra_star_align_args ?: '' - if (quantifier == 'salmon') { - extra_args += ' --quantTranscriptomeBan Singleend' - } - generateStarAlignArgs( - params.save_unaligned, - params.contaminant_screening, - extra_args, - quantifier - ) + + if (params.extra_star_align_args) { + args += [params.extra_star_align_args] } + + args.join(' ') } - withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES|.*:ALIGN_STAR:SENTIEON_STAR_ALIGN' { + } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: '*.{out,tab}' - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_unaligned ? it : null } - ] + withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES|.*:ALIGN_STAR:SENTIEON_STAR_ALIGN' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: '*.{out,tab}' + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds ? filename : null } + ], + [ + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { filename -> params.save_unaligned ? filename : null } ] - } + ] } } diff --git a/subworkflows/local/align_star/tests/main.sentieon.nf.test b/subworkflows/local/align_star/tests/main.sentieon.nf.test index 0bd3e410d..c886c92b7 100644 --- a/subworkflows/local/align_star/tests/main.sentieon.nf.test +++ b/subworkflows/local/align_star/tests/main.sentieon.nf.test @@ -3,7 +3,7 @@ nextflow_workflow { name "Test Subworkflow ALIGN_STAR - Sentieon" script "../main.nf" workflow "ALIGN_STAR" - config "./nextflow.config" + config "./sentieon.config" test("sentieon star - no igenomes") { tag "sentieon" diff --git a/subworkflows/local/align_star/tests/main.sentieon.nf.test.snap b/subworkflows/local/align_star/tests/main.sentieon.nf.test.snap index 18f75e472..0a4a5a945 100644 --- a/subworkflows/local/align_star/tests/main.sentieon.nf.test.snap +++ b/subworkflows/local/align_star/tests/main.sentieon.nf.test.snap @@ -58,7 +58,6 @@ ] ], [ - "versions.yml:md5,197c344a2f90a1bcff15ddc1b927d738", "versions.yml:md5,9cd9b324968896fdc5b73426d7427930", "versions.yml:md5,a52502c04d4db8ae4a0882b9fbbe30e0", "versions.yml:md5,f21f8f18b50461bcd4b56352d9d35365" @@ -192,7 +191,6 @@ ] ], [ - "versions.yml:md5,197c344a2f90a1bcff15ddc1b927d738", "versions.yml:md5,9cd9b324968896fdc5b73426d7427930", "versions.yml:md5,a52502c04d4db8ae4a0882b9fbbe30e0", "versions.yml:md5,f21f8f18b50461bcd4b56352d9d35365" diff --git a/subworkflows/local/align_star/tests/nextflow.config b/subworkflows/local/align_star/tests/nextflow.config index 7304ade5f..2a620e06f 100644 --- a/subworkflows/local/align_star/tests/nextflow.config +++ b/subworkflows/local/align_star/tests/nextflow.config @@ -10,18 +10,3 @@ process { // Fix chown issue for the output star folder docker.runOptions = '-u $(id -u):$(id -g)' - -// NOTE This is how pipeline users will use Sentieon in real world use -if (System.getenv('SENTIEON_LICSRVR_IP')) { - env.SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" -} -//NOTE This should only happen in GitHub actions or nf-core MegaTests -if (System.getenv('SENTIEON_AUTH_MECH')) { - env.SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" -} -if (secrets.SENTIEON_AUTH_DATA) { - env.SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA -} - -// NOTE This is how pipeline users will test out Sentieon with a license file -// nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/subworkflows/local/align_star/tests/sentieon.config b/subworkflows/local/align_star/tests/sentieon.config new file mode 100644 index 000000000..4cb9bc29d --- /dev/null +++ b/subworkflows/local/align_star/tests/sentieon.config @@ -0,0 +1,19 @@ +process { + withName: 'STAR_GENOMEGENERATE.*' { + ext.args = '--genomeSAindexNbases 9' + } + + withName: '.*STAR_ALIGN.*' { + ext.args = '--readFilesCommand zcat --outSAMtype BAM SortedByCoordinate --outWigType bedGraph --outWigStrand Unstranded' + } +} + +// Fix chown issue for the output star folder +docker.runOptions = '-u $(id -u):$(id -g)' + +env { + // Sentieon environment configuration + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') + SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA +} diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 6efe66e4a..5b91d82f1 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -69,29 +69,26 @@ workflow PREPARE_GENOME { main: // Versions collector - ch_versions = Channel.empty() + ch_versions = channel.empty() //--------------------------- // 1) Uncompress GTF or GFF -> GTF //--------------------------- - ch_gtf = Channel.empty() + ch_gtf = channel.empty() if (gtf) { if (gtf.endsWith('.gz')) { - ch_gtf = GUNZIP_GTF ([ [:], file(gtf, checkIfExists: true) ]).gunzip.map { it[1] } - ch_versions = ch_versions.mix(GUNZIP_GTF.out.versions) + ch_gtf = GUNZIP_GTF ([ [:], file(gtf, checkIfExists: true) ]).gunzip.map { tuple -> tuple[1] } } else { - ch_gtf = Channel.value(file(gtf, checkIfExists: true)) + ch_gtf = channel.value(file(gtf, checkIfExists: true)) } } else if (gff) { def ch_gff if (gff.endsWith('.gz')) { ch_gff = GUNZIP_GFF ([ [:], file(gff, checkIfExists: true) ]).gunzip - ch_versions = ch_versions.mix(GUNZIP_GFF.out.versions) } else { - ch_gff = Channel.value(file(gff, checkIfExists: true)).map { [ [:], it ] } + ch_gff = channel.value(file(gff, checkIfExists: true)).map { item -> [ [:], item ] } } - ch_gtf = GFFREAD(ch_gff, []).gtf.map { it[1] } - ch_versions = ch_versions.mix(GFFREAD.out.versions) + ch_gtf = GFFREAD(ch_gff, []).gtf.map { tuple -> tuple[1] } } //------------------------------------- @@ -99,14 +96,13 @@ workflow PREPARE_GENOME { //------------------------------------- def fasta_provided = (fasta ? true : false) - ch_fasta = Channel.of([]) + ch_fasta = channel.of([]) if (fasta_provided) { // Uncompress FASTA if needed if (fasta.endsWith('.gz')) { - ch_fasta = GUNZIP_FASTA ([ [:], file(fasta, checkIfExists: true) ]).gunzip.map { it[1] } - ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions) + ch_fasta = GUNZIP_FASTA ([ [:], file(fasta, checkIfExists: true) ]).gunzip.map { tuple -> tuple[1] } } else { - ch_fasta = Channel.value(file(fasta, checkIfExists: true)) + ch_fasta = channel.value(file(fasta, checkIfExists: true)) } } @@ -128,35 +124,33 @@ workflow PREPARE_GENOME { //--------------------------------------------------- // 4) Concatenate additional FASTA (if both are given) //--------------------------------------------------- - ch_add_fasta = Channel.empty() + ch_add_fasta = channel.empty() if (fasta_provided && additional_fasta) { if (additional_fasta.endsWith('.gz')) { - ch_add_fasta = GUNZIP_ADDITIONAL_FASTA([ [:], file(additional_fasta, checkIfExists: true) ]).gunzip.map { it[1] } - ch_versions = ch_versions.mix(GUNZIP_ADDITIONAL_FASTA.out.versions) + ch_add_fasta = GUNZIP_ADDITIONAL_FASTA([ [:], file(additional_fasta, checkIfExists: true) ]).gunzip.map { tuple -> tuple[1] } } else { - ch_add_fasta = Channel.value(file(additional_fasta, checkIfExists: true)) + ch_add_fasta = channel.value(file(additional_fasta, checkIfExists: true)) } CUSTOM_CATADDITIONALFASTA( - ch_fasta.combine(ch_gtf).map { fasta, gtf -> [ [:], fasta, gtf ] }, - ch_add_fasta.map { [ [:], it ] }, + ch_fasta.combine(ch_gtf).map { fasta_file, gtf_file -> [ [id: 'genome_transcriptome'], fasta_file, gtf_file ] }, + ch_add_fasta.map { item -> [ [id: 'genome_transcriptome'], item ] }, gencode ? "gene_type" : featurecounts_group_type ) - ch_fasta = CUSTOM_CATADDITIONALFASTA.out.fasta.map { it[1] }.first() - ch_gtf = CUSTOM_CATADDITIONALFASTA.out.gtf.map { it[1] }.first() + ch_fasta = CUSTOM_CATADDITIONALFASTA.out.fasta.map { tuple -> tuple[1] }.first() + ch_gtf = CUSTOM_CATADDITIONALFASTA.out.gtf.map { tuple -> tuple[1] }.first() ch_versions = ch_versions.mix(CUSTOM_CATADDITIONALFASTA.out.versions) } //------------------------------------------------------ // 5) Uncompress gene BED or create from GTF if not given //------------------------------------------------------ - ch_gene_bed = Channel.empty() + ch_gene_bed = channel.empty() if (gene_bed) { if (gene_bed.endsWith('.gz')) { - ch_gene_bed = GUNZIP_GENE_BED ([ [:], file(gene_bed, checkIfExists: true) ]).gunzip.map { it[1] } - ch_versions = ch_versions.mix(GUNZIP_GENE_BED.out.versions) + ch_gene_bed = GUNZIP_GENE_BED ([ [:], file(gene_bed, checkIfExists: true) ]).gunzip.map { tuple -> tuple[1] } } else { - ch_gene_bed = Channel.value(file(gene_bed, checkIfExists: true)) + ch_gene_bed = channel.value(file(gene_bed, checkIfExists: true)) } } else { ch_gene_bed = GTF2BED(ch_gtf).bed @@ -168,14 +162,13 @@ workflow PREPARE_GENOME { // - If provided, decompress (optionally preprocess if GENCODE) // - If not provided but have genome+GTF, create from them //---------------------------------------------------------------------- - ch_transcript_fasta = Channel.empty() + ch_transcript_fasta = channel.empty() if (transcript_fasta) { // Use user-provided transcript FASTA if (transcript_fasta.endsWith('.gz')) { - ch_transcript_fasta = GUNZIP_TRANSCRIPT_FASTA ([ [:], file(transcript_fasta, checkIfExists: true) ]).gunzip.map { it[1] } - ch_versions = ch_versions.mix(GUNZIP_TRANSCRIPT_FASTA.out.versions) + ch_transcript_fasta = GUNZIP_TRANSCRIPT_FASTA ([ [:], file(transcript_fasta, checkIfExists: true) ]).gunzip.map { tuple -> tuple[1] } } else { - ch_transcript_fasta = Channel.value(file(transcript_fasta, checkIfExists: true)) + ch_transcript_fasta = channel.value(file(transcript_fasta, checkIfExists: true)) } if (gencode) { PREPROCESS_TRANSCRIPTS_FASTA_GENCODE(ch_transcript_fasta) @@ -187,11 +180,9 @@ workflow PREPARE_GENOME { if(use_sentieon_star){ // Build transcripts from genome if we have it ch_transcript_fasta = SENTIEON_MAKE_TRANSCRIPTS_FASTA(ch_fasta, ch_gtf).transcript_fasta - ch_versions = ch_versions.mix(SENTIEON_MAKE_TRANSCRIPTS_FASTA.out.versions) } else { // Build transcripts from genome if we have it ch_transcript_fasta = MAKE_TRANSCRIPTS_FASTA(ch_fasta, ch_gtf).transcript_fasta - ch_versions = ch_versions.mix(MAKE_TRANSCRIPTS_FASTA.out.versions) } } @@ -199,12 +190,12 @@ workflow PREPARE_GENOME { //------------------------------------------------------- // 7) FAI / chrom.sizes only if we actually have a genome //------------------------------------------------------- - ch_fai = Channel.empty() - ch_chrom_sizes = Channel.empty() + ch_fai = channel.empty() + ch_chrom_sizes = channel.empty() if (fasta_provided) { - SAMTOOLS_FAIDX(ch_fasta.map { [ [:], it ] }, [ [:], [] ], true) - ch_fai = SAMTOOLS_FAIDX.out.fai.map { it[1] } - ch_chrom_sizes = SAMTOOLS_FAIDX.out.sizes.map { it[1] } + SAMTOOLS_FAIDX(ch_fasta.map { item -> [ [:], item ] }, [ [:], [] ], true) + ch_fai = SAMTOOLS_FAIDX.out.fai.map { tuple -> tuple[1] } + ch_chrom_sizes = SAMTOOLS_FAIDX.out.sizes.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(SAMTOOLS_FAIDX.out.versions) } @@ -220,26 +211,26 @@ workflow PREPARE_GENOME { //--------------------------------------------------------- // 9) BBSplit index: uses FASTA only if we generate from scratch //--------------------------------------------------------- - ch_bbsplit_index = Channel.empty() + ch_bbsplit_index = channel.empty() if ('bbsplit' in prepare_tool_indices) { if (bbsplit_index) { // Use user-provided bbsplit index if (bbsplit_index.endsWith('.tar.gz')) { - ch_bbsplit_index = UNTAR_BBSPLIT_INDEX ([ [:], file(bbsplit_index, checkIfExists: true) ]).untar.map { it[1] } + ch_bbsplit_index = UNTAR_BBSPLIT_INDEX ([ [:], file(bbsplit_index, checkIfExists: true) ]).untar.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(UNTAR_BBSPLIT_INDEX.out.versions) } else { - ch_bbsplit_index = Channel.value(file(bbsplit_index, checkIfExists: true)) + ch_bbsplit_index = channel.value(file(bbsplit_index, checkIfExists: true)) } } else if (fasta_provided) { // Build it from scratch if we have FASTA - Channel + channel .from(file(bbsplit_fasta_list, checkIfExists: true)) .splitCsv() // Read in 2 column csv file: short_name,path_to_fasta .flatMap { id, fafile -> [ [ 'id', id ], [ 'fasta', file(fafile, checkIfExists: true) ] ] } // Flatten entries to be able to groupTuple by a common key .groupTuple() - .map { it -> it[1] } // Get rid of keys and keep grouped values - .collect { [ it ] } // Collect entries as a list to pass as "tuple val(short_names), path(path_to_fasta)" to module + .map { entry -> entry[1] } // Get rid of keys and keep grouped values + .collect { item -> [ item ] } // Collect entries as a list to pass as "tuple val(short_names), path(path_to_fasta)" to module .set { ch_bbsplit_fasta_list } ch_bbsplit_index = BBMAP_BBSPLIT( @@ -249,7 +240,6 @@ workflow PREPARE_GENOME { ch_bbsplit_fasta_list, true ).index - ch_versions = ch_versions.mix(BBMAP_BBSPLIT.out.versions) } // else: no FASTA and no user-provided index -> remains empty } @@ -257,13 +247,13 @@ workflow PREPARE_GENOME { //------------------------------------------------------------- // 10) rRNA fastas and SortMeRNA index //------------------------------------------------------------- - ch_sortmerna_index = Channel.empty() - ch_rrna_fastas = Channel.empty() + ch_sortmerna_index = channel.empty() + ch_rrna_fastas = channel.empty() // Load rRNA FASTAs when using sortmerna or bowtie2 for rRNA removal if (ribo_removal_tool in ['sortmerna', 'bowtie2']) { def ribo_db = file(sortmerna_fasta_list) - ch_rrna_fastas = Channel.from(ribo_db.readLines()) + ch_rrna_fastas = channel.from(ribo_db.readLines()) .map { row -> file(row) } } @@ -271,34 +261,33 @@ workflow PREPARE_GENOME { if ('sortmerna' in prepare_tool_indices) { if (sortmerna_index) { if (sortmerna_index.endsWith('.tar.gz')) { - ch_sortmerna_index = UNTAR_SORTMERNA_INDEX ([ [:], file(sortmerna_index, checkIfExists: true) ]).untar.map { it[1] } + ch_sortmerna_index = UNTAR_SORTMERNA_INDEX ([ [:], file(sortmerna_index, checkIfExists: true) ]).untar.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(UNTAR_SORTMERNA_INDEX.out.versions) } else { - ch_sortmerna_index = Channel.value([ [:], file(sortmerna_index, checkIfExists: true) ]) + ch_sortmerna_index = channel.value([ [:], file(sortmerna_index, checkIfExists: true) ]) } } else { // Build new SortMeRNA index from the rRNA references SORTMERNA_INDEX( - Channel.of([ [], [] ]), - ch_rrna_fastas.collect().map { [ 'rrna_refs', it ] }, - Channel.of([ [], [] ]) + channel.of([ [], [] ]), + ch_rrna_fastas.collect().map { refs -> [ 'rrna_refs', refs ] }, + channel.of([ [], [] ]) ) ch_sortmerna_index = SORTMERNA_INDEX.out.index.first() - ch_versions = ch_versions.mix(SORTMERNA_INDEX.out.versions) } } //---------------------------------------------------- // 11) STAR index (e.g. for 'star_salmon') -> needs FASTA if built //---------------------------------------------------- - ch_star_index = Channel.empty() + ch_star_index = channel.empty() if (prepare_tool_indices.intersect(['star_salmon', 'star_rsem'])) { if (star_index) { if (star_index.endsWith('.tar.gz')) { - ch_star_index = UNTAR_STAR_INDEX ([ [:], file(star_index, checkIfExists: true) ]).untar.map { it[1] } + ch_star_index = UNTAR_STAR_INDEX ([ [:], file(star_index, checkIfExists: true) ]).untar.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(UNTAR_STAR_INDEX.out.versions) } else { - ch_star_index = Channel.value(file(star_index, checkIfExists: true)) + ch_star_index = channel.value(file(star_index, checkIfExists: true)) } } else if (fasta_provided) { @@ -313,9 +302,9 @@ workflow PREPARE_GENOME { ch_versions = ch_versions.mix(STAR_GENOMEGENERATE_IGENOMES.out.versions) } else { ch_star_index = STAR_GENOMEGENERATE( - ch_fasta.map { [ [:], it ] }, - ch_gtf.map { [ [:], it ] } - ).index.map { it[1] } + ch_fasta.map { item -> [ [:], item ] }, + ch_gtf.map { item -> [ [:], item ] } + ).index.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(STAR_GENOMEGENERATE.out.versions) } } @@ -324,24 +313,22 @@ workflow PREPARE_GENOME { //------------------------------------------------ // 12) RSEM index -> needs FASTA & GTF if built //------------------------------------------------ - ch_rsem_index = Channel.empty() + ch_rsem_index = channel.empty() if ('star_rsem' in prepare_tool_indices) { if (rsem_index) { if (rsem_index.endsWith('.tar.gz')) { - ch_rsem_index = UNTAR_RSEM_INDEX ([ [:], file(rsem_index, checkIfExists: true) ]).untar.map { it[1] } + ch_rsem_index = UNTAR_RSEM_INDEX ([ [:], file(rsem_index, checkIfExists: true) ]).untar.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(UNTAR_RSEM_INDEX.out.versions) } else { - ch_rsem_index = Channel.value(file(rsem_index, checkIfExists: true)) + ch_rsem_index = channel.value(file(rsem_index, checkIfExists: true)) } } else if (fasta_provided) { if(use_sentieon_star){ ch_rsem_index = SENTIEON_RSEM_PREPAREREFERENCE_GENOME(ch_fasta, ch_gtf).index - ch_versions = ch_versions.mix(SENTIEON_RSEM_PREPAREREFERENCE_GENOME.out.versions) }else{ ch_rsem_index = RSEM_PREPAREREFERENCE_GENOME(ch_fasta, ch_gtf).index - ch_versions = ch_versions.mix(RSEM_PREPAREREFERENCE_GENOME.out.versions) } } @@ -350,32 +337,31 @@ workflow PREPARE_GENOME { //--------------------------------------------------------- // 13) HISAT2 index -> needs FASTA & GTF if built //--------------------------------------------------------- - ch_splicesites = Channel.empty() - ch_hisat2_index = Channel.empty() + ch_splicesites = channel.empty() + ch_hisat2_index = channel.empty() if ('hisat2' in prepare_tool_indices) { // splicesites if (splicesites) { - ch_splicesites = Channel.value(file(splicesites, checkIfExists: true)) + ch_splicesites = channel.value(file(splicesites, checkIfExists: true)) } else if (fasta_provided) { - ch_splicesites = HISAT2_EXTRACTSPLICESITES(ch_gtf.map { [ [:], it ] }).txt.map { it[1] } - ch_versions = ch_versions.mix(HISAT2_EXTRACTSPLICESITES.out.versions) + ch_splicesites = HISAT2_EXTRACTSPLICESITES(ch_gtf.map { item -> [ [:], item ] }).txt.map { tuple -> tuple[1] } } // the index if (hisat2_index) { if (hisat2_index.endsWith('.tar.gz')) { - ch_hisat2_index = UNTAR_HISAT2_INDEX ([ [:], file(hisat2_index, checkIfExists: true) ]).untar.map { it[1] } + ch_hisat2_index = UNTAR_HISAT2_INDEX ([ [:], file(hisat2_index, checkIfExists: true) ]).untar.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(UNTAR_HISAT2_INDEX.out.versions) } else { - ch_hisat2_index = Channel.value(file(hisat2_index, checkIfExists: true)) + ch_hisat2_index = channel.value(file(hisat2_index, checkIfExists: true)) } } else if (fasta_provided) { ch_hisat2_index = HISAT2_BUILD( - ch_fasta.map { [ [:], it ] }, - ch_gtf.map { [ [:], it ] }, - ch_splicesites.map { [ [:], it ] } - ).index.map { it[1] } + ch_fasta.map { item -> [ [:], item ] }, + ch_gtf.map { item -> [ [:], item ] }, + ch_splicesites.map { item -> [ [:], item ] } + ).index.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(HISAT2_BUILD.out.versions) } } @@ -384,13 +370,13 @@ workflow PREPARE_GENOME { // 14) Salmon index -> can skip genome if transcript_fasta is enough //------------------------------------------------------ - ch_salmon_index = Channel.empty() + ch_salmon_index = channel.empty() if (salmon_index) { if (salmon_index.endsWith('.tar.gz')) { - ch_salmon_index = UNTAR_SALMON_INDEX ( [ [:], salmon_index ] ).untar.map { it[1] } + ch_salmon_index = UNTAR_SALMON_INDEX ( [ [:], salmon_index ] ).untar.map { tuple -> tuple[1] } ch_versions = ch_versions.mix(UNTAR_SALMON_INDEX.out.versions) } else { - ch_salmon_index = Channel.value(file(salmon_index)) + ch_salmon_index = channel.value(file(salmon_index)) } } else if ('salmon' in prepare_tool_indices) { if (ch_transcript_fasta && fasta_provided) { @@ -408,17 +394,17 @@ workflow PREPARE_GENOME { //-------------------------------------------------- // 15) Kallisto index -> only needs transcript FASTA //-------------------------------------------------- - ch_kallisto_index = Channel.empty() + ch_kallisto_index = channel.empty() if (kallisto_index) { if (kallisto_index.endsWith('.tar.gz')) { ch_kallisto_index = UNTAR_KALLISTO_INDEX ( [ [:], kallisto_index ] ).untar ch_versions = ch_versions.mix(UNTAR_KALLISTO_INDEX.out.versions) } else { - ch_kallisto_index = Channel.value([[:], file(kallisto_index)]) + ch_kallisto_index = channel.value([[:], file(kallisto_index)]) } } else { if ('kallisto' in prepare_tool_indices) { - ch_kallisto_index = KALLISTO_INDEX ( ch_transcript_fasta.map { [ [:], it] } ).index + ch_kallisto_index = KALLISTO_INDEX ( ch_transcript_fasta.map { item -> [ [:], item ] } ).index ch_versions = ch_versions.mix(KALLISTO_INDEX.out.versions) } } diff --git a/subworkflows/local/prepare_genome/nextflow.config b/subworkflows/local/prepare_genome/nextflow.config index 17547b05b..0110238f0 100644 --- a/subworkflows/local/prepare_genome/nextflow.config +++ b/subworkflows/local/prepare_genome/nextflow.config @@ -98,30 +98,23 @@ process { saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } ] } -} -if (!params.skip_bbsplit && params.bbsplit_fasta_list) { - process { - withName: '.*:PREPARE_GENOME:BBMAP_BBSPLIT' { - ext.args = 'build=1' - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } + withName: '.*:PREPARE_GENOME:BBMAP_BBSPLIT' { + ext.args = 'build=1' + ext.prefix = 'genome_transcriptome' + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] } -} -if (params.remove_ribo_rna && params.ribo_removal_tool == 'sortmerna' && params.ribo_database_manifest) { - process { - withName: 'SORTMERNA_INDEX' { - ext.args = '--index 1' - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/sortmerna" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } - ] - } + withName: 'SORTMERNA_INDEX' { + ext.args = '--index 1' + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/sortmerna" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + ] } } diff --git a/subworkflows/local/prepare_genome/tests/main.nf.test.snap b/subworkflows/local/prepare_genome/tests/main.nf.test.snap index e43bbd75f..1e4f15085 100644 --- a/subworkflows/local/prepare_genome/tests/main.nf.test.snap +++ b/subworkflows/local/prepare_genome/tests/main.nf.test.snap @@ -43,15 +43,14 @@ [ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:52:44.637894975" + "timestamp": "2026-01-21T13:07:44.470115034" }, "skip_pseudo_alignment - stub": { "content": [ @@ -98,15 +97,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:49:30.917888335" + "timestamp": "2026-01-21T13:04:59.917639713" }, "skip_gtf_filter": { "content": [ @@ -152,15 +150,14 @@ [ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", - "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,71252f1a221be05593361acccb99506b" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:42:12.637028453" + "timestamp": "2026-01-21T12:40:40.553778935" }, "gencode = false - stub": { "content": [ @@ -207,15 +204,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:48:20.901747566" + "timestamp": "2026-01-21T13:04:01.022416071" }, "gff = false - stub": { "content": [ @@ -262,15 +258,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:50:07.114172762" + "timestamp": "2026-01-21T13:05:30.34968132" }, "skip_pseudoalignment = true - stub": { "content": [ @@ -317,15 +312,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:53:37.529066667" + "timestamp": "2026-01-21T13:08:30.083121258" }, "featurecounts_group_type = 'gene_type' - stub": { "content": [ @@ -372,15 +366,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:52:27.496680116" + "timestamp": "2026-01-21T13:07:29.994070898" }, "gtf = false": { "content": [ @@ -425,19 +418,17 @@ ], [ "versions.yml:md5,04400316552e6253e0008f052b20d866", - "versions.yml:md5,2a3ed31ad34b8864fb9278dcdef596ec", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,961ab91198c4e6ec9d795b95e3f61fda", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,961ab91198c4e6ec9d795b95e3f61fda" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:43:28.992177123" + "timestamp": "2026-01-21T12:41:53.610748586" }, "gfp = false": { "content": [ @@ -483,15 +474,14 @@ [ "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:44:04.653844207" + "timestamp": "2026-01-21T12:42:27.590661961" }, "skip_bbsplit = true": { "content": [ @@ -592,15 +582,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:51:34.60959805" + "timestamp": "2026-01-21T13:06:44.526845199" }, "skip_alignment": { "content": [ @@ -647,15 +636,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:42:49.212400119" + "timestamp": "2026-01-21T12:41:15.321280116" }, "gfp = false - stub": { "content": [ @@ -701,15 +689,14 @@ [ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:50:24.215457456" + "timestamp": "2026-01-21T13:05:44.810553132" }, "gencode = false": { "content": [ @@ -756,15 +743,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:41:54.281203471" + "timestamp": "2026-01-21T12:40:23.564144507" }, "default options": { "content": [ @@ -811,15 +797,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:41:35.737546802" + "timestamp": "2026-01-21T12:40:05.665928269" }, "gencode = true - stub": { "content": [ @@ -867,15 +852,14 @@ "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", "versions.yml:md5,961ab91198c4e6ec9d795b95e3f61fda", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:52:09.799237731" + "timestamp": "2026-01-21T13:07:15.105186378" }, "skip_alignment - stub": { "content": [ @@ -922,15 +906,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:49:13.345882054" + "timestamp": "2026-01-21T13:04:45.058693194" }, "skip_bbsplit = true - stub": { "content": [ @@ -960,7 +943,7 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ], "2": [ "genome_transcriptome.fasta.fai:md5,d41d8cd98f00b204e9800998ecf8427e" @@ -1035,7 +1018,7 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] } ], @@ -1090,16 +1073,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,918fe0b59c0986eb602ace85841c5ab3", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:44:23.057299574" + "timestamp": "2026-01-21T12:43:08.377241026" }, "skip_pseudoalignment = true": { "content": [ @@ -1146,15 +1127,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:47:27.053136054" + "timestamp": "2026-01-21T13:03:15.52954382" }, "use_sentieon_star = true": { "content": [ @@ -1201,15 +1181,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:47:45.479261311" + "timestamp": "2026-01-21T13:03:31.239326342" }, "skip_gtf_filter - stub": { "content": [ @@ -1255,15 +1234,14 @@ [ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:48:37.842233064" + "timestamp": "2026-01-21T13:04:15.377034605" }, "gencode = true": { "content": [ @@ -1311,15 +1289,14 @@ "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,961ab91198c4e6ec9d795b95e3f61fda", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,961ab91198c4e6ec9d795b95e3f61fda" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:45:56.278042632" + "timestamp": "2026-01-21T13:01:57.891479246" }, "hisat2_index = false": { "content": [ @@ -1366,15 +1343,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:45:37.923684692" + "timestamp": "2026-01-21T13:01:42.008277774" }, "rsem_index = false - stub": { "content": [ @@ -1421,15 +1397,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:51:17.028329146" + "timestamp": "2026-01-21T13:06:29.57124367" }, "featurecounts_group_type = 'gene_type'": { "content": [ @@ -1476,15 +1451,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:46:14.884617857" + "timestamp": "2026-01-21T13:02:13.589480904" }, "with bed - stub": { "content": [ @@ -1530,15 +1504,14 @@ [ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:50:58.767710472" + "timestamp": "2026-01-21T13:06:14.603345311" }, "skip_pseudo_alignment": { "content": [ @@ -1585,15 +1558,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:43:07.603604109" + "timestamp": "2026-01-21T12:41:32.928777355" }, "skip_bbsplit": { "content": [ @@ -1693,15 +1665,14 @@ [ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:44:41.889322935" + "timestamp": "2026-01-21T12:43:26.013423552" }, "gtf = false - stub": { "content": [ @@ -1746,19 +1717,17 @@ ], [ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", - "versions.yml:md5,2a3ed31ad34b8864fb9278dcdef596ec", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", "versions.yml:md5,961ab91198c4e6ec9d795b95e3f61fda", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:49:49.29830808" + "timestamp": "2026-01-21T13:05:15.516984667" }, "gff = false": { "content": [ @@ -1805,15 +1774,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:43:47.489162948" + "timestamp": "2026-01-21T12:42:11.207262337" }, "default options - stub": { "content": [ @@ -1860,15 +1828,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:48:03.242550156" + "timestamp": "2026-01-21T13:03:46.11944557" }, "salmon_index = false": { "content": [ @@ -1915,15 +1882,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:45:19.671223395" + "timestamp": "2026-01-21T13:01:26.31013732" }, "rsem_index = false": { "content": [ @@ -1970,15 +1936,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:45:00.470030209" + "timestamp": "2026-01-21T13:01:10.792090529" }, "skip_alignment = true - stub": { "content": [ @@ -2025,15 +1990,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:53:19.682052278" + "timestamp": "2026-01-21T13:08:15.036231812" }, "use_sentieon_star - stub": { "content": [ @@ -2080,15 +2044,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:53:55.254113057" + "timestamp": "2026-01-21T13:08:45.189467229" }, "transcriptome = false - stub": { "content": [ @@ -2135,16 +2098,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,918fe0b59c0986eb602ace85841c5ab3", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:50:41.822086475" + "timestamp": "2026-01-21T13:05:59.773742231" }, "skip_alignment = true": { "content": [ @@ -2191,15 +2152,14 @@ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:47:08.652066329" + "timestamp": "2026-01-21T13:02:59.726314623" }, "skip_gtf_filter = true": { "content": [ @@ -2245,15 +2205,14 @@ [ "versions.yml:md5,04400316552e6253e0008f052b20d866", "versions.yml:md5,2ed4fadc0038a6a8f46063219d23d3ef", - "versions.yml:md5,71252f1a221be05593361acccb99506b", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5" + "versions.yml:md5,71252f1a221be05593361acccb99506b" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:46:32.682326826" + "timestamp": "2026-01-21T13:02:28.715547959" }, "hisat2_index = false - stub": { "content": [ @@ -2300,15 +2259,14 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc5444e21efd35d6322702dbef835fb5", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-18T14:51:52.099645243" + "timestamp": "2026-01-21T13:06:59.340024865" }, "skip_bbsplit - stub": { "content": [ @@ -2338,7 +2296,7 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ], "2": [ "genome_transcriptome.fasta.fai:md5,d41d8cd98f00b204e9800998ecf8427e" @@ -2413,7 +2371,7 @@ "versions.yml:md5,1b71d037313dd6cfb54f9f1914cc3601", "versions.yml:md5,71252f1a221be05593361acccb99506b", "versions.yml:md5,80e9dd350be8cd4c11909d75c914757a", - "versions.yml:md5,cc8f32b7c37c35a075d38cb773004eaa" + "versions.yml:md5,d475dace58c4e9b4911e8a60bda85041" ] } ], diff --git a/subworkflows/local/prepare_genome/tests/nextflow.config b/subworkflows/local/prepare_genome/tests/nextflow.config index fed8f030a..bfbb56a6a 100644 --- a/subworkflows/local/prepare_genome/tests/nextflow.config +++ b/subworkflows/local/prepare_genome/tests/nextflow.config @@ -22,18 +22,3 @@ process { // Fix chown issue for the output star folder docker.runOptions = '-u $(id -u):$(id -g)' - -// NOTE This is how pipeline users will use Sentieon in real world use -if (System.getenv('SENTIEON_LICSRVR_IP')) { - env.SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" -} -//NOTE This should only happen in GitHub actions or nf-core MegaTests -if (System.getenv('SENTIEON_AUTH_MECH')) { - env.SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" -} -if (secrets.SENTIEON_AUTH_DATA) { - env.SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA -} - -// NOTE This is how pipeline users will test out Sentieon with a license file -// nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/subworkflows/local/quantify_rsem/main.nf b/subworkflows/local/quantify_rsem/main.nf index cf2309fd4..1b4463974 100644 --- a/subworkflows/local/quantify_rsem/main.nf +++ b/subworkflows/local/quantify_rsem/main.nf @@ -14,7 +14,7 @@ workflow QUANTIFY_RSEM { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Quantify reads with RSEM @@ -23,23 +23,24 @@ workflow QUANTIFY_RSEM { if (use_sentieon_star){ SENTIEON_RSEMCALCULATEEXPRESSION ( reads, index ) ch_rsem_out = SENTIEON_RSEMCALCULATEEXPRESSION + // SENTIEON_RSEMCALCULATEEXPRESSION uses topic-based version reporting } else { RSEM_CALCULATEEXPRESSION ( reads, index ) ch_rsem_out = RSEM_CALCULATEEXPRESSION + ch_versions = ch_versions.mix(RSEM_CALCULATEEXPRESSION.out.versions.first()) } ch_counts_gene = ch_rsem_out.out.counts_gene ch_counts_transcript = ch_rsem_out.out.counts_transcript ch_stat = ch_rsem_out.out.stat ch_logs = ch_rsem_out.out.logs - ch_versions = ch_versions.mix(ch_rsem_out.out.versions.first()) // // Merge counts across samples // RSEM_MERGE_COUNTS ( - ch_counts_gene.collect{it[1]}, // [meta, counts]: Collect the second element (counts files) in the channel across all samples - ch_counts_transcript.collect{it[1]} + ch_counts_gene.collect{ tuple -> tuple[1] }, // [meta, counts]: Collect the second element (counts files) in the channel across all samples + ch_counts_transcript.collect{ tuple -> tuple[1] } ) ch_versions = ch_versions.mix(RSEM_MERGE_COUNTS.out.versions) diff --git a/subworkflows/local/quantify_rsem/nextflow.config b/subworkflows/local/quantify_rsem/nextflow.config index 0ade162ae..18da8a998 100644 --- a/subworkflows/local/quantify_rsem/nextflow.config +++ b/subworkflows/local/quantify_rsem/nextflow.config @@ -1,30 +1,28 @@ -if (!params.skip_alignment && params.aligner == 'star_rsem') { - process { - withName: '.*:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION|.*:QUANTIFY_RSEM:SENTIEON_RSEMCALCULATEEXPRESSION' { - ext.args = [ - '--estimate-rspd', - '--seed 1' - ].join(' ').trim() - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: "*.{stat,results}" - ], - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ] - ] - } - - withName: '.*:QUANTIFY_RSEM:RSEM_MERGE_COUNTS' { - publishDir = [ +process { + withName: '.*:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION|.*:QUANTIFY_RSEM:SENTIEON_RSEMCALCULATEEXPRESSION' { + ext.args = [ + '--estimate-rspd', + '--seed 1' + ].join(' ').trim() + publishDir = [ + [ path: { "${params.outdir}/${params.aligner}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + pattern: "*.{stat,results}" + ], + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" ] - } + ] + } + + withName: '.*:QUANTIFY_RSEM:RSEM_MERGE_COUNTS' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/subworkflows/local/quantify_rsem/tests/main.nf.test b/subworkflows/local/quantify_rsem/tests/main.nf.test index bfe278c87..5a08d3a7c 100644 --- a/subworkflows/local/quantify_rsem/tests/main.nf.test +++ b/subworkflows/local/quantify_rsem/tests/main.nf.test @@ -3,7 +3,6 @@ nextflow_workflow { name "Test Workflow QUANTIFY_RSEM" script "../main.nf" workflow "QUANTIFY_RSEM" - config "./nextflow.config" test("homo_sapiens") { tag "test" diff --git a/subworkflows/local/quantify_rsem/tests/main.nf.test.snap b/subworkflows/local/quantify_rsem/tests/main.nf.test.snap index 1b7f8c71f..05b4000a9 100644 --- a/subworkflows/local/quantify_rsem/tests/main.nf.test.snap +++ b/subworkflows/local/quantify_rsem/tests/main.nf.test.snap @@ -20,6 +20,9 @@ "test.isoforms.results:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "10": [ + "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9" + ], "2": [ [ { @@ -51,8 +54,10 @@ "rsem.merged.transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "8": [ - "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9", - "versions.yml:md5,773c15c4ecb7d486a4bdd8ef73e7ac5d" + "rsem.merged.genes_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "9": [ + "rsem.merged.isoforms_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "counts_gene": [ [ @@ -87,6 +92,12 @@ "merged_counts_transcript": [ "rsem.merged.transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], + "merged_genes_long": [ + "rsem.merged.genes_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "merged_isoforms_long": [ + "rsem.merged.isoforms_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], "merged_tpm_gene": [ "rsem.merged.gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], @@ -103,8 +114,7 @@ ] ], "versions": [ - "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9", - "versions.yml:md5,773c15c4ecb7d486a4bdd8ef73e7ac5d" + "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9" ] } ], diff --git a/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test b/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test index da021c635..ff2e63f1d 100644 --- a/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test +++ b/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test @@ -3,7 +3,7 @@ nextflow_workflow { name "Test Workflow QUANTIFY_RSEM - Sentieon" script "../main.nf" workflow "QUANTIFY_RSEM" - config "./nextflow.config" + config "./sentieon.config" test("homo_sapiens - sentieon - stub") { diff --git a/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test.snap b/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test.snap index b3d71efd8..cf30133c9 100644 --- a/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test.snap +++ b/subworkflows/local/quantify_rsem/tests/main.sentieon.nf.test.snap @@ -20,6 +20,9 @@ "test.isoforms.results:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "10": [ + "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9" + ], "2": [ [ { @@ -51,8 +54,10 @@ "rsem.merged.transcript_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "8": [ - "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9", - "versions.yml:md5,773c15c4ecb7d486a4bdd8ef73e7ac5d" + "rsem.merged.genes_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "9": [ + "rsem.merged.isoforms_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], "counts_gene": [ [ @@ -87,6 +92,12 @@ "merged_counts_transcript": [ "rsem.merged.transcript_counts.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], + "merged_genes_long": [ + "rsem.merged.genes_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + "merged_isoforms_long": [ + "rsem.merged.isoforms_long.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ], "merged_tpm_gene": [ "rsem.merged.gene_tpm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" ], @@ -103,8 +114,7 @@ ] ], "versions": [ - "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9", - "versions.yml:md5,773c15c4ecb7d486a4bdd8ef73e7ac5d" + "versions.yml:md5,2aa5252eb2ffb409cf556a165d40f8a9" ] } ], diff --git a/subworkflows/local/quantify_rsem/tests/nextflow.config b/subworkflows/local/quantify_rsem/tests/nextflow.config deleted file mode 100644 index 6318bc5a8..000000000 --- a/subworkflows/local/quantify_rsem/tests/nextflow.config +++ /dev/null @@ -1,14 +0,0 @@ -// NOTE This is how pipeline users will use Sentieon in real world use -if (System.getenv('SENTIEON_LICSRVR_IP')) { - env.SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" -} -//NOTE This should only happen in GitHub actions or nf-core MegaTests -if (System.getenv('SENTIEON_AUTH_MECH')) { - env.SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" -} -if (secrets.SENTIEON_AUTH_DATA) { - env.SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA -} - -// NOTE This is how pipeline users will test out Sentieon with a license file -// nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/subworkflows/local/quantify_rsem/tests/sentieon.config b/subworkflows/local/quantify_rsem/tests/sentieon.config new file mode 100644 index 000000000..e02da9d12 --- /dev/null +++ b/subworkflows/local/quantify_rsem/tests/sentieon.config @@ -0,0 +1,6 @@ +env { + // Sentieon environment configuration + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') + SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA +} diff --git a/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf b/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf index 4b957b5c8..c5f787328 100644 --- a/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf @@ -34,7 +34,7 @@ workflow PIPELINE_INITIALISATION { monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args outdir // string: The output directory where the results will be saved - input // string: Path to input samplesheet + _input // string: Path to input samplesheet help // boolean: Display help message and exit help_full // boolean: Show the full help message show_hidden // boolean: Show hidden parameters in the help message @@ -56,15 +56,16 @@ workflow PIPELINE_INITIALISATION { // // Validate parameters and generate parameter summary to stdout // + def colors = logColours(monochrome_logs) before_text = """ --\033[2m----------------------------------------------------\033[0m- - \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m -\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m -\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m -\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m - \033[0;32m`._,._,\'\033[0m -\033[0;35m nf-core/rnaseq ${workflow.manifest.version}\033[0m --\033[2m----------------------------------------------------\033[0m- +-${colors.dim}----------------------------------------------------${colors.reset}- + ${colors.green},--.${colors.black}/${colors.green},-.${colors.reset} +${colors.blue} ___ __ __ __ ___ ${colors.green}/,-._.--~\'${colors.reset} +${colors.blue} |\\ | |__ __ / ` / \\ |__) |__ ${colors.yellow}} {${colors.reset} +${colors.blue} | \\| | \\__, \\__/ | \\ |___ ${colors.green}\\`-._,-`-,${colors.reset} + ${colors.green}`._,._,\'${colors.reset} +${colors.purple} nf-core/rnaseq ${workflow.manifest.version}${colors.reset} +-${colors.dim}----------------------------------------------------${colors.reset}- """ after_text = """${workflow.manifest.doi ? "\n* The pipeline\n" : ""}${workflow.manifest.doi.tokenize(",").collect { doi -> " https://doi.org/${doi.trim().replace('https://doi.org/','')}"}.join("\n")}${workflow.manifest.doi ? "\n" : ""} * The nf-core framework @@ -185,14 +186,14 @@ workflow PIPELINE_COMPLETION { // def checkSamplesAfterGrouping(input) { // Handle both old format [id, metas, fastqs] and new format with BAMs [id, metas, fastqs, genome_bams, transcriptome_bams] - def id = input[0] + def _id = input[0] def metas = input[1] def fastqs = input[2] def genome_bams = input.size() > 3 ? input[3] : null def transcriptome_bams = input.size() > 4 ? input[4] : null // Check that multiple runs of the same sample are of the same strandedness - def strandedness_ok = metas.collect{ it.strandedness }.unique().size == 1 + def strandedness_ok = metas.collect{ meta -> meta.strandedness }.unique().size == 1 if (!strandedness_ok) { error("Please check input samplesheet -> Multiple runs of a sample must have the same strandedness!: ${metas[0].id}") } @@ -205,8 +206,8 @@ def checkSamplesAfterGrouping(input) { // Return format depends on whether BAM data was provided if (genome_bams != null || transcriptome_bams != null) { - def genome_bam = genome_bams?.find { it != null } - def transcriptome_bam = transcriptome_bams?.find { it != null } + def genome_bam = genome_bams?.find { bam -> bam != null } + def transcriptome_bam = transcriptome_bams?.find { bam -> bam != null } // Add BAM flags and original paths to meta def meta_with_bams = metas[0] + [ @@ -358,7 +359,7 @@ def validateInputParameters() { // Check which RSeQC modules we are running def valid_rseqc_modules = ['bam_stat', 'inner_distance', 'infer_experiment', 'junction_annotation', 'junction_saturation', 'read_distribution', 'read_duplication', 'tin'] - def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ it.trim().toLowerCase() } : [] + def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ module -> module.trim().toLowerCase() } : [] if ((valid_rseqc_modules + rseqc_modules).unique().size() != valid_rseqc_modules.size()) { error("Invalid option: ${params.rseqc_modules}. Valid options for '--rseqc_modules': ${valid_rseqc_modules.join(', ')}") } @@ -702,9 +703,9 @@ def mapBamToPublishedPath(bam_path, sample_id, aligner, outdir) { def rnaseqSummary(monochrome_logs=true, pass_mapped_reads=[:], pass_trimmed_reads=[:], pass_strand_check=[:]) { def colors = logColours(monochrome_logs) - def fail_mapped_count = pass_mapped_reads.count { key, value -> value == false } - def fail_trimmed_count = pass_trimmed_reads.count { key, value -> value == false } - def fail_strand_count = pass_strand_check.count { key, value -> value == false } + def fail_mapped_count = pass_mapped_reads.count { _key, value -> value == false } + def fail_trimmed_count = pass_trimmed_reads.count { _key, value -> value == false } + def fail_strand_count = pass_strand_check.count { _key, value -> value == false } if (workflow.success) { def color = colors.green def status = [] diff --git a/subworkflows/nf-core/bam_dedup_stats_samtools_umicollapse/main.nf b/subworkflows/nf-core/bam_dedup_stats_samtools_umicollapse/main.nf index 54c42b986..df6f8b5c5 100644 --- a/subworkflows/nf-core/bam_dedup_stats_samtools_umicollapse/main.nf +++ b/subworkflows/nf-core/bam_dedup_stats_samtools_umicollapse/main.nf @@ -12,7 +12,7 @@ workflow BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // umicollapse in bam mode (thus hardcode mode input channel to 'bam') diff --git a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main.nf b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main.nf index fe6ff312f..8b3586df6 100644 --- a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main.nf +++ b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main.nf @@ -13,7 +13,7 @@ workflow BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // UMI-tools dedup diff --git a/subworkflows/nf-core/bam_dedup_umi/main.nf b/subworkflows/nf-core/bam_dedup_umi/main.nf index 5f466563d..b3dd323cc 100644 --- a/subworkflows/nf-core/bam_dedup_umi/main.nf +++ b/subworkflows/nf-core/bam_dedup_umi/main.nf @@ -22,7 +22,7 @@ workflow BAM_DEDUP_UMI { ch_transcript_fasta // channel: [ val(meta), path(fasta) ] main: - ch_versions = Channel.empty() + ch_versions = channel.empty() if (umi_dedup_tool != "umicollapse" && umi_dedup_tool != "umitools"){ error("Unknown umi_dedup_tool '${umi_dedup_tool}'") @@ -112,7 +112,7 @@ workflow BAM_DEDUP_UMI { .mix(UMI_DEDUP_GENOME.out.flagstat) .mix(UMI_DEDUP_GENOME.out.idxstats) .transpose() - .map{it[1]} + .map{ item -> item[1] } // Record versions diff --git a/subworkflows/nf-core/bam_markduplicates_picard/main.nf b/subworkflows/nf-core/bam_markduplicates_picard/main.nf index 4ea7416cc..f16cada55 100644 --- a/subworkflows/nf-core/bam_markduplicates_picard/main.nf +++ b/subworkflows/nf-core/bam_markduplicates_picard/main.nf @@ -15,7 +15,7 @@ workflow BAM_MARKDUPLICATES_PICARD { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() PICARD_MARKDUPLICATES ( ch_reads, ch_fasta, ch_fai ) ch_versions = ch_versions.mix(PICARD_MARKDUPLICATES.out.versions.first()) diff --git a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config index b73b711df..f8a322ac2 100644 --- a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config +++ b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config @@ -1,39 +1,37 @@ -if (!params.skip_markduplicates && !params.with_umi) { - process { - withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { - ext.args = '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' - ext.prefix = { "${meta.id}.markdup.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/picard_metrics" }, - mode: params.publish_dir_mode, - pattern: '*metrics.txt' - ], - [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: '*.bam' - ] - ] - } - - withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - ext.prefix = { "${meta.id}.markdup.sorted" } - publishDir = [ +process { + withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { + ext.args = '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' + ext.prefix = { "${meta.id}.markdup.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/picard_metrics" }, + mode: params.publish_dir_mode, + pattern: '*metrics.txt' + ], + [ path: { "${params.outdir}/${params.aligner}" }, mode: params.publish_dir_mode, - pattern: '*.{bai,csi}' + pattern: '*.bam' ] - } + ] + } - withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.markdup.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } + withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + ext.prefix = { "${meta.id}.markdup.sorted" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}' + ] + } + + withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.markdup.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] } } diff --git a/subworkflows/nf-core/bam_rseqc/nextflow.config b/subworkflows/nf-core/bam_rseqc/nextflow.config index 312d9d8a2..4452ebb6f 100644 --- a/subworkflows/nf-core/bam_rseqc/nextflow.config +++ b/subworkflows/nf-core/bam_rseqc/nextflow.config @@ -1,153 +1,119 @@ -def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ it.trim().toLowerCase() } : [] - -if (!params.skip_qc && !params.skip_rseqc) { - if ('bam_stat' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_BAMSTAT' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/bam_stat" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: '.*:BAM_RSEQC:RSEQC_BAMSTAT' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/bam_stat" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } - if ('infer_experiment' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_INFEREXPERIMENT' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/infer_experiment" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_INFEREXPERIMENT' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/infer_experiment" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } - if ('junction_annotation' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONANNOTATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/bed" }, - mode: params.publish_dir_mode, - pattern: '*.bed' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/xls" }, - mode: params.publish_dir_mode, - pattern: '*.xls' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONANNOTATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/bed" }, + mode: params.publish_dir_mode, + pattern: '*.bed' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/xls" }, + mode: params.publish_dir_mode, + pattern: '*.xls' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] } - if ('junction_saturation' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONSATURATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONSATURATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] } - if ('read_duplication' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_READDUPLICATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/xls" }, - mode: params.publish_dir_mode, - pattern: '*.xls' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_READDUPLICATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/xls" }, + mode: params.publish_dir_mode, + pattern: '*.xls' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] } - if ('read_distribution' in rseqc_modules && !params.bam_csi_index) { - process { - withName: '.*:BAM_RSEQC:RSEQC_READDISTRIBUTION' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_distribution" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_READDISTRIBUTION' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_distribution" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } - if ('inner_distance' in rseqc_modules && !params.bam_csi_index) { - process { - withName: '.*:BAM_RSEQC:RSEQC_INNERDISTANCE' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/txt" }, - mode: params.publish_dir_mode, - pattern: '*.txt', - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_INNERDISTANCE' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/txt" }, + mode: params.publish_dir_mode, + pattern: '*.txt', + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] } - if ('tin' in rseqc_modules && !params.bam_csi_index) { - process { - withName: '.*:BAM_RSEQC:RSEQC_TIN' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/tin" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } + withName: '.*:BAM_RSEQC:RSEQC_TIN' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/tin" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } diff --git a/subworkflows/nf-core/bam_sort_stats_samtools/main.nf b/subworkflows/nf-core/bam_sort_stats_samtools/main.nf index ccef09d88..e45794941 100644 --- a/subworkflows/nf-core/bam_sort_stats_samtools/main.nf +++ b/subworkflows/nf-core/bam_sort_stats_samtools/main.nf @@ -13,7 +13,7 @@ workflow BAM_SORT_STATS_SAMTOOLS { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() SAMTOOLS_SORT ( ch_bam, ch_fasta, '' ) diff --git a/subworkflows/nf-core/bam_stats_samtools/main.nf b/subworkflows/nf-core/bam_stats_samtools/main.nf index 90fcbf80c..a79d95725 100644 --- a/subworkflows/nf-core/bam_stats_samtools/main.nf +++ b/subworkflows/nf-core/bam_stats_samtools/main.nf @@ -12,7 +12,7 @@ workflow BAM_STATS_SAMTOOLS { ch_fasta // channel: [ val(meta), path(fasta) ] main: - ch_versions = Channel.empty() + ch_versions = channel.empty() SAMTOOLS_STATS ( ch_bam_bai, ch_fasta ) diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/main.nf b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/main.nf index 6c3b7b0cb..c966d3025 100644 --- a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/main.nf +++ b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/main.nf @@ -12,23 +12,17 @@ workflow BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG { main: - ch_versions = Channel.empty() - // // Clip bedGraph file // UCSC_BEDCLIP ( bedgraph, sizes ) - ch_versions = ch_versions.mix(UCSC_BEDCLIP.out.versions.first()) // // Convert bedGraph to bigWig // UCSC_BEDGRAPHTOBIGWIG ( UCSC_BEDCLIP.out.bedgraph, sizes ) - ch_versions = ch_versions.mix(UCSC_BEDGRAPHTOBIGWIG.out.versions.first()) emit: bigwig = UCSC_BEDGRAPHTOBIGWIG.out.bigwig // channel: [ val(meta), [ bigwig ] ] bedgraph = UCSC_BEDCLIP.out.bedgraph // channel: [ val(meta), [ bedgraph ] ] - - versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test index 17ec676ca..79edf9b9d 100644 --- a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test +++ b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test @@ -4,6 +4,13 @@ nextflow_workflow { script "../main.nf" workflow "BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG" config "./nextflow.config" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/bedgraph_bedclip_bedgraphtobigwig" + tag "bedgraph_bedclip_bedgraphtobigwig" + tag "ucsc" + tag "ucsc/bedclip" + tag "ucsc/bedgraphtobigwig" test("sarscov2 [bedgraph] [genome_sizes]") { diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test.snap b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test.snap index 7bbcf72b7..7d659211e 100644 --- a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test.snap +++ b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/tests/main.nf.test.snap @@ -20,10 +20,6 @@ "test.clip.bedGraph:md5,e02395e1f7c593b3f79563067159ebc2" ] ], - "2": [ - "versions.yml:md5,1202cdc73b5829361d5b150dcf7fe865", - "versions.yml:md5,72a7b07bc0e796ff6805c57f7340337f" - ], "bedgraph": [ [ { @@ -41,18 +37,14 @@ }, "test.bigWig:md5,910ecc7f57e3bbd5fac5a8edba4f615d" ] - ], - "versions": [ - "versions.yml:md5,1202cdc73b5829361d5b150dcf7fe865", - "versions.yml:md5,72a7b07bc0e796ff6805c57f7340337f" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:48:23.095911334" + "timestamp": "2026-01-19T15:37:58.66559" }, "sarscov2 [bedgraph] [genome_sizes] - stub": { "content": [ @@ -75,10 +67,6 @@ "test.clip.bedGraph:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "2": [ - "versions.yml:md5,1202cdc73b5829361d5b150dcf7fe865", - "versions.yml:md5,72a7b07bc0e796ff6805c57f7340337f" - ], "bedgraph": [ [ { @@ -96,17 +84,13 @@ }, "test.bigWig:md5,d41d8cd98f00b204e9800998ecf8427e" ] - ], - "versions": [ - "versions.yml:md5,1202cdc73b5829361d5b150dcf7fe865", - "versions.yml:md5,72a7b07bc0e796ff6805c57f7340337f" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-18T10:48:45.587883209" + "timestamp": "2026-01-19T15:38:05.023743" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_hisat2/main.nf b/subworkflows/nf-core/fastq_align_hisat2/main.nf index 511fe035c..a7c2e6279 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/main.nf +++ b/subworkflows/nf-core/fastq_align_hisat2/main.nf @@ -11,7 +11,7 @@ workflow FASTQ_ALIGN_HISAT2 { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // diff --git a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config index 0f6d1abdc..ce6d2de89 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config +++ b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config @@ -1,26 +1,24 @@ -if (!params.skip_alignment && params.aligner == 'hisat2') { - process { - withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' { - ext.args = '--met-stderr --new-summary --dta' - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_unaligned ? it : null } - ] +process { + withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' { + ext.args = '--met-stderr --new-summary --dta' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds ? filename : null } + ], + [ + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { filename -> params.save_unaligned ? filename : null } ] - } + ] } } diff --git a/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test b/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test index 37dd098cd..221ce56d6 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test @@ -5,8 +5,20 @@ nextflow_workflow { workflow "FASTQ_ALIGN_HISAT2" config "./nextflow.config" - - + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fastq_align_hisat2" + + tag "hisat2/align" + tag "hisat2/build" + tag "hisat2/extractsplicesites" + + tag "samtools/flagstat" + tag "samtools/idxstats" + tag "samtools/index" + tag "samtools/sort" + tag "samtools/stats" + tag "subworkflows/bam_sort_stats_samtools" setup { run("HISAT2_EXTRACTSPLICESITES") { diff --git a/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test.snap index 6e0044c74..149d7dfba 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_hisat2/tests/main.nf.test.snap @@ -34,7 +34,7 @@ "id": "test", "single_end": true }, - "test.stats:md5,0ebab7bf6149e6378b263997d7073067" + "test.stats:md5,77fb048bfff1ac8f1e8c8f1e916303a6" ] ], [ @@ -47,19 +47,17 @@ ] ], [ - "versions.yml:md5,60b3d72afae0af5e6ba9d522ed2a865d", - "versions.yml:md5,6d9f7a6b7da221197ec81a78012dd306", - "versions.yml:md5,9bb4be2b6931086977d43355fd7c9edb", + "versions.yml:md5,18dfb578b63a4c06df9029d214d26b21", + "versions.yml:md5,6a468ef612faa1b6419ef5688c0c760f", "versions.yml:md5,e0481c30dd24b96ee2ace998a360ea29", - "versions.yml:md5,e5ba15fd38b21e5c3050edc8cf2ab665", - "versions.yml:md5,e65b217d1cb47f1c163fdc37023c0909" + "versions.yml:md5,ec6468a88403ffc733629109b26e2484" ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2025-06-02T15:25:13.627107" + "timestamp": "2025-11-01T03:11:11.528432" }, "sarscov2 - bam - single_end - stub": { "content": [ @@ -121,7 +119,7 @@ "id": "test", "single_end": true }, - "test.flagstat:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], "8": [ @@ -134,12 +132,10 @@ ] ], "9": [ - "versions.yml:md5,60b3d72afae0af5e6ba9d522ed2a865d", - "versions.yml:md5,6d9f7a6b7da221197ec81a78012dd306", - "versions.yml:md5,9bb4be2b6931086977d43355fd7c9edb", + "versions.yml:md5,18dfb578b63a4c06df9029d214d26b21", + "versions.yml:md5,6a468ef612faa1b6419ef5688c0c760f", "versions.yml:md5,e0481c30dd24b96ee2ace998a360ea29", - "versions.yml:md5,e5ba15fd38b21e5c3050edc8cf2ab665", - "versions.yml:md5,e65b217d1cb47f1c163fdc37023c0909" + "versions.yml:md5,ec6468a88403ffc733629109b26e2484" ], "bai": [ [ @@ -171,7 +167,7 @@ "id": "test", "single_end": true }, - "test.flagstat:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], "idxstats": [ @@ -211,20 +207,18 @@ ] ], "versions": [ - "versions.yml:md5,60b3d72afae0af5e6ba9d522ed2a865d", - "versions.yml:md5,6d9f7a6b7da221197ec81a78012dd306", - "versions.yml:md5,9bb4be2b6931086977d43355fd7c9edb", + "versions.yml:md5,18dfb578b63a4c06df9029d214d26b21", + "versions.yml:md5,6a468ef612faa1b6419ef5688c0c760f", "versions.yml:md5,e0481c30dd24b96ee2ace998a360ea29", - "versions.yml:md5,e5ba15fd38b21e5c3050edc8cf2ab665", - "versions.yml:md5,e65b217d1cb47f1c163fdc37023c0909" + "versions.yml:md5,ec6468a88403ffc733629109b26e2484" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2025-06-02T15:25:50.957335" + "timestamp": "2025-11-01T03:11:57.586261" }, "sarscov2 - bam - paired_end": { "content": [ @@ -261,7 +255,7 @@ "id": "test", "single_end": false }, - "test.stats:md5,74b78cbd41df459e1037735f714cda4f" + "test.stats:md5,4ecf87d51168df1d38cf3620afe6e2d2" ] ], [ @@ -274,19 +268,17 @@ ] ], [ - "versions.yml:md5,60b3d72afae0af5e6ba9d522ed2a865d", - "versions.yml:md5,6d9f7a6b7da221197ec81a78012dd306", - "versions.yml:md5,9bb4be2b6931086977d43355fd7c9edb", + "versions.yml:md5,18dfb578b63a4c06df9029d214d26b21", + "versions.yml:md5,6a468ef612faa1b6419ef5688c0c760f", "versions.yml:md5,e0481c30dd24b96ee2ace998a360ea29", - "versions.yml:md5,e5ba15fd38b21e5c3050edc8cf2ab665", - "versions.yml:md5,e65b217d1cb47f1c163fdc37023c0909" + "versions.yml:md5,ec6468a88403ffc733629109b26e2484" ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2025-06-02T15:25:32.205573" + "timestamp": "2025-11-01T03:11:28.95845" }, "sarscov2 - bam - paired_end - stub": { "content": [ @@ -348,7 +340,7 @@ "id": "test", "single_end": false }, - "test.flagstat:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], "8": [ @@ -361,12 +353,10 @@ ] ], "9": [ - "versions.yml:md5,60b3d72afae0af5e6ba9d522ed2a865d", - "versions.yml:md5,6d9f7a6b7da221197ec81a78012dd306", - "versions.yml:md5,9bb4be2b6931086977d43355fd7c9edb", + "versions.yml:md5,18dfb578b63a4c06df9029d214d26b21", + "versions.yml:md5,6a468ef612faa1b6419ef5688c0c760f", "versions.yml:md5,e0481c30dd24b96ee2ace998a360ea29", - "versions.yml:md5,e5ba15fd38b21e5c3050edc8cf2ab665", - "versions.yml:md5,e65b217d1cb47f1c163fdc37023c0909" + "versions.yml:md5,ec6468a88403ffc733629109b26e2484" ], "bai": [ [ @@ -398,7 +388,7 @@ "id": "test", "single_end": false }, - "test.flagstat:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], "idxstats": [ @@ -438,19 +428,17 @@ ] ], "versions": [ - "versions.yml:md5,60b3d72afae0af5e6ba9d522ed2a865d", - "versions.yml:md5,6d9f7a6b7da221197ec81a78012dd306", - "versions.yml:md5,9bb4be2b6931086977d43355fd7c9edb", + "versions.yml:md5,18dfb578b63a4c06df9029d214d26b21", + "versions.yml:md5,6a468ef612faa1b6419ef5688c0c760f", "versions.yml:md5,e0481c30dd24b96ee2ace998a360ea29", - "versions.yml:md5,e5ba15fd38b21e5c3050edc8cf2ab665", - "versions.yml:md5,e65b217d1cb47f1c163fdc37023c0909" + "versions.yml:md5,ec6468a88403ffc733629109b26e2484" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2025-06-02T15:26:10.919132" + "timestamp": "2025-11-01T03:12:21.057787" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf index 4213c1f13..4aa69b1de 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/main.nf @@ -30,7 +30,7 @@ def getFastpAdapterSequence(json_file) { try { return json['adapter_cutting']['read1_adapter_sequence'] } - catch (Exception ex) { + catch (Exception _ex) { return "" } } @@ -48,22 +48,22 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { min_trimmed_reads // integer: > 0 main: - ch_versions = Channel.empty() - fastqc_raw_html = Channel.empty() - fastqc_raw_zip = Channel.empty() - umi_log = Channel.empty() - trim_json = Channel.empty() - trim_html = Channel.empty() - trim_log = Channel.empty() - trim_reads_fail = Channel.empty() - trim_reads_merged = Channel.empty() - fastqc_trim_html = Channel.empty() - fastqc_trim_zip = Channel.empty() - trim_read_count = Channel.empty() - adapter_seq = Channel.empty() + ch_versions = channel.empty() + fastqc_raw_html = channel.empty() + fastqc_raw_zip = channel.empty() + umi_log = channel.empty() + trim_json = channel.empty() + trim_html = channel.empty() + trim_log = channel.empty() + trim_reads_fail = channel.empty() + trim_reads_merged = channel.empty() + fastqc_trim_html = channel.empty() + fastqc_trim_zip = channel.empty() + trim_read_count = channel.empty() + adapter_seq = channel.empty() // Split input channel for reads-only operations - reads_only = reads.map { meta, reads_files, adapter_fasta -> [ meta, reads_files ] } + reads_only = reads.map { meta, reads_files, _adapter_fasta -> [ meta, reads_files ] } if (!skip_fastqc) { FASTQC_RAW( @@ -101,7 +101,7 @@ workflow FASTQ_FASTQC_UMITOOLS_FASTP { .join( reads.map { meta, _original_reads, adapter_fasta -> [meta.id, adapter_fasta ?: []] } ) - .map { sample_id, meta, umi_reads_files, adapter_fasta -> [meta, umi_reads_files, adapter_fasta] } + .map { _sample_id, meta, umi_reads_files, adapter_fasta -> [meta, umi_reads_files, adapter_fasta] } FASTP( umi_reads_with_adapters, diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config index 38685f1d0..70b538622 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config @@ -1,79 +1,65 @@ -if (!(params.skip_fastqc || params.skip_qc)) { - if (params.trimmer == 'fastp') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { - ext.args = '--quiet' - ext.prefix = { "${meta.id}_raw" } - publishDir = [ - path: { "${params.outdir}/fastqc/raw" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { + ext.args = '--quiet' + ext.prefix = { "${meta.id}_raw" } + publishDir = [ + path: { "${params.outdir}/fastqc/raw" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { - ext.args = '--quiet' - ext.prefix = { "${meta.id}_trimmed" } - publishDir = [ - path: { "${params.outdir}/fastqc/trim" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { + ext.args = '--quiet' + ext.prefix = { "${meta.id}_trimmed" } + publishDir = [ + path: { "${params.outdir}/fastqc/trim" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } -} -if (!params.skip_trimming) { - if (params.trimmer == 'fastp') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { - ext.args = { params.extra_fastp_args ?: '' } - publishDir = [ - [ - path: { "${params.outdir}/${params.trimmer}" }, - mode: params.publish_dir_mode, - pattern: "*.{json,html}" - ], - [ - path: { "${params.outdir}/${params.trimmer}/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_trimmed ? it : null } - ] - ] - } - } + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { + ext.args = { params.extra_fastp_args ?: '' } + publishDir = [ + [ + path: { "${params.outdir}/${params.trimmer}" }, + mode: params.publish_dir_mode, + pattern: "*.{json,html}" + ], + [ + path: { "${params.outdir}/${params.trimmer}/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_trimmed ? filename : null } + ] + ] } -} -if (params.with_umi && !params.skip_umi_extract) { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:UMITOOLS_EXTRACT' { - ext.args = { [ - params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', - params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', - params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/umitools" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_umi_intermeds ? it : null } - ] + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:UMITOOLS_EXTRACT' { + ext.args = { [ + params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', + params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', + params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/umitools" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_umi_intermeds ? filename : null } ] - } + ] } } diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap index a8d65f34d..69700bee4 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/tests/main.nf.test.snap @@ -17,8 +17,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -45,10 +45,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:20:08.550512" + "timestamp": "2025-12-22T14:35:12.504866878" }, "sarscov2 paired-end [fastq] | with_umi": { "content": [ @@ -106,8 +106,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -256,8 +256,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -312,10 +312,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:22:24.661681" + "timestamp": "2025-12-22T14:36:40.325493233" }, "sarscov2 paired-end [fastq] | skip_trimming - stub": { "content": [ @@ -426,8 +426,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -454,10 +454,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:20:27.114955" + "timestamp": "2025-12-22T14:35:23.278839399" }, "sarscov2 paired-end [fastq] | min_trimmed_reads = 26 - stub": { "content": [ @@ -469,8 +469,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -625,8 +625,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -687,10 +687,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:23:04.183439" + "timestamp": "2025-12-22T14:37:07.276487362" }, "sarscov2 paired-end [fastq] | save_trimmed_fail": { "content": [ @@ -710,8 +710,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" + "test_R1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_R2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" ] ] ], @@ -732,8 +732,8 @@ }, [ "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + "test_R1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_R2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" ] ] ], @@ -748,10 +748,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:20:50.523405" + "timestamp": "2025-12-22T14:35:42.867923923" }, "sarscov2 paired-end [fastq] | skip_fastqc": { "content": [ @@ -771,8 +771,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -799,10 +799,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:24:28.439213" + "timestamp": "2025-12-22T14:34:35.586200372" }, "sarscov2 paired-end [fastq] | save_trimmed_fail - stub": { "content": [ @@ -814,8 +814,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -914,8 +914,8 @@ }, [ "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -974,8 +974,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1023,8 +1023,8 @@ }, [ "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1040,10 +1040,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:22:40.109502" + "timestamp": "2025-12-22T14:36:53.46095202" }, "sarscov2 paired-end [fastq] | skip_fastqc - stub": { "content": [ @@ -1055,8 +1055,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1157,8 +1157,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1213,10 +1213,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:58:15.135923" + "timestamp": "2025-12-22T14:36:15.492901489" }, "sarscov2 paired-end [fastq] | save_merged - stub": { "content": [ @@ -1228,8 +1228,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1384,8 +1384,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1446,10 +1446,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:22:52.290122" + "timestamp": "2025-12-22T14:37:00.501013971" }, "sarscov2 paired-end [fastq] | min_trimmed_reads = 26": { "content": [ @@ -1469,8 +1469,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] ], @@ -1503,10 +1503,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:21:24.806082" + "timestamp": "2025-12-22T14:36:02.43535273" }, "sarscov2 paired-end [fastq]": { "content": [ @@ -1526,8 +1526,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -1554,10 +1554,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:14:23.060632" + "timestamp": "2025-12-22T14:34:28.767027183" }, "sarscov2 paired-end [fastq] - stub": { "content": [ @@ -1569,8 +1569,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1719,8 +1719,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1775,10 +1775,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:21:39.80616" + "timestamp": "2025-12-22T14:36:09.425172485" }, "sarscov2 paired-end [fastq] | save_merged": { "content": [ @@ -1798,8 +1798,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] ], @@ -1832,10 +1832,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:21:11.890817" + "timestamp": "2025-12-22T14:35:52.618388974" }, "sarscov2 paired-end [fastq] | with_umi - stub": { "content": [ @@ -2076,8 +2076,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -2226,8 +2226,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -2282,9 +2282,9 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-10-28T12:22:15.770359" + "timestamp": "2025-12-22T14:36:33.351884506" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/main.nf b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/main.nf index f9828ae80..8c9e43d64 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/main.nf +++ b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/main.nf @@ -36,9 +36,9 @@ workflow FASTQ_FASTQC_UMITOOLS_TRIMGALORE { min_trimmed_reads // integer: > 0 main: - ch_versions = Channel.empty() - fastqc_html = Channel.empty() - fastqc_zip = Channel.empty() + ch_versions = channel.empty() + fastqc_html = channel.empty() + fastqc_zip = channel.empty() if (!skip_fastqc) { FASTQC(reads) fastqc_html = FASTQC.out.html @@ -46,7 +46,7 @@ workflow FASTQ_FASTQC_UMITOOLS_TRIMGALORE { } umi_reads = reads - umi_log = Channel.empty() + umi_log = channel.empty() if (with_umi && !skip_umi_extract) { UMITOOLS_EXTRACT(reads) umi_reads = UMITOOLS_EXTRACT.out.reads @@ -56,19 +56,19 @@ workflow FASTQ_FASTQC_UMITOOLS_TRIMGALORE { // Discard R1 / R2 if required if (umi_discard_read in [1, 2]) { UMITOOLS_EXTRACT.out.reads - .map { meta, reads -> - meta.single_end ? [meta, reads] : [meta + ['single_end': true], reads[umi_discard_read % 2]] + .map { meta, reads_ -> + meta.single_end ? [meta, reads_] : [meta + ['single_end': true], reads_[umi_discard_read % 2]] } .set { umi_reads } } } trim_reads = umi_reads - trim_unpaired = Channel.empty() - trim_html = Channel.empty() - trim_zip = Channel.empty() - trim_log = Channel.empty() - trim_read_count = Channel.empty() + trim_unpaired = channel.empty() + trim_html = channel.empty() + trim_zip = channel.empty() + trim_log = channel.empty() + trim_read_count = channel.empty() if (!skip_trimming) { TRIMGALORE(umi_reads) trim_unpaired = TRIMGALORE.out.unpaired diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config index 46c7a72b6..221f16dff 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config @@ -1,89 +1,74 @@ -if (!(params.skip_fastqc || params.skip_qc)) { - if (params.trimmer == 'trimgalore') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC' { - ext.args = '--quiet' - ext.prefix = { "${meta.id}_raw" } - publishDir = [ - path: { "${params.outdir}/fastqc/raw" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } +process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC' { + ext.args = '--quiet' + ext.prefix = { "${meta.id}_raw" } + publishDir = [ + path: { "${params.outdir}/fastqc/raw" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } -} - -if (!params.skip_trimming) { - if (params.trimmer == 'trimgalore') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE' { - ext.args = { - // Function to convert argument strings into a map - def argsToMap = { String args -> - args.split("\\s(?=--)").collectEntries { - def parts = it.trim().split(/\s+/, 2) - [(parts.first()): parts.last()] - } - } - - // Initialize the map with preconfigured values - def preset_args_map = argsToMap(""" - --fastqc_args '-t ${task.cpus}' - """.trim()) - // Consolidate the extra arguments - def final_args_map = preset_args_map + (params.extra_trimgalore_args ? argsToMap(params.extra_trimgalore_args) : [:]) + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE' { + ext.args = { + // Initialize the map with preconfigured values + def preset_args_map = ["--fastqc_args": "'-t ${task.cpus}'"] - // Convert the map back to a list and then to a single string - final_args_map.collect { key, value -> "${key} ${value}" }.join(' ').trim() + // Parse extra args if provided + def extra_args_map = [:] + if (params.extra_trimgalore_args) { + params.extra_trimgalore_args.split("\\s(?=--)").each { arg -> + def parts = arg.trim().split(/\s+/, 2) + extra_args_map[parts.first()] = parts.last() } - ext.prefix = { "${meta.id}_trimmed" } - publishDir = [ - [ - path: { "${params.outdir}/fastqc/trim" }, - mode: params.publish_dir_mode, - pattern: "*.{html,zip}" - ], - [ - path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fq.gz", - saveAs: { params.save_trimmed ? it : null } - ], - [ - path: { "${params.outdir}/${params.trimmer}" }, - mode: params.publish_dir_mode, - pattern: "*.txt" - ] - ] } + + // Consolidate the arguments (extra args override preset) + def final_args_map = preset_args_map + extra_args_map + + // Convert the map back to a single string + final_args_map.collect { key, value -> "${key} ${value}" }.join(' ').trim() } + ext.prefix = { "${meta.id}_trimmed" } + publishDir = [ + [ + path: { "${params.outdir}/fastqc/trim" }, + mode: params.publish_dir_mode, + pattern: "*.{html,zip}" + ], + [ + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fq.gz", + saveAs: { filename -> params.save_trimmed ? filename : null } + ], + [ + path: { "${params.outdir}/${params.trimmer}" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ] + ] } -} -if (params.with_umi && !params.skip_umi_extract) { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:UMITOOLS_EXTRACT' { - ext.args = { [ - params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', - params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', - params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/umitools" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_umi_intermeds ? it : null } - ] + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:UMITOOLS_EXTRACT' { + ext.args = { [ + params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', + params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', + params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/umitools" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_umi_intermeds ? filename : null } ] - } + ] } } diff --git a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf index 971c6e285..b2bffca8c 100644 --- a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf +++ b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/main.nf @@ -61,9 +61,9 @@ def getSalmonInferredStrandedness(json_file, stranded_threshold = 0.8, unstrande // https://groups.google.com/g/sailfish-users/c/yxzBDv6NB6I def unstrandedKeys = ['IU', 'U', 'MU'] - def forwardFragments = forwardKeys.collect { libCounts[it] ?: 0 }.sum() - def reverseFragments = reverseKeys.collect { libCounts[it] ?: 0 }.sum() - def unstrandedFragments = unstrandedKeys.collect { libCounts[it] ?: 0 }.sum() + def forwardFragments = forwardKeys.collect { key -> libCounts[key] ?: 0 }.sum() + def reverseFragments = reverseKeys.collect { key -> libCounts[key] ?: 0 }.sum() + def unstrandedFragments = unstrandedKeys.collect { key -> libCounts[key] ?: 0 }.sum() // Use shared calculation function to determine strandedness return calculateStrandedness(forwardFragments, reverseFragments, unstrandedFragments, stranded_threshold, unstranded_threshold) @@ -126,11 +126,11 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { main: - ch_versions = Channel.empty() - ch_filtered_reads = Channel.empty() - ch_trim_read_count = Channel.empty() - ch_multiqc_files = Channel.empty() - ch_lint_log = Channel.empty() + ch_versions = channel.empty() + ch_filtered_reads = channel.empty() + ch_trim_read_count = channel.empty() + ch_multiqc_files = channel.empty() + ch_lint_log = channel.empty() ch_reads .branch { meta, fastqs -> @@ -158,7 +158,7 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { ) ch_versions = ch_versions.mix(FQ_LINT.out.versions.first()) ch_lint_log = ch_lint_log.mix(FQ_LINT.out.lint) - ch_filtered_reads = ch_filtered_reads.join(FQ_LINT.out.lint.map { it[0] }) + ch_filtered_reads = ch_filtered_reads.join(FQ_LINT.out.lint.map { meta, _lint -> meta }) } // @@ -233,7 +233,7 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { .set { ch_fail_trimming_multiqc } ch_multiqc_files = ch_multiqc_files.mix( - ch_fail_trimming_multiqc.collectFile(name: 'fail_trimmed_samples_mqc.tsv').map { [[:], it] } + ch_fail_trimming_multiqc.collectFile(name: 'fail_trimmed_samples_mqc.tsv').map { file -> [[:], file] } ) if ((!skip_linting) && (!skip_trimming)) { @@ -241,7 +241,7 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { ch_filtered_reads ) ch_lint_log = ch_lint_log.mix(FQ_LINT_AFTER_TRIMMING.out.lint) - ch_filtered_reads = ch_filtered_reads.join(FQ_LINT_AFTER_TRIMMING.out.lint.map { it[0] }) + ch_filtered_reads = ch_filtered_reads.join(FQ_LINT_AFTER_TRIMMING.out.lint.map { meta, _lint -> meta }) } // @@ -258,7 +258,6 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { BBMAP_BBSPLIT.out.primary_fastq.set { ch_filtered_reads } - ch_versions = ch_versions.mix(BBMAP_BBSPLIT.out.versions.first()) ch_multiqc_files = ch_multiqc_files.mix(BBMAP_BBSPLIT.out.stats) if (!skip_linting) { @@ -266,7 +265,7 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { ch_filtered_reads ) ch_lint_log = ch_lint_log.mix(FQ_LINT_AFTER_BBSPLIT.out.lint) - ch_filtered_reads = ch_filtered_reads.join(FQ_LINT_AFTER_BBSPLIT.out.lint.map { it[0] }) + ch_filtered_reads = ch_filtered_reads.join(FQ_LINT_AFTER_BBSPLIT.out.lint.map { meta, _lint -> meta }) } } @@ -293,7 +292,7 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { ch_filtered_reads ) ch_lint_log = ch_lint_log.mix(FQ_LINT_AFTER_RIBO_REMOVAL.out.lint) - ch_filtered_reads = ch_filtered_reads.join(FQ_LINT_AFTER_RIBO_REMOVAL.out.lint.map { it[0] }) + ch_filtered_reads = ch_filtered_reads.join(FQ_LINT_AFTER_RIBO_REMOVAL.out.lint.map { meta, _lint -> meta }) } } @@ -314,7 +313,7 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { ch_fasta .combine(ch_strand_fastq.auto_strand) - .map { it.first() } + .map { items -> items.first() } .first() .set { ch_genome_fasta } @@ -345,6 +344,6 @@ workflow FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS { lint_log = ch_lint_log reads = ch_strand_inferred_fastq trim_read_count = ch_trim_read_count - multiqc_files = ch_multiqc_files.transpose().map { it[1] } + multiqc_files = ch_multiqc_files.transpose().map { _meta, file -> file } versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/nextflow.config b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/nextflow.config index 4346c7bb0..864648924 100644 --- a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/nextflow.config +++ b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/nextflow.config @@ -33,125 +33,112 @@ process { ] } -} + // + // rRNA FASTA preparation (for SortMeRNA and Bowtie2) + // -// -// rRNA FASTA preparation (for SortMeRNA and Bowtie2) -// - -if (params.remove_ribo_rna && params.ribo_removal_tool in ['sortmerna', 'bowtie2']) { - process { - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SEQKIT_REPLACE' { - ext.args = '--pattern "^(.+)" --replacement "{fbn}_\\$1"' - ext.prefix = { "${meta.id}_prefixed" } - } - - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SEQKIT_REPLACE_U2T' { - ext.args = '--by-seq --pattern "[Uu]" --replacement "T"' - ext.prefix = { "${meta.id}_converted" } - } + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SEQKIT_REPLACE' { + ext.args = '--pattern "^(.+)" --replacement "{fbn}_\\$1"' + ext.prefix = { "${meta.id}_prefixed" } } -} -// -// Ribodetector rRNA removal options -// + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SEQKIT_REPLACE_U2T' { + ext.args = '--by-seq --pattern "[Uu]" --replacement "T"' + ext.prefix = { "${meta.id}_converted" } + } + + // + // Ribodetector rRNA removal options + // + + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SEQKIT_STATS' { + ext.args = '--all' + ext.prefix = { "${meta.id}.rrna_removal_stats" } + publishDir = [ + path: { "${params.outdir}/ribodetector" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } -if (params.remove_ribo_rna && params.ribo_removal_tool == 'ribodetector') { - process { - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SEQKIT_STATS' { - ext.args = '--all' - ext.prefix = { "${meta.id}.rrna_removal_stats" } - publishDir = [ + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:RIBODETECTOR' { + ext.args = '-e rrna' + cpus = 1 + publishDir = [ + [ path: { "${params.outdir}/ribodetector" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:RIBODETECTOR' { - ext.args = '-e rrna' - cpus = 1 - publishDir = [ - [ - path: { "${params.outdir}/ribodetector" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_non_ribo_reads ? "${params.outdir}/ribodetector" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_non_ribo_reads ? it : null } - ] + pattern: "*.log" + ], + [ + path: { params.save_non_ribo_reads ? "${params.outdir}/ribodetector" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_non_ribo_reads ? filename : null } ] - } + ] } -} -// -// Bowtie2 rRNA removal options -// + // + // Bowtie2 rRNA removal options + // + + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:BOWTIE2_BUILD' { + publishDir = [ + path: { "${params.outdir}/bowtie2_rrna/index" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } + ] + } -if (params.remove_ribo_rna && params.ribo_removal_tool == 'bowtie2') { - process { - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:BOWTIE2_BUILD' { - publishDir = [ - path: { "${params.outdir}/bowtie2_rrna/index" }, + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:BOWTIE2_ALIGN$' { + ext.args = '--very-sensitive-local' + ext.prefix = { "${meta.id}.bowtie2_rrna" } + publishDir = [ + [ + path: { "${params.outdir}/bowtie2_rrna" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : params.save_reference ? filename : null } - ] - } - - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:BOWTIE2_ALIGN$' { - ext.args = '--very-sensitive-local' - ext.prefix = { "${meta.id}.bowtie2_rrna" } - publishDir = [ - [ - path: { "${params.outdir}/bowtie2_rrna" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_non_ribo_reads ? "${params.outdir}/bowtie2_rrna" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_non_ribo_reads ? it : null } - ] - ] - } - - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:BOWTIE2_ALIGN_PE$' { - ext.args = '--very-sensitive-local' - ext.prefix = { "${meta.id}.bowtie2_rrna" } - publishDir = [ - [ - path: { "${params.outdir}/bowtie2_rrna" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_non_ribo_reads ? "${params.outdir}/bowtie2_rrna" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_non_ribo_reads ? it : null } - ] + pattern: "*.log" + ], + [ + path: { params.save_non_ribo_reads ? "${params.outdir}/bowtie2_rrna" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_non_ribo_reads ? filename : null } ] - } + ] + } - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SAMTOOLS_VIEW_BOWTIE2' { - ext.prefix = { "${meta.id}.bowtie2_unmapped" } - ext.args = '-f 12' // Keep only pairs where BOTH mates are unmapped - publishDir = [ - enabled: false + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:BOWTIE2_ALIGN_PE$' { + ext.args = '--very-sensitive-local' + ext.prefix = { "${meta.id}.bowtie2_rrna" } + publishDir = [ + [ + path: { "${params.outdir}/bowtie2_rrna" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_non_ribo_reads ? "${params.outdir}/bowtie2_rrna" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { filename -> params.save_non_ribo_reads ? filename : null } ] - } + ] + } - withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SAMTOOLS_FASTQ_BOWTIE2' { - ext.prefix = { "${meta.id}.bowtie2_filtered" } - publishDir = [ - enabled: false - ] - } + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SAMTOOLS_VIEW_BOWTIE2' { + ext.prefix = { "${meta.id}.bowtie2_unmapped" } + ext.args = '-f 12' // Keep only pairs where BOTH mates are unmapped + publishDir = [ + enabled: false + ] + } + + withName: '.*:FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS:.*:SAMTOOLS_FASTQ_BOWTIE2' { + ext.prefix = { "${meta.id}.bowtie2_filtered" } + publishDir = [ + enabled: false + ] } } diff --git a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/tests/main.nf.test.snap index de6023083..425f50bc1 100644 --- a/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/tests/main.nf.test.snap @@ -56,7 +56,6 @@ "versions.yml:md5,4f417b1f2243b8fdbb4d500d297275d7", "versions.yml:md5,62a1dcf235b26d36556128000350f873", "versions.yml:md5,65b00c07a75fb33c090cfdc3caf6c670", - "versions.yml:md5,703785e3662b35a0d9e533f0047fee5c", "versions.yml:md5,7da162ffef1721b87e11194d10acaeee", "versions.yml:md5,916a9eda18796248d67f0775546401a1", "versions.yml:md5,9c1eaf84889a0aa32a7e224bb59cc614", @@ -67,6 +66,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T15:09:04.590361686" + "timestamp": "2026-01-19T16:03:29.591258406" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_remove_rrna/main.nf b/subworkflows/nf-core/fastq_remove_rrna/main.nf index f077c9494..11fc468cd 100644 --- a/subworkflows/nf-core/fastq_remove_rrna/main.nf +++ b/subworkflows/nf-core/fastq_remove_rrna/main.nf @@ -21,13 +21,13 @@ def getReadLengthFromSeqkitStats(stats_file) { } def header = lines[0].split('\t') - def avgLenIdx = header.findIndexOf { it == 'avg_len' } + def avgLenIdx = header.findIndexOf { col -> col == 'avg_len' } if (avgLenIdx < 0) { return 100 // Default fallback if column not found } // Calculate mean avg_len across all files in the stats output - def avgLens = lines[1..-1].collect { it.split('\t')[avgLenIdx] as float } + def avgLens = lines[1..-1].collect { line -> line.split('\t')[avgLenIdx] as float } def meanAvgLen = avgLens.sum() / avgLens.size() return Math.round(meanAvgLen) as int @@ -45,14 +45,14 @@ workflow FASTQ_REMOVE_RRNA { main: - ch_versions = Channel.empty() - ch_multiqc_files = Channel.empty() + ch_versions = channel.empty() + ch_multiqc_files = channel.empty() ch_filtered_reads = ch_reads if (ribo_removal_tool == 'sortmerna') { ch_sortmerna_fastas = ch_rrna_fastas .collect() - .map { [[id: 'rrna_refs'], it] } + .map { fastas -> [[id: 'rrna_refs'], fastas] } if (make_sortmerna_index) { SORTMERNA_INDEX( @@ -71,7 +71,6 @@ workflow FASTQ_REMOVE_RRNA { ch_filtered_reads = SORTMERNA.out.reads ch_multiqc_files = ch_multiqc_files.mix(SORTMERNA.out.log) - ch_versions = ch_versions.mix(SORTMERNA.out.versions.first()) } else if (ribo_removal_tool == 'ribodetector') { // Run seqkit stats to determine average read length @@ -106,7 +105,7 @@ workflow FASTQ_REMOVE_RRNA { // Process each rRNA file to add unique prefixes and convert U to T // This prevents duplicate sequence IDs in SAM header when combining databases ch_rrna_fastas - .map { fasta -> [[id: fasta.baseName], fasta] } + .map { fasta_file -> [[id: fasta_file.baseName], fasta_file] } .set { ch_rrna_with_meta } // Step 1: Add filename prefixes to sequence headers @@ -117,7 +116,7 @@ workflow FASTQ_REMOVE_RRNA { // Step 2: Convert U to T in sequences (RNA to DNA) SEQKIT_REPLACE.out.fastx - .map { meta, fasta -> [[id: "${meta.id}_dna"], fasta] } + .map { meta, fasta_file -> [[id: "${meta.id}_dna"], fasta_file] } .set { ch_prefixed_fastas } SEQKIT_REPLACE_U2T( @@ -127,9 +126,9 @@ workflow FASTQ_REMOVE_RRNA { // Collect processed files (already prefixed and U->T converted) SEQKIT_REPLACE_U2T.out.fastx - .map { meta, fasta -> fasta } + .map { _meta, fasta_file -> fasta_file } .collectFile(name: 'rrna_combined_dna.fasta', newLine: true) - .map { fasta -> [[id: 'rrna_refs'], fasta] } + .map { fasta_file -> [[id: 'rrna_refs'], fasta_file] } .set { ch_combined_fasta } BOWTIE2_BUILD( @@ -141,7 +140,7 @@ workflow FASTQ_REMOVE_RRNA { // Branch reads by single-end vs paired-end for different filtering strategies ch_filtered_reads - .branch { meta, reads -> + .branch { meta, _reads -> single_end: meta.single_end paired_end: !meta.single_end } @@ -177,7 +176,7 @@ workflow FASTQ_REMOVE_RRNA { // Filter BAM for read pairs where BOTH mates are unmapped (flag 12 = 4 + 8) // This removes any pair where at least one mate aligned to rRNA SAMTOOLS_VIEW_BOWTIE2( - BOWTIE2_ALIGN_PE.out.bam.map { meta, bam -> [meta, bam, []] }, + BOWTIE2_ALIGN_PE.out.bam.map { meta, bam_file -> [meta, bam_file, []] }, [[], []], // No reference fasta [], // No qname file [] // No index format diff --git a/subworkflows/nf-core/fastq_remove_rrna/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_remove_rrna/tests/main.nf.test.snap index 8e7720d50..95554e5a8 100644 --- a/subworkflows/nf-core/fastq_remove_rrna/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_remove_rrna/tests/main.nf.test.snap @@ -18,7 +18,7 @@ "homo_sapiens single-end [fastq] sortmerna": { "content": [ [ - "versions.yml:md5,d375aebf400213ebbd6e104a331b27ae" + ], "bdea4e3bbdbb7c301ff578b9d8976fb6" ], @@ -26,7 +26,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T15:49:01.125046076" + "timestamp": "2026-01-19T15:59:26.891896799" }, "homo_sapiens paired-end [fastq] bowtie2 with duplicate rrna databases": { "content": [ @@ -49,7 +49,7 @@ "homo_sapiens paired-end [fastq] sortmerna": { "content": [ [ - "versions.yml:md5,d375aebf400213ebbd6e104a331b27ae" + ], "bdea4e3bbdbb7c301ff578b9d8976fb6", "1b83618177abebeb38c29d2258efdd4f" @@ -58,7 +58,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-10T15:48:17.279619846" + "timestamp": "2026-01-19T15:58:00.962491308" }, "homo_sapiens paired-end [fastq] ribodetector": { "content": [ diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/main.nf b/subworkflows/nf-core/fastq_subsample_fq_salmon/main.nf index bac581cfa..5d85a5840 100644 --- a/subworkflows/nf-core/fastq_subsample_fq_salmon/main.nf +++ b/subworkflows/nf-core/fastq_subsample_fq_salmon/main.nf @@ -18,7 +18,7 @@ workflow FASTQ_SUBSAMPLE_FQ_SALMON { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Create Salmon index if required @@ -40,7 +40,6 @@ workflow FASTQ_SUBSAMPLE_FQ_SALMON { def lib_type = 'A' def alignment_mode = false SALMON_QUANT ( FQ_SUBSAMPLE.out.fastq, ch_index, ch_gtf, ch_transcript_fasta, alignment_mode, lib_type ) - ch_versions = ch_versions.mix(SALMON_QUANT.out.versions.first()) emit: index = ch_index // channel: [ index ] diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test b/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test index 077d9c758..3e7a8875d 100644 --- a/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test @@ -4,6 +4,13 @@ nextflow_workflow { script "../main.nf" workflow "FASTQ_SUBSAMPLE_FQ_SALMON" config "./nextflow.config" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fastq_subsample_fq_salmon" + tag "fastq_subsample_fq_salmon" + tag "salmon/index" + tag "fq/subsample" + tag "salmon/quant" test("homo_sapiens paired-end [fastq]") { diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test.snap index d0509e559..30fd3ce63 100644 --- a/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_subsample_fq_salmon/tests/main.nf.test.snap @@ -29,15 +29,14 @@ ] ], [ - "versions.yml:md5,acbe540e7ede18f7999975729fde869c", "versions.yml:md5,eb47b2c20a3565e58b613f66521da320" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-19T17:28:10.525956442" + "timestamp": "2026-01-19T15:48:44.886628" }, "homo_sapiens paired-end [fastq] - stub": { "content": [ @@ -103,7 +102,6 @@ ] ], "5": [ - "versions.yml:md5,acbe540e7ede18f7999975729fde869c", "versions.yml:md5,eb47b2c20a3565e58b613f66521da320" ], "index": [ @@ -167,15 +165,14 @@ ] ], "versions": [ - "versions.yml:md5,acbe540e7ede18f7999975729fde869c", "versions.yml:md5,eb47b2c20a3565e58b613f66521da320" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-10-19T17:28:28.896824153" + "timestamp": "2026-01-19T15:48:54.66733" } } \ No newline at end of file diff --git a/subworkflows/nf-core/quantify_pseudo_alignment/main.nf b/subworkflows/nf-core/quantify_pseudo_alignment/main.nf index ba8e91ac0..345d8699c 100644 --- a/subworkflows/nf-core/quantify_pseudo_alignment/main.nf +++ b/subworkflows/nf-core/quantify_pseudo_alignment/main.nf @@ -26,7 +26,7 @@ workflow QUANTIFY_PSEUDO_ALIGNMENT { kallisto_quant_fraglen_sd // val: Estimated standard error for fragment length required by Kallisto in single-end mode main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Quantify and merge counts across samples @@ -43,7 +43,6 @@ workflow QUANTIFY_PSEUDO_ALIGNMENT { ) ch_pseudo_results = SALMON_QUANT.out.results ch_pseudo_multiqc = ch_pseudo_results - ch_versions = ch_versions.mix(SALMON_QUANT.out.versions.first()) } else { KALLISTO_QUANT ( reads, @@ -59,8 +58,8 @@ workflow QUANTIFY_PSEUDO_ALIGNMENT { } CUSTOM_TX2GENE ( - gtf.map { [ [:], it ] }, - ch_pseudo_results.collect{ it[1] }.map { [ [:], it ] }, + gtf.map { gtf_file -> [ [:], gtf_file ] }, + ch_pseudo_results.collect{ meta_results -> meta_results[1] }.map { results -> [ [:], results ] }, pseudo_aligner, gtf_id_attribute, gtf_extra_attribute @@ -68,7 +67,7 @@ workflow QUANTIFY_PSEUDO_ALIGNMENT { ch_versions = ch_versions.mix(CUSTOM_TX2GENE.out.versions) TXIMETA_TXIMPORT ( - ch_pseudo_results.collect{ it[1] }.map { [ ['id': 'all_samples'], it ] }, + ch_pseudo_results.collect{ meta_results -> meta_results[1] }.map { results -> [ ['id': 'all_samples'], results ] }, CUSTOM_TX2GENE.out.tx2gene, pseudo_aligner ) @@ -79,7 +78,7 @@ workflow QUANTIFY_PSEUDO_ALIGNMENT { .join(TXIMETA_TXIMPORT.out.counts_gene_scaled) .join(TXIMETA_TXIMPORT.out.lengths_gene) .join(TXIMETA_TXIMPORT.out.tpm_gene) - .map{tuple(it[0], it.tail())} + .map{ row -> tuple(row[0], row.tail()) } SE_GENE_UNIFIED ( ch_gene_unified, @@ -91,7 +90,7 @@ workflow QUANTIFY_PSEUDO_ALIGNMENT { ch_transcript_unified = TXIMETA_TXIMPORT.out.counts_transcript .join(TXIMETA_TXIMPORT.out.lengths_transcript) .join(TXIMETA_TXIMPORT.out.tpm_transcript) - .map{tuple(it[0], it.tail())} + .map{ row -> tuple(row[0], row.tail()) } SE_TRANSCRIPT_UNIFIED ( ch_transcript_unified, diff --git a/subworkflows/nf-core/quantify_pseudo_alignment/nextflow.config b/subworkflows/nf-core/quantify_pseudo_alignment/nextflow.config index b82edff51..c7dc310cd 100644 --- a/subworkflows/nf-core/quantify_pseudo_alignment/nextflow.config +++ b/subworkflows/nf-core/quantify_pseudo_alignment/nextflow.config @@ -1,63 +1,54 @@ -if (!params.skip_pseudo_alignment && params.pseudo_aligner == 'salmon') { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT' { - ext.args = { params.extra_salmon_quant_args ?: '' } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') || filename.endsWith('_format_counts.json') ? null : filename } - ] - } +process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT' { + ext.args = { params.extra_salmon_quant_args ?: '' } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') || filename.endsWith('_format_counts.json') ? null : filename } + ] } -} -if (!params.skip_pseudo_alignment && params.pseudo_aligner == 'kallisto') { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:KALLISTO_QUANT' { - ext.args = params.extra_kallisto_quant_args ?: '' - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.run_info.json') || filename.endsWith('.log') ? null : filename } - ] - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:KALLISTO_QUANT' { + ext.args = params.extra_kallisto_quant_args ?: '' + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.run_info.json') || filename.endsWith('.log') ? null : filename } + ] } -} -if (!params.skip_pseudo_alignment && params.pseudo_aligner) { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:CUSTOM_TX2GENE' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:CUSTOM_TX2GENE' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMETA_TXIMPORT' { - ext.prefix = { "${quant_type}.merged" } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMETA_TXIMPORT' { + ext.prefix = { "${quant_type}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.log') ? null : filename } - ] - } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_GENE_UNIFIED' { - ext.prefix = { "${meta.id}_gene" } - ext.args = '--assay_names counts,counts_length_scaled,counts_scaled,lengths,tpm' - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.log') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_GENE_UNIFIED' { + ext.prefix = { "${meta.id}_gene" } + ext.args = '--assay_names counts,counts_length_scaled,counts_scaled,lengths,tpm' + } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_TRANSCRIPT_UNIFIED' { - ext.prefix = { "${meta.id}_transcript" } - ext.args = '--assay_names counts,lengths,tpm' - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_TRANSCRIPT_UNIFIED' { + ext.prefix = { "${meta.id}_transcript" } + ext.args = '--assay_names counts,lengths,tpm' } } diff --git a/subworkflows/nf-core/quantify_pseudo_alignment/tests/main.nf.test.snap b/subworkflows/nf-core/quantify_pseudo_alignment/tests/main.nf.test.snap index 73bf4a9a7..24cc0349c 100644 --- a/subworkflows/nf-core/quantify_pseudo_alignment/tests/main.nf.test.snap +++ b/subworkflows/nf-core/quantify_pseudo_alignment/tests/main.nf.test.snap @@ -108,8 +108,7 @@ "versions.yml:md5,91a01dde9c54db9929e15cad7ebb94c2", "versions.yml:md5,c10c51dad5b22c80ebacb805645137ad", "versions.yml:md5,c62905e3a7ad1dc887639b9c7bb1e0cb", - "versions.yml:md5,d5243289a32cde9e90e20f1a202bb566", - "versions.yml:md5,df9cd6573913e1c58ebc6714e6318432" + "versions.yml:md5,d5243289a32cde9e90e20f1a202bb566" ], "2": [ [ @@ -279,16 +278,15 @@ "versions.yml:md5,91a01dde9c54db9929e15cad7ebb94c2", "versions.yml:md5,c10c51dad5b22c80ebacb805645137ad", "versions.yml:md5,c62905e3a7ad1dc887639b9c7bb1e0cb", - "versions.yml:md5,d5243289a32cde9e90e20f1a202bb566", - "versions.yml:md5,df9cd6573913e1c58ebc6714e6318432" + "versions.yml:md5,d5243289a32cde9e90e20f1a202bb566" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-04-22T14:11:41.843291814" + "timestamp": "2026-01-19T15:56:42.602747466" }, "kallisto - stub": { "content": [ @@ -569,14 +567,13 @@ "versions.yml:md5,91a01dde9c54db9929e15cad7ebb94c2", "versions.yml:md5,be28c034506b52fd01f9b2fb0fc678e3", "versions.yml:md5,c62905e3a7ad1dc887639b9c7bb1e0cb", - "versions.yml:md5,d5243289a32cde9e90e20f1a202bb566", - "versions.yml:md5,df9cd6573913e1c58ebc6714e6318432" + "versions.yml:md5,d5243289a32cde9e90e20f1a202bb566" ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-04-22T17:47:14.235741773" + "timestamp": "2026-01-19T15:50:12.234926" } } \ No newline at end of file diff --git a/tests/bam_input.nf.test.snap b/tests/bam_input.nf.test.snap index faf018521..3eb3b177b 100644 --- a/tests/bam_input.nf.test.snap +++ b/tests/bam_input.nf.test.snap @@ -1259,48 +1259,6 @@ "multiqc/multiqc_report_plots/svg/star_rsem_deseq2_pca.svg", "pipeline_info", "pipeline_info/nf_core_rnaseq_software_mqc_versions.yml", - "rsem", - "rsem/RAP1_IAA_30M_REP1.genes.results", - "rsem/RAP1_IAA_30M_REP1.isoforms.results", - "rsem/RAP1_IAA_30M_REP1.stat", - "rsem/RAP1_IAA_30M_REP1.stat/RAP1_IAA_30M_REP1.cnt", - "rsem/RAP1_IAA_30M_REP1.stat/RAP1_IAA_30M_REP1.model", - "rsem/RAP1_IAA_30M_REP1.stat/RAP1_IAA_30M_REP1.theta", - "rsem/RAP1_IAA_30M_REP1.transcript.bam", - "rsem/RAP1_UNINDUCED_REP1.genes.results", - "rsem/RAP1_UNINDUCED_REP1.isoforms.results", - "rsem/RAP1_UNINDUCED_REP1.stat", - "rsem/RAP1_UNINDUCED_REP1.stat/RAP1_UNINDUCED_REP1.cnt", - "rsem/RAP1_UNINDUCED_REP1.stat/RAP1_UNINDUCED_REP1.model", - "rsem/RAP1_UNINDUCED_REP1.stat/RAP1_UNINDUCED_REP1.theta", - "rsem/RAP1_UNINDUCED_REP1.transcript.bam", - "rsem/RAP1_UNINDUCED_REP2.genes.results", - "rsem/RAP1_UNINDUCED_REP2.isoforms.results", - "rsem/RAP1_UNINDUCED_REP2.stat", - "rsem/RAP1_UNINDUCED_REP2.stat/RAP1_UNINDUCED_REP2.cnt", - "rsem/RAP1_UNINDUCED_REP2.stat/RAP1_UNINDUCED_REP2.model", - "rsem/RAP1_UNINDUCED_REP2.stat/RAP1_UNINDUCED_REP2.theta", - "rsem/RAP1_UNINDUCED_REP2.transcript.bam", - "rsem/WT_REP1.genes.results", - "rsem/WT_REP1.isoforms.results", - "rsem/WT_REP1.stat", - "rsem/WT_REP1.stat/WT_REP1.cnt", - "rsem/WT_REP1.stat/WT_REP1.model", - "rsem/WT_REP1.stat/WT_REP1.theta", - "rsem/WT_REP1.transcript.bam", - "rsem/WT_REP2.genes.results", - "rsem/WT_REP2.isoforms.results", - "rsem/WT_REP2.stat", - "rsem/WT_REP2.stat/WT_REP2.cnt", - "rsem/WT_REP2.stat/WT_REP2.model", - "rsem/WT_REP2.stat/WT_REP2.theta", - "rsem/WT_REP2.transcript.bam", - "rsem/rsem.merged.gene_counts.tsv", - "rsem/rsem.merged.gene_tpm.tsv", - "rsem/rsem.merged.genes_long.tsv", - "rsem/rsem.merged.isoforms_long.tsv", - "rsem/rsem.merged.transcript_counts.tsv", - "rsem/rsem.merged.transcript_tpm.tsv", "samtools", "samtools/RAP1_IAA_30M_REP1.sorted.bam.bai", "samtools/RAP1_UNINDUCED_REP1.sorted.bam.bai", @@ -1308,16 +1266,46 @@ "samtools/WT_REP1.sorted.bam.bai", "samtools/WT_REP2.sorted.bam.bai", "star_rsem", + "star_rsem/RAP1_IAA_30M_REP1.genes.results", + "star_rsem/RAP1_IAA_30M_REP1.isoforms.results", "star_rsem/RAP1_IAA_30M_REP1.markdup.sorted.bam", "star_rsem/RAP1_IAA_30M_REP1.markdup.sorted.bam.bai", + "star_rsem/RAP1_IAA_30M_REP1.stat", + "star_rsem/RAP1_IAA_30M_REP1.stat/RAP1_IAA_30M_REP1.cnt", + "star_rsem/RAP1_IAA_30M_REP1.stat/RAP1_IAA_30M_REP1.model", + "star_rsem/RAP1_IAA_30M_REP1.stat/RAP1_IAA_30M_REP1.theta", + "star_rsem/RAP1_UNINDUCED_REP1.genes.results", + "star_rsem/RAP1_UNINDUCED_REP1.isoforms.results", "star_rsem/RAP1_UNINDUCED_REP1.markdup.sorted.bam", "star_rsem/RAP1_UNINDUCED_REP1.markdup.sorted.bam.bai", + "star_rsem/RAP1_UNINDUCED_REP1.stat", + "star_rsem/RAP1_UNINDUCED_REP1.stat/RAP1_UNINDUCED_REP1.cnt", + "star_rsem/RAP1_UNINDUCED_REP1.stat/RAP1_UNINDUCED_REP1.model", + "star_rsem/RAP1_UNINDUCED_REP1.stat/RAP1_UNINDUCED_REP1.theta", + "star_rsem/RAP1_UNINDUCED_REP2.genes.results", + "star_rsem/RAP1_UNINDUCED_REP2.isoforms.results", "star_rsem/RAP1_UNINDUCED_REP2.markdup.sorted.bam", "star_rsem/RAP1_UNINDUCED_REP2.markdup.sorted.bam.bai", + "star_rsem/RAP1_UNINDUCED_REP2.stat", + "star_rsem/RAP1_UNINDUCED_REP2.stat/RAP1_UNINDUCED_REP2.cnt", + "star_rsem/RAP1_UNINDUCED_REP2.stat/RAP1_UNINDUCED_REP2.model", + "star_rsem/RAP1_UNINDUCED_REP2.stat/RAP1_UNINDUCED_REP2.theta", + "star_rsem/WT_REP1.genes.results", + "star_rsem/WT_REP1.isoforms.results", "star_rsem/WT_REP1.markdup.sorted.bam", "star_rsem/WT_REP1.markdup.sorted.bam.bai", + "star_rsem/WT_REP1.stat", + "star_rsem/WT_REP1.stat/WT_REP1.cnt", + "star_rsem/WT_REP1.stat/WT_REP1.model", + "star_rsem/WT_REP1.stat/WT_REP1.theta", + "star_rsem/WT_REP2.genes.results", + "star_rsem/WT_REP2.isoforms.results", "star_rsem/WT_REP2.markdup.sorted.bam", "star_rsem/WT_REP2.markdup.sorted.bam.bai", + "star_rsem/WT_REP2.stat", + "star_rsem/WT_REP2.stat/WT_REP2.cnt", + "star_rsem/WT_REP2.stat/WT_REP2.model", + "star_rsem/WT_REP2.stat/WT_REP2.theta", "star_rsem/bigwig", "star_rsem/bigwig/RAP1_IAA_30M_REP1.forward.bigWig", "star_rsem/bigwig/RAP1_IAA_30M_REP1.reverse.bigWig", @@ -1394,6 +1382,7 @@ "star_rsem/featurecounts/WT_REP2.biotype_counts_rrna_mqc.tsv", "star_rsem/featurecounts/WT_REP2.featureCounts.tsv", "star_rsem/featurecounts/WT_REP2.featureCounts.tsv.summary", + "star_rsem/log", "star_rsem/picard_metrics", "star_rsem/picard_metrics/RAP1_IAA_30M_REP1.markdup.sorted.MarkDuplicates.metrics.txt", "star_rsem/picard_metrics/RAP1_UNINDUCED_REP1.markdup.sorted.MarkDuplicates.metrics.txt", @@ -1591,6 +1580,12 @@ "star_rsem/qualimap/WT_REP2/raw_data_qualimapReport/coverage_profile_along_genes_(low).txt", "star_rsem/qualimap/WT_REP2/raw_data_qualimapReport/coverage_profile_along_genes_(total).txt", "star_rsem/qualimap/WT_REP2/rnaseq_qc_results.txt", + "star_rsem/rsem.merged.gene_counts.tsv", + "star_rsem/rsem.merged.gene_tpm.tsv", + "star_rsem/rsem.merged.genes_long.tsv", + "star_rsem/rsem.merged.isoforms_long.tsv", + "star_rsem/rsem.merged.transcript_counts.tsv", + "star_rsem/rsem.merged.transcript_tpm.tsv", "star_rsem/rseqc", "star_rsem/rseqc/bam_stat", "star_rsem/rseqc/bam_stat/RAP1_IAA_30M_REP1.bam_stat.txt", @@ -1788,42 +1783,6 @@ "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,75acd04232d1804b5f960ee4c5db4722", "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ae45731d8d4595f77e6b271004f3a070", "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,f84395a5a5aaeafac758a65f69e1fd8f", - "RAP1_IAA_30M_REP1.genes.results:md5,b46d4654bbd0d5305a75d9016675a285", - "RAP1_IAA_30M_REP1.isoforms.results:md5,a5515b36cc21248d758d4ed6986baed7", - "RAP1_IAA_30M_REP1.cnt:md5,34ba9a3404b025d94c89c78282c41c24", - "RAP1_IAA_30M_REP1.model:md5,53efb6613526edea16b1ca771f08268c", - "RAP1_IAA_30M_REP1.theta:md5,135a34f68fd1f9084658bb683b3442d2", - "RAP1_IAA_30M_REP1.transcript.bam:md5,84d1b1c0a611f0870d68508efe7fc0c9", - "RAP1_UNINDUCED_REP1.genes.results:md5,b48a19e3e7156d900b2c89da344f080f", - "RAP1_UNINDUCED_REP1.isoforms.results:md5,4578b1e83097e08f7f9fd6c05aae15f2", - "RAP1_UNINDUCED_REP1.cnt:md5,20b871f8f5bfd2394672dffe68f64628", - "RAP1_UNINDUCED_REP1.model:md5,ce88ff398f4737760a5eb423e034ed7f", - "RAP1_UNINDUCED_REP1.theta:md5,3803fd0acd3c328c76bbbb72b57639ef", - "RAP1_UNINDUCED_REP1.transcript.bam:md5,d51a63724c393072c5a73850601ef727", - "RAP1_UNINDUCED_REP2.genes.results:md5,b7527ddb0be1fea09125a13727a1e725", - "RAP1_UNINDUCED_REP2.isoforms.results:md5,a818e6b510912edee1fd97320f61405f", - "RAP1_UNINDUCED_REP2.cnt:md5,c14af602b0077d47fab45efe0c2aed91", - "RAP1_UNINDUCED_REP2.model:md5,0774306712bb4e1c95dc0489cbfa9017", - "RAP1_UNINDUCED_REP2.theta:md5,268e1d8ee9208c3812de22906794350b", - "RAP1_UNINDUCED_REP2.transcript.bam:md5,f891a2cc2862fea358a1707ae230fae4", - "WT_REP1.genes.results:md5,c3aaa802abfb3ac7168d911b232bd8a5", - "WT_REP1.isoforms.results:md5,9f3423606100c7661981416de4060a84", - "WT_REP1.cnt:md5,12a159048405c34a1ec2dc469707350f", - "WT_REP1.model:md5,342497fe7473520080a75dbf50e3f3ed", - "WT_REP1.theta:md5,44dbdecbeccfb0d8ece9e4f08849f176", - "WT_REP1.transcript.bam:md5,f010eef21c129a90be9f3fc6188cf6be", - "WT_REP2.genes.results:md5,fcea4e1e1a34bca6f845c66a852c2039", - "WT_REP2.isoforms.results:md5,b9e21a8e6e68aed11e75f31a1feda672", - "WT_REP2.cnt:md5,45ddb6ee6d468a0aafa9f6e0e26f2973", - "WT_REP2.model:md5,2f4eec1b6a7010b056532c55acf10a46", - "WT_REP2.theta:md5,f6668ded53d0741134058dd9e64571d0", - "WT_REP2.transcript.bam:md5,a5f965731a3fd6e523f4960d7d462f97", - "rsem.merged.gene_counts.tsv:md5,47a75de167a1b72d3a20789df389a3f7", - "rsem.merged.gene_tpm.tsv:md5,18a6dd460737434f6da1c17c1dc8aafa", - "rsem.merged.genes_long.tsv:md5,24767425e5d9d914ed0b1eca431182ac", - "rsem.merged.isoforms_long.tsv:md5,1363e166497e4574793a9f4704841767", - "rsem.merged.transcript_counts.tsv:md5,d3a4fa1f3bde89ee9d30114af2db3b48", - "rsem.merged.transcript_tpm.tsv:md5,efa563d0402cae35b96380592d147a72", "RAP1_IAA_30M_REP1.sorted.bam.bai:md5,4460948fc194ba7c7fe7ad92e68132a0", "RAP1_UNINDUCED_REP1.sorted.bam.bai:md5,ec51d038a5836721edc9f44d27c06542", "RAP1_UNINDUCED_REP2.sorted.bam.bai:md5,21a49b49cd6afb56c387fb645d50c3e4", @@ -1859,6 +1818,12 @@ "coverage_profile_along_genes_(high).txt:md5,a73462b9ecbd1d2c45d7ca84b5f7925b", "coverage_profile_along_genes_(low).txt:md5,7adc228bc15e344abb7938ea4d35a846", "coverage_profile_along_genes_(total).txt:md5,7adc228bc15e344abb7938ea4d35a846", + "rsem.merged.gene_counts.tsv:md5,e1094c70c24d144681828840da3d968d", + "rsem.merged.gene_tpm.tsv:md5,7f78363b53c3d46bbab8976fb65c24ba", + "rsem.merged.genes_long.tsv:md5,e276f036e78bb06241f8f252b0aa57cb", + "rsem.merged.isoforms_long.tsv:md5,36da5d2b5cc6c1b89166f78a3b15a209", + "rsem.merged.transcript_counts.tsv:md5,7824ce210648c77a99dd49c4b26eb127", + "rsem.merged.transcript_tpm.tsv:md5,dd6879b53eb021ec5df3d351aced8ace", "RAP1_IAA_30M_REP1.infer_experiment.txt:md5,1f31ddae1f98e779e30d846cde3834de", "RAP1_UNINDUCED_REP1.infer_experiment.txt:md5,a2a8e31dbd0ebd0c12f3f968ffd5391b", "RAP1_UNINDUCED_REP2.infer_experiment.txt:md5,9ec058d3a4162fd1b4c6175e2106eef4", diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index bd375c846..a6499fc3e 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -10,7 +10,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FASTQC": { "fastqc": "0.12.1" diff --git a/tests/featurecounts_group_type.nf.test.snap b/tests/featurecounts_group_type.nf.test.snap index fff4ba1b4..51a881048 100644 --- a/tests/featurecounts_group_type.nf.test.snap +++ b/tests/featurecounts_group_type.nf.test.snap @@ -10,7 +10,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" diff --git a/tests/hisat2.nf.test.snap b/tests/hisat2.nf.test.snap index 2de93189a..46a4c7cba 100644 --- a/tests/hisat2.nf.test.snap +++ b/tests/hisat2.nf.test.snap @@ -10,7 +10,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FASTQC": { "fastqc": "0.12.1" diff --git a/tests/min_mapped_reads.nf.test.snap b/tests/min_mapped_reads.nf.test.snap index 986b27e04..feb9b58e0 100644 --- a/tests/min_mapped_reads.nf.test.snap +++ b/tests/min_mapped_reads.nf.test.snap @@ -653,7 +653,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" diff --git a/tests/nextflow.config b/tests/nextflow.config index b62269e59..f59c99441 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -31,18 +31,3 @@ process { ext.args = null } } - -// NOTE This is how pipeline users will use Sentieon in real world use -if (System.getenv('SENTIEON_LICSRVR_IP')) { - env.SENTIEON_LICENSE = "$SENTIEON_LICSRVR_IP" -} -//NOTE This should only happen in GitHub actions or nf-core MegaTests -if (System.getenv('SENTIEON_AUTH_MECH')) { - env.SENTIEON_AUTH_MECH = "$SENTIEON_AUTH_MECH" -} -if (secrets.SENTIEON_AUTH_DATA) { - env.SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA -} - -// NOTE This is how pipeline users will test out Sentieon with a license file -// nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) diff --git a/tests/remove_ribo_rna.nf.test.snap b/tests/remove_ribo_rna.nf.test.snap index 4d508612f..67313de73 100644 --- a/tests/remove_ribo_rna.nf.test.snap +++ b/tests/remove_ribo_rna.nf.test.snap @@ -13,7 +13,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" @@ -816,7 +816,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" diff --git a/tests/salmon.nf.test.snap b/tests/salmon.nf.test.snap index 9a080e3de..78b76bf4a 100644 --- a/tests/salmon.nf.test.snap +++ b/tests/salmon.nf.test.snap @@ -371,7 +371,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" diff --git a/tests/sentieon.config b/tests/sentieon.config new file mode 100644 index 000000000..ea71f27ec --- /dev/null +++ b/tests/sentieon.config @@ -0,0 +1,10 @@ +env { + // Sentieon environment configuration + // NOTE This is how pipeline users will use Sentieon in real world use + SENTIEON_LICENSE = System.getenv('SENTIEON_LICSRVR_IP') + // NOTE This should only happen in GitHub actions or nf-core MegaTests + SENTIEON_AUTH_MECH = System.getenv('SENTIEON_AUTH_MECH') + SENTIEON_AUTH_DATA = secrets.SENTIEON_AUTH_DATA + // NOTE This is how pipeline users will test out Sentieon with a license file + // nextflow secrets set SENTIEON_LICENSE_BASE64 \$(cat | base64 -w 0) +} diff --git a/tests/sentieon_default.nf.test b/tests/sentieon_default.nf.test index baba6e559..8d93b4936 100644 --- a/tests/sentieon_default.nf.test +++ b/tests/sentieon_default.nf.test @@ -2,6 +2,7 @@ nextflow_pipeline { name "Test pipeline with sentieon" script "../main.nf" + config "./sentieon.config" tag "pipeline" tag "sentieon" diff --git a/tests/sentieon_default.nf.test.snap b/tests/sentieon_default.nf.test.snap index 977116a2d..bf0134cd9 100644 --- a/tests/sentieon_default.nf.test.snap +++ b/tests/sentieon_default.nf.test.snap @@ -10,7 +10,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FASTQC": { "fastqc": "0.12.1" diff --git a/tests/skip_qc.nf.test.snap b/tests/skip_qc.nf.test.snap index 0bd0f7e9d..90eeb0747 100644 --- a/tests/skip_qc.nf.test.snap +++ b/tests/skip_qc.nf.test.snap @@ -10,7 +10,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FQ_LINT": { "fq": "0.12.0 (2024-07-08)" diff --git a/tests/star_rsem.nf.test.snap b/tests/star_rsem.nf.test.snap index 176c3fc7e..4a9ffe134 100644 --- a/tests/star_rsem.nf.test.snap +++ b/tests/star_rsem.nf.test.snap @@ -1362,7 +1362,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FASTQC": { "fastqc": "0.12.1" diff --git a/tests/umi.nf.test.snap b/tests/umi.nf.test.snap index f3aa90350..b77bbbcf1 100644 --- a/tests/umi.nf.test.snap +++ b/tests/umi.nf.test.snap @@ -2614,7 +2614,7 @@ "cat": 9.5 }, "CUSTOM_CATADDITIONALFASTA": { - "python": null + "python": "3.12.2" }, "FASTQC": { "fastqc": "0.12.1" diff --git a/workflows/rnaseq/main.nf b/workflows/rnaseq/main.nf index 659637517..4e49e28ca 100755 --- a/workflows/rnaseq/main.nf +++ b/workflows/rnaseq/main.nf @@ -73,13 +73,6 @@ include { FASTQ_QC_TRIM_FILTER_SETSTRANDEDNESS } from '../../subwor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -// Header files for MultiQC -ch_pca_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/deseq2_pca_header.txt", checkIfExists: true) -sample_status_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/sample_status_header.txt", checkIfExists: true) -ch_clustering_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/deseq2_clustering_header.txt", checkIfExists: true) -ch_biotypes_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/biotypes_header.txt", checkIfExists: true) -ch_dummy_file = ch_pca_header_multiqc - workflow RNASEQ { take: @@ -104,16 +97,23 @@ workflow RNASEQ { main: - ch_multiqc_files = Channel.empty() - ch_trim_status = Channel.empty() - ch_map_status = Channel.empty() - ch_strand_status = Channel.empty() - ch_percent_mapped = Channel.empty() + // Header files for MultiQC + def ch_pca_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/deseq2_pca_header.txt", checkIfExists: true) + def sample_status_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/sample_status_header.txt", checkIfExists: true) + def ch_clustering_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/deseq2_clustering_header.txt", checkIfExists: true) + def ch_biotypes_header_multiqc = file("$projectDir/workflows/rnaseq/assets/multiqc/biotypes_header.txt", checkIfExists: true) + def ch_dummy_file = ch_pca_header_multiqc + + ch_multiqc_files = channel.empty() + ch_trim_status = channel.empty() + ch_map_status = channel.empty() + ch_strand_status = channel.empty() + ch_percent_mapped = channel.empty() // // Collect versions from topic channel (for modules that emit versions via topics) // - def topic_versions = Channel.topic('versions') + def topic_versions = channel.topic('versions') .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -133,7 +133,7 @@ workflow RNASEQ { // // Create channel from input file provided through params.input // - Channel + channel .fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json")) .map { meta, fastq_1, fastq_2, genome_bam, transcriptome_bam -> @@ -152,21 +152,21 @@ workflow RNASEQ { bam: params.skip_alignment && (genome_bam || transcriptome_bam) return [ meta, genome_bam, transcriptome_bam ] fastq: reads.size() > 0 && reads[0] - return [ meta.findAll {it.key != 'percent_mapped'}, reads ] + return [ meta.findAll { key, _value -> key != 'percent_mapped' }, reads ] } .set { ch_input_branched } // Get inputs for FASTQ and BAM processing paths ch_fastq = ch_input_branched.fastq - ch_genome_bam = ch_input_branched.bam.map { meta, genome_bam, transcriptome_bam -> [ meta, genome_bam ] }.distinct() - ch_transcriptome_bam = ch_input_branched.bam.map { meta, genome_bam, transcriptome_bam -> [ meta, transcriptome_bam ] }.distinct() + ch_genome_bam = ch_input_branched.bam.map { meta, genome_bam, _transcriptome_bam -> [ meta, genome_bam ] }.distinct() + ch_transcriptome_bam = ch_input_branched.bam.map { meta, _genome_bam, transcriptome_bam -> [ meta, transcriptome_bam ] }.distinct() // Derive mapping percentages if supplied with input ch_percent_mapped = ch_input_branched.bam - .filter{ meta, genome_bam, transcriptome_bam -> meta.percent_mapped } - .map { meta, genome_bam, transcriptome_bam -> [ meta, meta.percent_mapped ] } + .filter{ meta, _genome_bam, _transcriptome_bam -> meta.percent_mapped } + .map { meta, _genome_bam, _transcriptome_bam -> [ meta, meta.percent_mapped ] } // Index pre-aligned input BAM files SAMTOOLS_INDEX ( @@ -231,8 +231,8 @@ workflow RNASEQ { // // SUBWORKFLOW: Alignment with STAR and gene/transcript quantification with Salmon // - ch_star_log = Channel.empty() - ch_unaligned_sequences = Channel.empty() + ch_star_log = channel.empty() + ch_unaligned_sequences = channel.empty() if (!params.skip_alignment && (params.aligner == 'star_salmon' || params.aligner == 'star_rsem')) { // Check if an AWS iGenome has been provided to use the appropriate version of STAR @@ -245,13 +245,13 @@ workflow RNASEQ { ALIGN_STAR ( ch_strand_inferred_filtered_fastq, - ch_star_index.map { [ [:], it ] }, - ch_gtf.map { [ [:], it ] }, + ch_star_index.map { item -> [ [:], item ] }, + ch_gtf.map { item -> [ [:], item ] }, params.star_ignore_sjdbgtf, '', params.seq_center ?: '', is_aws_igenome, - ch_fasta.map { [ [:], it ] }, + ch_fasta.map { item -> [ [:], item ] }, params.use_sentieon_star ) @@ -262,7 +262,7 @@ workflow RNASEQ { ch_unprocessed_bams = ch_genome_bam.join(ch_transcriptome_bam) ch_star_log = ALIGN_STAR.out.log_final ch_unaligned_sequences = ALIGN_STAR.out.fastq - ch_multiqc_files = ch_multiqc_files.mix(ch_star_log.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(ch_star_log.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(ALIGN_STAR.out.versions) @@ -273,12 +273,12 @@ workflow RNASEQ { BAM_DEDUP_UMI_STAR( ch_genome_bam.join(ch_genome_bam_index, by: [0]), - ch_fasta.map { [ [:], it ] }, + ch_fasta.map { item -> [ [:], item ] }, params.umi_dedup_tool, params.umitools_dedup_stats, params.bam_csi_index, ch_transcriptome_bam, - ch_transcript_fasta.map { [ [:], it ] } + ch_transcript_fasta.map { item -> [ [:], item ] } ) ch_genome_bam = BAM_DEDUP_UMI_STAR.out.bam @@ -296,9 +296,9 @@ workflow RNASEQ { // duplicate flagstat files in MultiQC. ch_multiqc_files = ch_multiqc_files - .mix(ALIGN_STAR.out.stats.collect{it[1]}) - .mix(ALIGN_STAR.out.flagstat.collect{it[1]}) - .mix(ALIGN_STAR.out.idxstats.collect{it[1]}) + .mix(ALIGN_STAR.out.stats.collect{ tuple -> tuple[1] }) + .mix(ALIGN_STAR.out.flagstat.collect{ tuple -> tuple[1] }) + .mix(ALIGN_STAR.out.idxstats.collect{ tuple -> tuple[1] }) } } @@ -309,7 +309,7 @@ workflow RNASEQ { ch_rsem_index, params.use_sentieon_star ) - ch_multiqc_files = ch_multiqc_files.mix(QUANTIFY_RSEM.out.stat.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(QUANTIFY_RSEM.out.stat.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(QUANTIFY_RSEM.out.versions) if (!params.skip_qc & !params.skip_deseq2_qc) { @@ -329,7 +329,7 @@ workflow RNASEQ { // SUBWORKFLOW: Count reads from BAM alignments using Salmon // QUANTIFY_STAR_SALMON ( - ch_samplesheet.map { [ [:], it ] }, + ch_samplesheet.map { item -> [ [:], item ] }, ch_transcriptome_bam, ch_dummy_file, ch_transcript_fasta, @@ -346,7 +346,7 @@ workflow RNASEQ { if (!params.skip_qc & !params.skip_deseq2_qc) { DESEQ2_QC_STAR_SALMON ( - QUANTIFY_STAR_SALMON.out.counts_gene_length_scaled.map { it[1] }, + QUANTIFY_STAR_SALMON.out.counts_gene_length_scaled.map { tuple -> tuple[1] }, ch_pca_header_multiqc, ch_clustering_header_multiqc ) @@ -362,15 +362,15 @@ workflow RNASEQ { if (!params.skip_alignment && params.aligner == 'hisat2') { FASTQ_ALIGN_HISAT2 ( ch_strand_inferred_filtered_fastq, - ch_hisat2_index.map { [ [:], it ] }, - ch_splicesites.map { [ [:], it ] }, - ch_fasta.map { [ [:], it ] } + ch_hisat2_index.map { item -> [ [:], item ] }, + ch_splicesites.map { item -> [ [:], item ] }, + ch_fasta.map { item -> [ [:], item ] } ) ch_genome_bam = ch_genome_bam.mix(FASTQ_ALIGN_HISAT2.out.bam) ch_genome_bam_index = ch_genome_bam_index.mix(params.bam_csi_index ? FASTQ_ALIGN_HISAT2.out.csi : FASTQ_ALIGN_HISAT2.out.bai) ch_unprocessed_bams = ch_genome_bam.map { meta, bam -> [ meta, bam, '' ] } ch_unaligned_sequences = FASTQ_ALIGN_HISAT2.out.fastq - ch_multiqc_files = ch_multiqc_files.mix(FASTQ_ALIGN_HISAT2.out.summary.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(FASTQ_ALIGN_HISAT2.out.summary.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(FASTQ_ALIGN_HISAT2.out.versions) @@ -382,12 +382,12 @@ workflow RNASEQ { BAM_DEDUP_UMI_HISAT2( ch_genome_bam.join(ch_genome_bam_index, by: [0]), - ch_fasta.map { [ [:], it ] }, + ch_fasta.map { item -> [ [:], item ] }, params.umi_dedup_tool, params.umitools_dedup_stats, params.bam_csi_index, ch_transcriptome_bam, - ch_transcript_fasta.map { [ [:], it ] } + ch_transcript_fasta.map { item -> [ [:], item ] } ) ch_genome_bam = BAM_DEDUP_UMI_HISAT2.out.bam @@ -403,9 +403,9 @@ workflow RNASEQ { // will run, those stats will be added later instead to avoid // duplicate flagstat files in MultiQC. ch_multiqc_files = ch_multiqc_files - .mix(FASTQ_ALIGN_HISAT2.out.stats.collect{it[1]}) - .mix(FASTQ_ALIGN_HISAT2.out.flagstat.collect{it[1]}) - .mix(FASTQ_ALIGN_HISAT2.out.idxstats.collect{it[1]}) + .mix(FASTQ_ALIGN_HISAT2.out.stats.collect{ tuple -> tuple[1] }) + .mix(FASTQ_ALIGN_HISAT2.out.flagstat.collect{ tuple -> tuple[1] }) + .mix(FASTQ_ALIGN_HISAT2.out.idxstats.collect{ tuple -> tuple[1] }) } } @@ -432,12 +432,12 @@ workflow RNASEQ { // Save mapping status for workflow summary where present ch_map_status = ch_genome_bam_bai_mapping.status - .filter { id, pass -> pass != null } + .filter { _id, pass -> pass != null } // Save status for MultiQC report ch_fail_mapping_multiqc = ch_genome_bam_bai_mapping.percent_mapped_pass - .filter { id, percent_mapped, pass -> pass != null && !pass } - .map { id, percent_mapped, pass -> [ "${id}\t${percent_mapped}" ] } + .filter { _id, _percent_mapped, pass -> pass != null && !pass } + .map { id, percent_mapped, _pass -> [ "${id}\t${percent_mapped}" ] } .collect() .map { tsv_data -> @@ -451,8 +451,8 @@ workflow RNASEQ { // Where a percent mapping is present, use it to filter bam and index map_filtered_genome_bam_bai = ch_genome_bam_bai_mapping.bam - .filter { meta, bam, index, pass -> pass || pass == null } - .multiMap { meta, bam, index, pass -> + .filter { _meta, _bam, _index, pass -> pass || pass == null } + .multiMap { meta, bam, index, _pass -> bam: [ meta, bam ] index: [ meta, index ] } @@ -467,7 +467,7 @@ workflow RNASEQ { PRESEQ_LCEXTRAP ( ch_genome_bam ) - ch_multiqc_files = ch_multiqc_files.mix(PRESEQ_LCEXTRAP.out.lc_extrap.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(PRESEQ_LCEXTRAP.out.lc_extrap.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(PRESEQ_LCEXTRAP.out.versions.first()) } @@ -477,15 +477,15 @@ workflow RNASEQ { if (!params.skip_markduplicates && !params.with_umi) { BAM_MARKDUPLICATES_PICARD ( ch_genome_bam, - ch_fasta.map { [ [:], it ] }, - ch_fai.map { [ [:], it ] } + ch_fasta.map { item -> [ [:], item ] }, + ch_fai.map { item -> [ [:], item ] } ) ch_genome_bam = BAM_MARKDUPLICATES_PICARD.out.bam ch_genome_bam_index = params.bam_csi_index ? BAM_MARKDUPLICATES_PICARD.out.csi : BAM_MARKDUPLICATES_PICARD.out.bai - ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.stats.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.flagstat.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.idxstats.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.metrics.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.stats.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.flagstat.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.idxstats.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_MARKDUPLICATES_PICARD.out.metrics.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(BAM_MARKDUPLICATES_PICARD.out.versions) } @@ -508,15 +508,15 @@ workflow RNASEQ { if (!params.skip_qc && !params.skip_biotype_qc && biotype) { ch_gtf - .map { biotypeInGtf(it, biotype) } + .map { gtf -> biotypeInGtf(gtf, biotype) } .set { biotype_in_gtf } // Prevent any samples from running if GTF file doesn't have a valid biotype ch_genome_bam .combine(ch_gtf) .combine(biotype_in_gtf) - .filter { it[-1] } - .map { it[0.. tuple[-1] } + .map { tuple -> tuple[0.. tuple[1] }) ch_versions = ch_versions.mix(MULTIQC_CUSTOM_BIOTYPE.out.versions.first()) } @@ -562,7 +562,6 @@ workflow RNASEQ { BEDTOOLS_GENOMECOV_FW.out.genomecov, ch_chrom_sizes ) - ch_versions = ch_versions.mix(BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD.out.versions) BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE ( BEDTOOLS_GENOMECOV_REV.out.genomecov, @@ -578,31 +577,31 @@ workflow RNASEQ { // Sort BAM by name for qualimap (performance optimization) SAMTOOLS_SORT_QUALIMAP ( ch_genome_bam, - ch_fasta.map { [ [:], it ] }, + ch_fasta.map { item -> [ [:], item ] }, '' ) QUALIMAP_RNASEQ ( SAMTOOLS_SORT_QUALIMAP.out.bam, - ch_gtf.map { [ [:], it ] } + ch_gtf.map { item -> [ [:], item ] } ) - ch_multiqc_files = ch_multiqc_files.mix(QUALIMAP_RNASEQ.out.results.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(QUALIMAP_RNASEQ.out.results.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(QUALIMAP_RNASEQ.out.versions.first()) } if (!params.skip_dupradar) { DUPRADAR ( ch_genome_bam, - ch_gtf.map { [ [:], it ] } + ch_gtf.map { item -> [ [:], item ] } ) - ch_multiqc_files = ch_multiqc_files.mix(DUPRADAR.out.multiqc.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(DUPRADAR.out.multiqc.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(DUPRADAR.out.versions.first()) } // Get RSeqC modules to run - def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ it.trim().toLowerCase() } : [] + def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ module -> module.trim().toLowerCase() } : [] if (params.bam_csi_index) { - for (rseqc_module in ['read_distribution', 'inner_distance', 'tin']) { + ['read_distribution', 'inner_distance', 'tin'].each { rseqc_module -> if (rseqc_modules.contains(rseqc_module)) { rseqc_modules.remove(rseqc_module) } @@ -614,26 +613,26 @@ workflow RNASEQ { ch_gene_bed, rseqc_modules ) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.bamstat_txt.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.inferexperiment_txt.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.innerdistance_freq.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.junctionannotation_log.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.junctionsaturation_rscript.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.readdistribution_txt.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.readduplication_pos_xls.collect{it[1]}) - ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.tin_txt.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.bamstat_txt.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.inferexperiment_txt.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.innerdistance_freq.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.junctionannotation_log.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.junctionsaturation_rscript.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.readdistribution_txt.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.readduplication_pos_xls.collect{ tuple -> tuple[1] }) + ch_multiqc_files = ch_multiqc_files.mix(BAM_RSEQC.out.tin_txt.collect{ tuple -> tuple[1] }) // Compare predicted supplied or Salmon-predicted strand with what we get from RSeQC ch_strand_comparison = BAM_RSEQC.out.inferexperiment_txt .map { meta, strand_log -> def rseqc_inferred_strand = getInferexperimentStrandedness(strand_log, params.stranded_threshold, params.unstranded_threshold) - rseqc_strandedness = rseqc_inferred_strand.inferred_strandedness + def rseqc_strandedness = rseqc_inferred_strand.inferred_strandedness def status = 'fail' def multiqc_lines = [] if (meta.salmon_strand_analysis) { - salmon_strandedness = meta.salmon_strand_analysis.inferred_strandedness + def salmon_strandedness = meta.salmon_strand_analysis.inferred_strandedness if (salmon_strandedness == rseqc_strandedness && rseqc_strandedness != 'undetermined') { status = 'pass' @@ -694,33 +693,33 @@ workflow RNASEQ { ch_versions = ch_versions.mix(KRAKEN2.out.versions) if (params.contaminant_screening == 'kraken2') { - ch_multiqc_files = ch_multiqc_files.mix(KRAKEN2.out.report.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(KRAKEN2.out.report.collect{ tuple -> tuple[1] }) } else if (params.contaminant_screening == 'kraken2_bracken') { BRACKEN ( ch_kraken_reports, params.kraken_db ) ch_versions = ch_versions.mix(BRACKEN.out.versions) - ch_multiqc_files = ch_multiqc_files.mix(BRACKEN.out.txt.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(BRACKEN.out.txt.collect{ tuple -> tuple[1] }) } } else if (params.contaminant_screening == 'sylph') { - def sylph_databases = params.sylph_db ? params.sylph_db.split(',').collect{ file(it.trim()) } : [] + def sylph_databases = params.sylph_db ? params.sylph_db.split(',').collect{ path -> file(path.trim()) } : [] ch_sylph_databases = channel.value(sylph_databases) SYLPH_PROFILE ( ch_unaligned_sequences, ch_sylph_databases ) - ch_sylph_profile = SYLPH_PROFILE.out.profile_out.filter{!it[1].isEmpty()} + ch_sylph_profile = SYLPH_PROFILE.out.profile_out.filter{ tuple -> !tuple[1].isEmpty() } ch_versions = ch_versions.mix(SYLPH_PROFILE.out.versions) - def sylph_taxonomies = params.sylph_taxonomy ? params.sylph_taxonomy.split(',').collect{ file(it.trim()) } : [] + def sylph_taxonomies = params.sylph_taxonomy ? params.sylph_taxonomy.split(',').collect{ path -> file(path.trim()) } : [] ch_sylph_taxonomies = channel.value(sylph_taxonomies) SYLPHTAX_TAXPROF ( ch_sylph_profile, ch_sylph_taxonomies ) ch_versions = ch_versions.mix(SYLPHTAX_TAXPROF.out.versions) - ch_multiqc_files = ch_multiqc_files.mix(SYLPHTAX_TAXPROF.out.taxprof_output.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(SYLPHTAX_TAXPROF.out.taxprof_output.collect{ tuple -> tuple[1] }) } } @@ -736,7 +735,7 @@ workflow RNASEQ { } QUANTIFY_PSEUDO_ALIGNMENT ( - ch_samplesheet.map { [ [:], it ] }, + ch_samplesheet.map { item -> [ [:], item ] }, ch_strand_inferred_filtered_fastq, ch_pseudo_index, ch_dummy_file, @@ -750,12 +749,12 @@ workflow RNASEQ { params.kallisto_quant_fraglen_sd ) ch_counts_gene_length_scaled = QUANTIFY_PSEUDO_ALIGNMENT.out.counts_gene_length_scaled - ch_multiqc_files = ch_multiqc_files.mix(QUANTIFY_PSEUDO_ALIGNMENT.out.multiqc.collect{it[1]}) + ch_multiqc_files = ch_multiqc_files.mix(QUANTIFY_PSEUDO_ALIGNMENT.out.multiqc.collect{ tuple -> tuple[1] }) ch_versions = ch_versions.mix(QUANTIFY_PSEUDO_ALIGNMENT.out.versions) if (!params.skip_qc & !params.skip_deseq2_qc) { DESEQ2_QC_PSEUDO ( - ch_counts_gene_length_scaled.map { it[1] }, + ch_counts_gene_length_scaled.map { tuple -> tuple[1] }, ch_pca_header_multiqc, ch_clustering_header_multiqc ) @@ -776,24 +775,24 @@ workflow RNASEQ { // // MODULE: MultiQC // - ch_multiqc_report = Channel.empty() + ch_multiqc_report = channel.empty() if (!params.skip_multiqc) { // Load MultiQC configuration files - ch_multiqc_config = Channel.fromPath("$projectDir/workflows/rnaseq/assets/multiqc/multiqc_config.yml", checkIfExists: true) - ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty() - ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo) : Channel.empty() + ch_multiqc_config = channel.fromPath("$projectDir/workflows/rnaseq/assets/multiqc/multiqc_config.yml", checkIfExists: true) + ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config) : channel.empty() + ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo) : channel.empty() // Prepare the workflow summary - ch_workflow_summary = Channel.value( + ch_workflow_summary = channel.value( paramsSummaryMultiqc( paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") ) ).collectFile(name: 'workflow_summary_mqc.yaml') // Prepare the methods section - ch_methods_description = Channel.value( + ch_methods_description = channel.value( methodsDescriptionText( params.multiqc_methods_description ? file(params.multiqc_methods_description) @@ -829,7 +828,7 @@ workflow RNASEQ { } } - return mappings.collect { it.join('\t') } + return mappings.collect { mapping -> mapping.join('\t') } } .flatten() .collectFile(name: 'name_replacement.txt', newLine: true) @@ -850,14 +849,13 @@ workflow RNASEQ { // Generate samplesheet with BAM paths for future runs // - ch_samplesheet_with_bams = Channel.empty() if (!params.skip_alignment && params.save_align_intermeds) { // Create channel with original input info and BAM paths ch_fastq.map { meta, reads -> [ meta.id, meta, reads ] } .join(ch_unprocessed_bams.map { meta, genome_bam, transcriptome_bam -> [ meta.id, meta, genome_bam, transcriptome_bam ] }) .join(ch_percent_mapped) .transpose() - .map { id, fastq_meta, reads, meta, genome_bam, transcriptome_bam, percent_mapped -> + .map { _id, _fastq_meta, reads, meta, genome_bam, transcriptome_bam, percent_mapped -> // Handle BAM paths (same for all runs of this sample) def genome_bam_published = meta.has_genome_bam ? diff --git a/workflows/rnaseq/nextflow.config b/workflows/rnaseq/nextflow.config index a3cd7ca8f..1567cbed5 100644 --- a/workflows/rnaseq/nextflow.config +++ b/workflows/rnaseq/nextflow.config @@ -27,153 +27,149 @@ includeConfig "../../subworkflows/nf-core/fastq_qc_trim_filter_setstrandedness/n // STAR Salmon alignment options // -if (params.aligner == 'star_salmon') { - process { - withName: '.*:QUANTIFY_STAR_SALMON:SALMON_QUANT' { - ext.args = { params.extra_salmon_quant_args ?: '' } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, +process { + withName: '.*:QUANTIFY_STAR_SALMON:SALMON_QUANT' { + ext.args = { params.extra_salmon_quant_args ?: '' } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') || filename.endsWith('_format_counts.json') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_STAR_SALMON:(CUSTOM_TX2GENE|TXIMETA_TXIMPORT)' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_STAR_SALMON:SE_.*' { + ext.prefix = { "${params.pseudo_aligner}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.log') ? null : filename } + ] + } + + // STAR Salmon with UMI options + + withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:SAMTOOLS_SORT' { + ext.args = '-n' + ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ] + } + + withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:UMITOOLS_PREPAREFORRSEM' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools/prepare_for_salmon_log" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') || filename.endsWith('_format_counts.json') ? null : filename } + pattern: '*.log' + ], + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } ] - } + ] + } - withName: '.*:QUANTIFY_STAR_SALMON:(CUSTOM_TX2GENE|TXIMETA_TXIMPORT)' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.transcriptome.sorted" } + } + + withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_SORT_STATS_SAMTOOLS:(SAMTOOLS_SORT|SAMTOOLS_INDEX)' { + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{bam,bai}', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ] + } + + withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ] + } + + // Use the same umi_dedup prefix for umitools and umicollapse + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_TRANSCRIPTOME:UMI(COLLAPSE|TOOLS_DEDUP)' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted" } + } + + // Publishing logic for umitools: + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP' { + publishDir = [ + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ], + [ + path: { "${params.outdir}/${params.aligner}/umitools/transcriptomic_dedup_log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { "${params.outdir}/${params.aligner}/umitools" }, + mode: params.publish_dir_mode, + pattern: '*.tsv' ] - } + ] + } + + // Publishing logic for umicollapse - withName: '.*:QUANTIFY_STAR_SALMON:SE_.*' { - ext.prefix = { "${params.pseudo_aligner}.merged" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE_TRANSCRIPTOME:UMICOLLAPSE' { + publishDir = [ + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.log') ? null : filename } + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ], + [ + path: { "${params.outdir}/${params.aligner}/umicollapse/transcriptomic_dedup_log" }, + mode: params.publish_dir_mode, + pattern: '*.log' ] - } - } - - if (params.with_umi) { - process { - withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:SAMTOOLS_SORT' { - ext.args = '-n' - ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:UMITOOLS_PREPAREFORRSEM' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools/prepare_for_salmon_log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - ] - } - - withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.transcriptome.sorted" } - } - - withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_SORT_STATS_SAMTOOLS:(SAMTOOLS_SORT|SAMTOOLS_INDEX)' { - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.{bam,bai}', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - // Use the same umi_dedup prefix for umitools and umicollapse - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_TRANSCRIPTOME:UMI(COLLAPSE|TOOLS_DEDUP)' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted" } - } - - // Publishing logic for umitools: - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP' { - publishDir = [ - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ], - [ - path: { "${params.outdir}/${params.aligner}/umitools/transcriptomic_dedup_log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { "${params.outdir}/${params.aligner}/umitools" }, - mode: params.publish_dir_mode, - pattern: '*.tsv' - ] - ] - } - - // Publishing logic for umicollapse - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE_TRANSCRIPTOME:UMICOLLAPSE' { - publishDir = [ - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ], - [ - path: { "${params.outdir}/${params.aligner}/umicollapse/transcriptomic_dedup_log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ] - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_TRANSCRIPTOME:SAMTOOLS_INDEX' { - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bai', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_TRANSCRIPTOME:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } - } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_TRANSCRIPTOME:SAMTOOLS_INDEX' { + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bai', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_TRANSCRIPTOME:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] } } @@ -204,7 +200,7 @@ process { path: { params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, pattern: "*.{bam,bai,csi}", - saveAs: { params.save_align_intermeds || params.skip_markduplicates ? it : null } + saveAs: { filename -> params.save_align_intermeds || params.skip_markduplicates ? filename : null } ] } @@ -221,139 +217,139 @@ process { } } -if (params.with_umi && ['star_salmon','hisat2'].contains(params.aligner)) { - process { - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_(GEN|TRANSCRIPT)OME:UMITOOLS_DEDUP' { - ext.args = { [ - meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', - params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE_(GEN|TRANSCRIPT)OME:UMICOLLAPSE' { - ext.args = { [ - '--two-pass', - meta.single_end ? '' : '--paired --remove-unpaired --remove-chimeric', - params.umitools_grouping_method ? "--algo '" + ['directional':'dir','adjacency':'adj','cluster':'cc'].get(params.umitools_grouping_method, '') + "'" : '', - params.umitools_umi_separator ? "--umi-sep '${params.umitools_umi_separator}'" : '', - ].join(' ').trim()} - } - - // Use the same umi_dedup prefix for umitools and umicollapse - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_GENOME:UMI(COLLAPSE|TOOLS_DEDUP)' { - ext.prefix = { "${meta.id}.umi_dedup.sorted" } - } - - // Publishing logic for umitools: - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:UMITOOLS_DEDUP' { - publishDir = [ - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ], - [ - path: { "${params.outdir}/${params.aligner}/umitools/genomic_dedup_log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { "${params.outdir}/${params.aligner}/umitools" }, - mode: params.publish_dir_mode, - pattern: '*.tsv' - ] - ] - } - - // Publishing logic for umicollapse - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE_GENOME:UMICOLLAPSE' { - publishDir = [ - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ], - [ - path: { "${params.outdir}/${params.aligner}/umicollapse/genomic_dedup_log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ] - ] - } +// +// UMI deduplication options for star_salmon and hisat2 +// + +process { + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_(GEN|TRANSCRIPT)OME:UMITOOLS_DEDUP' { + ext.args = { [ + meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', + params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE_(GEN|TRANSCRIPT)OME:UMICOLLAPSE' { + ext.args = { [ + '--two-pass', + meta.single_end ? '' : '--paired --remove-unpaired --remove-chimeric', + params.umitools_grouping_method ? "--algo '" + ['directional':'dir','adjacency':'adj','cluster':'cc'].get(params.umitools_grouping_method, '') + "'" : '', + params.umitools_umi_separator ? "--umi-sep '${params.umitools_umi_separator}'" : '', + ].join(' ').trim()} + } - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_GENOME:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - ext.prefix = { "${meta.id}.umi_dedup.sorted" } - publishDir = [ + // Use the same umi_dedup prefix for umitools and umicollapse + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_GENOME:UMI(COLLAPSE|TOOLS_DEDUP)' { + ext.prefix = { "${meta.id}.umi_dedup.sorted" } + } + + // Publishing logic for umitools: + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:UMITOOLS_DEDUP' { + publishDir = [ + [ path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, - pattern: '*.{bai,csi}', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ], + [ + path: { "${params.outdir}/${params.aligner}/umitools/genomic_dedup_log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { "${params.outdir}/${params.aligner}/umitools" }, + mode: params.publish_dir_mode, + pattern: '*.tsv' ] - } + ] + } - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_GENOME:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.umi_dedup.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + // Publishing logic for umicollapse + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMICOLLAPSE_GENOME:UMICOLLAPSE' { + publishDir = [ + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ], + [ + path: { "${params.outdir}/${params.aligner}/umicollapse/genomic_dedup_log" }, mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' + pattern: '*.log' ] - } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_GENOME:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + ext.prefix = { "${meta.id}.umi_dedup.sorted" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}', + saveAs: { filename -> params.save_align_intermeds || params.save_umi_intermeds ? filename : null } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMI(COLLAPSE|TOOLS)_GENOME:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.umi_dedup.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] } } // // bigWig coverage options // -if (!params.skip_bigwig) { - process { - withName: 'BEDTOOLS_GENOMECOV_FW' { - ext.prefix = { meta.strandedness == 'reverse' ? meta.id + '.reverse' : meta.id + '.forward' } - ext.args = { meta.strandedness == 'reverse' ? '-split -du -strand - -bg' : '-split -du -strand + -bg' } - } - - withName: 'BEDTOOLS_GENOMECOV_REV' { - ext.prefix = { meta.strandedness == 'reverse' ? meta.id + '.forward' : meta.id + '.reverse' } - ext.args = { meta.strandedness == 'reverse' ? '-split -du -strand + -bg' : '-split -du -strand - -bg' } - } - - withName: '(BEDTOOLS_GENOMECOV_(FW|REV)|.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_(FORWARD|REVERSE):UCSC_BEDCLIP)' { - publishDir = [ - enabled: false - ] - } - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDCLIP' { - ext.prefix = { "${meta.id}.clip.forward" } - } +process { + withName: 'BEDTOOLS_GENOMECOV_FW' { + ext.prefix = { meta.strandedness == 'reverse' ? meta.id + '.reverse' : meta.id + '.forward' } + ext.args = { meta.strandedness == 'reverse' ? '-split -du -strand - -bg' : '-split -du -strand + -bg' } + } - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}.forward" } - } + withName: 'BEDTOOLS_GENOMECOV_REV' { + ext.prefix = { meta.strandedness == 'reverse' ? meta.id + '.forward' : meta.id + '.reverse' } + ext.args = { meta.strandedness == 'reverse' ? '-split -du -strand + -bg' : '-split -du -strand - -bg' } + } - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDCLIP' { - ext.prefix = { "${meta.id}.clip.reverse" } - } + withName: '(BEDTOOLS_GENOMECOV_(FW|REV)|.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_(FORWARD|REVERSE):UCSC_BEDCLIP)' { + publishDir = [ + enabled: false + ] + } - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}.reverse" } - } + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDCLIP' { + ext.prefix = { "${meta.id}.clip.forward" } + } - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_(FORWARD|REVERSE):UCSC_BEDGRAPHTOBIGWIG' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/bigwig" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDGRAPHTOBIGWIG' { + ext.prefix = { "${meta.id}.forward" } + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDCLIP' { + ext.prefix = { "${meta.id}.clip.reverse" } + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDGRAPHTOBIGWIG' { + ext.prefix = { "${meta.id}.reverse" } + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_(FORWARD|REVERSE):UCSC_BEDGRAPHTOBIGWIG' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/bigwig" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] } } @@ -361,22 +357,20 @@ if (!params.skip_bigwig) { // DESeq2 QC options // -if (params.aligner in ['star_salmon', 'star_rsem'] && !params.skip_qc && !params.skip_deseq2_qc) { - process { - withName: 'DESEQ2_QC_(STAR_SALMON|RSEM)' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = { params.aligner } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] - } +process { + withName: 'DESEQ2_QC_(STAR_SALMON|RSEM)' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = { params.aligner } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] } } @@ -384,42 +378,36 @@ if (params.aligner in ['star_salmon', 'star_rsem'] && !params.skip_qc && !params // Pseudo-alignment options // -if (!params.skip_pseudo_alignment && params.pseudo_aligner) { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:(CUSTOM_TX2GENE|TXIMETA_TXIMPORT)' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:(CUSTOM_TX2GENE|TXIMETA_TXIMPORT)' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { - ext.args = '--assay_names counts,abundance' - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.log') ? null : filename } - ] - } - } - - if (!params.skip_qc && !params.skip_deseq2_qc) { - process { - withName: 'DESEQ2_QC_PSEUDO' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = { params.pseudo_aligner } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] - } - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { + ext.args = '--assay_names counts,abundance' + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.log') ? null : filename } + ] + } + + withName: 'DESEQ2_QC_PSEUDO' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = { params.pseudo_aligner } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] } }