diff --git a/CHANGELOG.md b/CHANGELOG.md index 78ed09c2..f719cd01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [[#438]](https://github.com/nf-core/smrnaseq/pull/438) - Update [Mirtop to latest version](https://github.com/nf-core/smrnaseq/issues/437) - Process samples separately and join results with `CSVTK_JOIN`. - [[#439]](https://github.com/nf-core/smrnaseq/pull/439) - Fix [Fix paired end samples processing](https://github.com/nf-core/smrnaseq/issues/415) - Fix paired end sample handling and add test profile. - [[#441]](https://github.com/nf-core/smrnaseq/pull/441) - Migrate [local contaminant bowtie to nf-core](https://github.com/nf-core/smrnaseq/issues/436) - Replace local processes with `BOWTIE2_ALIGN`. +- [[#443]](https://github.com/nf-core/smrnaseq/pull/443) - Migrate [mirna and genome_quant bowtie to nf-core](https://github.com/nf-core/smrnaseq/issues/436) - Replace local processes with `BOWTIE_ALIGN`. ## v2.3.1 - 2024-04-18 - Gray Zinc Dalmation Patch diff --git a/conf/modules.config b/conf/modules.config index 44553227..56151f76 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -357,6 +357,14 @@ process { ] } withName: 'NFCORE_SMRNASEQ:MIRNA_QUANT:BOWTIE_MAP_MATURE' { + ext.args = [ "", + "-t", + "-k 50", + "--best", + "--strata", + "-e 99999", + "--chunkmbs 2048", + ].join(" ").trim() publishDir = [ path: { "${params.outdir}/mirna_quant/bam/mature" }, mode: params.publish_dir_mode, @@ -374,6 +382,14 @@ process { ] } withName: 'NFCORE_SMRNASEQ:MIRNA_QUANT:BOWTIE_MAP_HAIRPIN' { + ext.args = [ "", + "-t", + "-k 50", + "--best", + "--strata", + "-e 99999", + "--chunkmbs 2048", + ].join(" ").trim() publishDir = [ path: { "${params.outdir}/mirna_quant/bam/hairpin" }, mode: params.publish_dir_mode, @@ -408,6 +424,14 @@ process { ext.prefix = {"${meta.id}_seqcluster"} } withName: 'NFCORE_SMRNASEQ:MIRNA_QUANT:BOWTIE_MAP_SEQCLUSTER' { + ext.args = [ "", + "-t", + "-k 50", + "--best", + "--strata", + "-e 99999", + "--chunkmbs 2048", + ].join(" ").trim() publishDir = [ path: { "${params.outdir}/mirna_quant/bam/seqcluster" }, mode: params.publish_dir_mode, @@ -494,6 +518,14 @@ process { ] } withName: 'NFCORE_SMRNASEQ:GENOME_QUANT:BOWTIE_MAP_GENOME' { + ext.args = [ "", + "-t", + "-k 50", + "--best", + "--strata", + "-e 99999", + "--chunkmbs 2048", + ].join(" ").trim() publishDir = [ path: { "${params.outdir}/genome_quant/bam" }, mode: params.publish_dir_mode, diff --git a/modules.json b/modules.json index 940686a8..7ed3095d 100644 --- a/modules.json +++ b/modules.json @@ -16,6 +16,11 @@ "git_sha": "49852039cccef84bbf5a3c0e069fac81fa3f0202", "installed_by": ["modules"] }, + "bowtie/align": { + "branch": "master", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "installed_by": ["modules"] + }, "bowtie/build": { "branch": "master", "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", diff --git a/modules/nf-core/bowtie/align/environment.yml b/modules/nf-core/bowtie/align/environment.yml new file mode 100644 index 00000000..4434c7e7 --- /dev/null +++ b/modules/nf-core/bowtie/align/environment.yml @@ -0,0 +1,6 @@ +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::bowtie=1.3.0 + - bioconda::samtools=1.16.1 diff --git a/modules/nf-core/bowtie/align/main.nf b/modules/nf-core/bowtie/align/main.nf new file mode 100644 index 00000000..5e72b02a --- /dev/null +++ b/modules/nf-core/bowtie/align/main.nf @@ -0,0 +1,77 @@ +process BOWTIE_ALIGN { + 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/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:c84c7c55c45af231883d9ff4fe706ac44c479c36-0' : + 'biocontainers/mulled-v2-ffbf83a6b0ab6ec567a336cf349b80637135bca3:c84c7c55c45af231883d9ff4fe706ac44c479c36-0' }" + + input: + tuple val(meta), path(reads) + tuple val(meta2), path(index) + val (save_unaligned) + + output: + tuple val(meta), path('*.bam') , emit: bam + tuple val(meta), path('*.out') , emit: log + tuple val(meta), path('*fastq.gz') , emit: fastq, optional : true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def unaligned = save_unaligned ? "--un ${prefix}.unmapped.fastq" : '' + def endedness = meta.single_end ? "$reads" : "-1 ${reads[0]} -2 ${reads[1]}" + """ + INDEX=\$(find -L ./ -name "*.3.ebwt" | sed 's/\\.3.ebwt\$//') + bowtie \\ + --threads $task.cpus \\ + --sam \\ + -x \$INDEX \\ + -q \\ + $unaligned \\ + $args \\ + $endedness \\ + 2> >(tee ${prefix}.out >&2) \\ + | samtools view $args2 -@ $task.cpus -bS -o ${prefix}.bam - + + if [ -f ${prefix}.unmapped.fastq ]; then + gzip ${prefix}.unmapped.fastq + fi + if [ -f ${prefix}.unmapped_1.fastq ]; then + gzip ${prefix}.unmapped_1.fastq + gzip ${prefix}.unmapped_2.fastq + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bowtie: \$(echo \$(bowtie --version 2>&1) | sed 's/^.*bowtie-align-s version //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def unaligned = save_unaligned ? + meta.single_end ? "echo '' | gzip > ${prefix}.unmapped.fastq.gz" : + "echo '' | gzip > ${prefix}.unmapped_1.fastq.gz; echo '' | gzip > ${prefix}.unmapped_2.fastq.gz" + : '' + """ + touch ${prefix}.bam + touch ${prefix}.out + $unaligned + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bowtie: \$(echo \$(bowtie --version 2>&1) | sed 's/^.*bowtie-align-s version //; s/ .*\$//') + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + +} diff --git a/modules/nf-core/bowtie/align/meta.yml b/modules/nf-core/bowtie/align/meta.yml new file mode 100644 index 00000000..7b346802 --- /dev/null +++ b/modules/nf-core/bowtie/align/meta.yml @@ -0,0 +1,80 @@ +name: bowtie_align +description: Align reads to a reference genome using bowtie +keywords: + - align + - map + - fastq + - fasta + - genome + - reference +tools: + - bowtie: + description: | + bowtie is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bowtie-bio.sourceforge.net/index.shtml + documentation: http://bowtie-bio.sourceforge.net/manual.shtml + arxiv: arXiv:1303.3997 + licence: ["Artistic-2.0"] + identifier: biotools:bowtie +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + - - meta2: + type: map + description: | + Groovy Map containing genome information + e.g. [ id:'sarscov2' ] + - index: + type: file + description: Bowtie genome index files + pattern: "*.ebwt" + - - save_unaligned: + type: boolean + description: Whether to save fastq files containing the reads which did not + align. +output: + - bam: + - meta: + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + - log: + - meta: + type: file + description: Log file + pattern: "*.log" + - "*.out": + type: file + description: Log file + pattern: "*.log" + - fastq: + - meta: + type: file + description: Unaligned FastQ files + pattern: "*.fastq.gz" + - "*fastq.gz": + type: file + description: Unaligned FastQ files + pattern: "*.fastq.gz" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@kevinmenden" +maintainers: + - "@kevinmenden" diff --git a/modules/nf-core/bowtie/align/tests/main.nf.test b/modules/nf-core/bowtie/align/tests/main.nf.test new file mode 100644 index 00000000..3403ae22 --- /dev/null +++ b/modules/nf-core/bowtie/align/tests/main.nf.test @@ -0,0 +1,129 @@ +nextflow_process { + + name "Test Process BOWTIE_ALIGN" + script "../main.nf" + process "BOWTIE_ALIGN" + + tag "modules" + tag "modules_nfcore" + tag "bowtie" + tag "bowtie/align" + tag "bowtie/build" + + + setup { + run("BOWTIE_BUILD") { + script "../../../bowtie/build/main.nf" + process { + """ + input[0] = [[ id:'sarscov2' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ] + """ + } + } + } + + test("sarscov2 - single_end") { + + when { + process { + """ + input[0] = [ [id:"test", single_end:true], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = BOWTIE_BUILD.out.index + input[2] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions, + process.out.bam.collect { bam(it[1]).getReadsMD5() }, + process.out.fastq, + process.out.log + ).match() } + ) + } + + } + + test("sarscov2 - single_end - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [id:"test", single_end:true], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = BOWTIE_BUILD.out.index + input[2] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - paired_end") { + + when { + process { + """ + input[0] = [ [id:"test", single_end:false], + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ] + input[1] = BOWTIE_BUILD.out.index + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.versions, + process.out.bam.collect { bam(it[1]).getReads(2) }, + process.out.log + ).match() } + ) + } + + } + + test("sarscov2 - paired_end - stub") { + + options "-stub" + when { + process { + """ + input[0] = [ [id:"test", single_end:false], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + input[1] = BOWTIE_BUILD.out.index + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bowtie/align/tests/main.nf.test.snap b/modules/nf-core/bowtie/align/tests/main.nf.test.snap new file mode 100644 index 00000000..de95bb81 --- /dev/null +++ b/modules/nf-core/bowtie/align/tests/main.nf.test.snap @@ -0,0 +1,192 @@ +{ + "sarscov2 - single_end": { + "content": [ + [ + "versions.yml:md5,96e36b0b99c80da0be8239d03db30ecc" + ], + [ + "7bdcfc6f54ae6e8f4570395cc85db9a3" + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.unmapped.fastq.gz:md5,5729a694abd09657da3b9101861090c4" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.out:md5,4b9140ceadb8a18ae9330885370f8a0b" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-26T09:25:24.60746041" + }, + "sarscov2 - single_end - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.unmapped.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "3": [ + "versions.yml:md5,96e36b0b99c80da0be8239d03db30ecc" + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + [ + { + "id": "test", + "single_end": true + }, + "test.unmapped.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,96e36b0b99c80da0be8239d03db30ecc" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-25T10:00:28.666281812" + }, + "sarscov2 - paired_end": { + "content": [ + [ + "versions.yml:md5,96e36b0b99c80da0be8239d03db30ecc" + ], + [ + [ + "ATGTGTACATTGGCGACCCTGCTCAATTACCTGCACCACGCACATTGCTAACTAAGGGCACACTAGAACCAGAATATTTCAATTCAGTGTGTAGACTTATGAAAACTATAGGTCCAGACATGTTCCTCGGAACTTGTCGGCGTTGTCCTG", + "ACGCACATTGCTAACTAAGGGCACACTAGAACCAGAATATTTCAATTCAGTGTGTAGACTTATGAAAACTATAGGTCCAGACATGTTCCTCGGAACTTGTCGGCGTTGTCCTGCTGAAATTGTTGACACTGTGAGTGCTTTGGTTTATGA" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.out:md5,5e13272d112cef8faeedcdbd7c602de0" + ] + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-26T11:57:56.604464368" + }, + "sarscov2 - paired_end - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,96e36b0b99c80da0be8239d03db30ecc" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fastq": [ + + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.out:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,96e36b0b99c80da0be8239d03db30ecc" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.2" + }, + "timestamp": "2024-06-25T10:01:02.043164876" + } +} \ No newline at end of file diff --git a/modules/nf-core/bowtie/align/tests/tags.yml b/modules/nf-core/bowtie/align/tests/tags.yml new file mode 100644 index 00000000..a5753d58 --- /dev/null +++ b/modules/nf-core/bowtie/align/tests/tags.yml @@ -0,0 +1,2 @@ +bowtie/align: + - "modules/nf-core/bowtie/align/**" diff --git a/subworkflows/local/genome_quant.nf b/subworkflows/local/genome_quant.nf index 4ad6e1d8..abc73893 100644 --- a/subworkflows/local/genome_quant.nf +++ b/subworkflows/local/genome_quant.nf @@ -2,8 +2,8 @@ // Quantify mirna with bowtie and mirtop // -include { BAM_SORT_STATS_SAMTOOLS } from '../nf-core/bam_sort_stats_samtools' -include { BOWTIE_MAP_SEQ as BOWTIE_MAP_GENOME } from '../../modules/local/bowtie_map_mirna' +include { BAM_SORT_STATS_SAMTOOLS } from '../nf-core/bam_sort_stats_samtools' +include { BOWTIE_ALIGN as BOWTIE_MAP_GENOME } from '../../modules/nf-core/bowtie/align/main' workflow GENOME_QUANT { take: @@ -14,7 +14,7 @@ workflow GENOME_QUANT { main: ch_versions = Channel.empty() - BOWTIE_MAP_GENOME ( ch_reads, ch_bowtie_index ) + BOWTIE_MAP_GENOME ( ch_reads, ch_bowtie_index, true ) ch_versions = ch_versions.mix(BOWTIE_MAP_GENOME.out.versions) BAM_SORT_STATS_SAMTOOLS ( BOWTIE_MAP_GENOME.out.bam, ch_fasta ) diff --git a/subworkflows/local/mirna_quant.nf b/subworkflows/local/mirna_quant.nf index ca97d20f..c8d75941 100644 --- a/subworkflows/local/mirna_quant.nf +++ b/subworkflows/local/mirna_quant.nf @@ -11,9 +11,9 @@ include { FORMAT_FASTA_MIRNA as FORMAT_MATURE include { BOWTIE_BUILD as INDEX_MATURE } from '../../modules/nf-core/bowtie/build/main' include { BOWTIE_BUILD as INDEX_HAIRPIN } from '../../modules/nf-core/bowtie/build/main' -include { BOWTIE_MAP_SEQ as BOWTIE_MAP_MATURE - BOWTIE_MAP_SEQ as BOWTIE_MAP_HAIRPIN - BOWTIE_MAP_SEQ as BOWTIE_MAP_SEQCLUSTER } from '../../modules/local/bowtie_map_mirna' +include { BOWTIE_ALIGN as BOWTIE_MAP_MATURE + BOWTIE_ALIGN as BOWTIE_MAP_HAIRPIN + BOWTIE_ALIGN as BOWTIE_MAP_SEQCLUSTER } from '../../modules/nf-core/bowtie/align/main' include { BAM_SORT_STATS_SAMTOOLS as BAM_STATS_MATURE BAM_SORT_STATS_SAMTOOLS as BAM_STATS_HAIRPIN } from '../nf-core/bam_sort_stats_samtools' @@ -44,16 +44,16 @@ workflow MIRNA_QUANT { ch_versions = ch_versions.mix(FORMAT_MATURE.out.versions) INDEX_MATURE ( FORMAT_MATURE.out.formatted_fasta ) - ch_mature_bowtie = INDEX_MATURE.out.index.map{meta, it -> return [it]}.collect().first() + ch_mature_bowtie = INDEX_MATURE.out.index.first() ch_versions = ch_versions.mix(INDEX_MATURE.out.versions) ch_reads_mirna = ch_reads_for_mirna .map { add_suffix(it, "mature") } - BOWTIE_MAP_MATURE ( ch_reads_mirna, ch_mature_bowtie ) + BOWTIE_MAP_MATURE ( ch_reads_mirna, ch_mature_bowtie, true ) ch_versions = ch_versions.mix(BOWTIE_MAP_MATURE.out.versions) - ch_reads_hairpin = BOWTIE_MAP_MATURE.out.unmapped + ch_reads_hairpin = BOWTIE_MAP_MATURE.out.fastq .map { add_suffix(it, "hairpin") } BAM_STATS_MATURE ( BOWTIE_MAP_MATURE.out.bam, FORMAT_MATURE.out.formatted_fasta ) @@ -67,10 +67,10 @@ workflow MIRNA_QUANT { ch_versions = ch_versions.mix(FORMAT_HAIRPIN.out.versions) INDEX_HAIRPIN ( FORMAT_HAIRPIN.out.formatted_fasta ) - hairpin_bowtie = INDEX_HAIRPIN.out.index.map{meta, it -> return [it]}.collect().first() + hairpin_bowtie = INDEX_HAIRPIN.out.index.first() ch_versions = ch_versions.mix(INDEX_HAIRPIN.out.versions) - BOWTIE_MAP_HAIRPIN ( ch_reads_hairpin, hairpin_bowtie ) + BOWTIE_MAP_HAIRPIN ( ch_reads_hairpin, hairpin_bowtie, true ) ch_versions = ch_versions.mix(BOWTIE_MAP_HAIRPIN.out.versions) BAM_STATS_HAIRPIN ( BOWTIE_MAP_HAIRPIN.out.bam, FORMAT_HAIRPIN.out.formatted_fasta ) @@ -89,7 +89,7 @@ workflow MIRNA_QUANT { ch_reads_collapsed = SEQCLUSTER_COLLAPSE.out.fastq - BOWTIE_MAP_SEQCLUSTER ( ch_reads_collapsed, hairpin_bowtie ) + BOWTIE_MAP_SEQCLUSTER ( ch_reads_collapsed, hairpin_bowtie, true ) ch_versions = ch_versions.mix(BOWTIE_MAP_SEQCLUSTER.out.versions) ch_mirtop_logs = Channel.empty() @@ -118,7 +118,7 @@ workflow MIRNA_QUANT { TABLE_MERGE ( CSVTK_JOIN.out.csv ) ch_versions = ch_versions.mix(TABLE_MERGE.out.versions) - ch_reads_genome = BOWTIE_MAP_HAIRPIN.out.unmapped + ch_reads_genome = BOWTIE_MAP_HAIRPIN.out.fastq .map { add_suffix(it, "genome") } emit: @@ -132,9 +132,7 @@ workflow MIRNA_QUANT { } def add_suffix(row, suffix) { - def meta = [:] - meta.id = "${row[0].id}_${suffix}" - def array = [] - array = [ meta, row[1] ] - return array + def meta_clone = row[0].clone() + meta_clone.id = "${row[0].id}_${suffix}" + return [ meta_clone, row[1] ] } diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 9154ae90..0158cbfd 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -52,10 +52,10 @@ workflow PREPARE_GENOME { if(val_bowtie_index) { if (val_bowtie_index.endsWith(".tar.gz")) { UNTAR_BOWTIE_INDEX ( ch_bowtie_index ) - ch_bowtie_index = UNTAR_BOWTIE_INDEX.out.files.map { it[1] } + ch_bowtie_index = UNTAR_BOWTIE_INDEX.out.files ch_versions = ch_versions.mix(UNTAR_BOWTIE_INDEX.out.versions) } else { - ch_bowtie_index = Channel.fromPath("${val_bowtie_index}**ebwt", checkIfExists: true) + ch_bowtie_index = Channel.fromPath("${val_bowtie_index}**ebwt", checkIfExists: true).map{it -> [ [id:it.baseName], it ] }.collect() .ifEmpty{ error "Bowtie1 index directory not found: ${val_bowtie_index}" } .filter { it != null } } @@ -70,7 +70,7 @@ workflow PREPARE_GENOME { // Set channels: clean fasta and its index ch_fasta = CLEAN_FASTA.out.output - ch_bowtie_index = INDEX_GENOME.out.index.map{ meta, it -> [ it ] }.collect() + ch_bowtie_index = INDEX_GENOME.out.index.collect() } } diff --git a/tests/test_contamination_tech_reps.nf.test.snap b/tests/test_contamination_tech_reps.nf.test.snap index 05b423d6..a7ac1a96 100644 --- a/tests/test_contamination_tech_reps.nf.test.snap +++ b/tests/test_contamination_tech_reps.nf.test.snap @@ -34,13 +34,13 @@ }, "software_versions": { "content": [ - "{BLAT_CDNA={blat=36}, BLAT_NCRNA={blat=36}, BOWTIE2_ALIGN_CDNA={bowtie2=2.5.2, samtools=1.18, pigz=2.6}, BOWTIE2_ALIGN_NCRNA={bowtie2=2.5.2, samtools=1.18, pigz=2.6}, BOWTIE2_ALIGN_TRNA={bowtie2=2.5.2, samtools=1.18, pigz=2.6}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, CAT_FASTQ={cat=8.3}, FASTP={fastp=0.23.4}, FILTER_STATS={BusyBox=1.32.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, GAWK_CDNA={gawk=5.3.0}, GAWK_NCRNA={gawk=5.3.0}, INDEX_CDNA={bowtie2=2.5.2}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, INDEX_NCRNA={bowtie2=2.5.2}, INDEX_TRNA={bowtie2=2.5.2}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, SEQKIT_GREP_CDNA={seqkit=2.8.0}, SEQKIT_GREP_NCRNA={seqkit=2.8.0}, STATS_GAWK_CDNA={gawk=5.3.0}, STATS_GAWK_NCRNA={gawk=5.3.0}, STATS_GAWK_TRNA={gawk=5.3.0}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BLAT_CDNA={blat=36}, BLAT_NCRNA={blat=36}, BOWTIE2_ALIGN_CDNA={bowtie2=2.5.2, samtools=1.18, pigz=2.6}, BOWTIE2_ALIGN_NCRNA={bowtie2=2.5.2, samtools=1.18, pigz=2.6}, BOWTIE2_ALIGN_TRNA={bowtie2=2.5.2, samtools=1.18, pigz=2.6}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_MATURE={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.0, samtools=1.16.1}, CAT_FASTQ={cat=8.3}, FASTP={fastp=0.23.4}, FILTER_STATS={BusyBox=1.32.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, GAWK_CDNA={gawk=5.3.0}, GAWK_NCRNA={gawk=5.3.0}, INDEX_CDNA={bowtie2=2.5.2}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, INDEX_NCRNA={bowtie2=2.5.2}, INDEX_TRNA={bowtie2=2.5.2}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, SEQKIT_GREP_CDNA={seqkit=2.8.0}, SEQKIT_GREP_NCRNA={seqkit=2.8.0}, STATS_GAWK_CDNA={gawk=5.3.0}, STATS_GAWK_NCRNA={gawk=5.3.0}, STATS_GAWK_TRNA={gawk=5.3.0}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { - "nf-test": "0.8.4", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-25T18:15:44.479114611" + "timestamp": "2024-09-26T00:13:46.736133" }, "mirna_quant_bam": { "content": [ diff --git a/tests/test_mirgenedb.nf.test.snap b/tests/test_mirgenedb.nf.test.snap index b8ea7f91..4c5cff01 100644 --- a/tests/test_mirgenedb.nf.test.snap +++ b/tests/test_mirgenedb.nf.test.snap @@ -19,13 +19,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_GENOME={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_MATURE={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.0, samtools=1.16.1}, FASTP={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-20T13:36:31.98986503" + "timestamp": "2024-09-26T00:23:04.015921" }, "mirna_quant_bam": { "content": [ diff --git a/tests/test_nextflex.nf.test.snap b/tests/test_nextflex.nf.test.snap index 393e3469..9438f92b 100644 --- a/tests/test_nextflex.nf.test.snap +++ b/tests/test_nextflex.nf.test.snap @@ -34,13 +34,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_HAIRPIN={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_MATURE={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.0, samtools=1.16.1}, FASTP={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-20T17:11:24.272157529" + "timestamp": "2024-09-26T00:29:08.657006" }, "mirna_quant_bam": { "content": [ diff --git a/tests/test_skipfastp.nf.test.snap b/tests/test_skipfastp.nf.test.snap index a6fc777f..04904b0b 100644 --- a/tests/test_skipfastp.nf.test.snap +++ b/tests/test_skipfastp.nf.test.snap @@ -41,13 +41,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTQC_RAW={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_GENOME={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_MATURE={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.0, samtools=1.16.1}, FASTQC_RAW={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-20T16:48:44.385703416" + "timestamp": "2024-09-26T00:53:04.938088" }, "mirna_quant_bam": { "content": [ diff --git a/tests/test_umi.nf.test.snap b/tests/test_umi.nf.test.snap index 5be6ed63..ad477134 100644 --- a/tests/test_umi.nf.test.snap +++ b/tests/test_umi.nf.test.snap @@ -41,13 +41,13 @@ }, "software_versions": { "content": [ - "{BOWTIE_MAP_GENOME={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTP={fastp=0.23.4}, FASTP_LENGTH_FILTER={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, UMICOLLAPSE_FASTQ={umicollapse=1.0.0-1}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" + "{BOWTIE_MAP_GENOME={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_HAIRPIN={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_MATURE={bowtie=1.3.0, samtools=1.16.1}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.0, samtools=1.16.1}, FASTP={fastp=0.23.4}, FASTP_LENGTH_FILTER={fastp=0.23.4}, FASTQC_RAW={fastqc=0.12.1}, FASTQC_TRIM={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.0}, INDEX_MATURE={bowtie=1.3.0}, MIRTOP_COUNTS={mirtop=0.4.28}, MIRTOP_EXPORT={mirtop=0.4.28}, MIRTOP_GFF={mirtop=0.4.28}, MIRTOP_STATS={mirtop=0.4.28}, MIRTRACE_QC={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.21}, SAMTOOLS_IDXSTATS={samtools=1.21}, SAMTOOLS_INDEX={samtools=1.21}, SAMTOOLS_SORT={samtools=1.21}, SAMTOOLS_STATS={samtools=1.21}, SEQCLUSTER_COLLAPSE={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, UMICOLLAPSE_FASTQ={umicollapse=1.0.0-1}, Workflow={nf-core/smrnaseq=v2.3.2dev}}" ], "meta": { "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-09-20T16:55:26.495755936" + "timestamp": "2024-09-26T01:02:56.214416" }, "mirna_quant_bam": { "content": [