From cebbe92f9a48511c3e181c60e6255af8cf9481aa Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 15:58:05 +0100 Subject: [PATCH 1/8] update samplesheet schema --- assets/schema_input.json | 34 ++++++++++++++++++- .../utils_nfcore_rnavar_pipeline/main.nf | 27 ++++++++++++--- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index b21e53d8..97382d08 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -32,8 +32,40 @@ "errorMessage": "Strandedness must be provided and be one of 'forward', 'reverse' or 'unstranded'", "enum": ["forward", "reverse", "unstranded"], "meta": ["strandedness"] + }, + "bam": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.bam$", + "errorMessage": "BAM file should end with `.bam`, should not contains spaces and should exist." + }, + "bai": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.bai$", + "errorMessage": "BAI file should end with `.bai`, should not contains spaces and should exist." + }, + "cram": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.cram$", + "errorMessage": "CRAM file should end with `.cram`, should not contains spaces and should exist." + }, + "crai": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.crai$", + "errorMessage": "CRAI file should end with `.crai`, should not contains spaces and should exist." } }, - "required": ["sample", "fastq_1", "strandedness"] + "oneOf": [ + { "required": ["sample", "fastq_1", "strandedness"] }, + { "required": ["sample", "bam"] }, + { "required": ["sample", "cram"] } + ] } } diff --git a/subworkflows/local/utils_nfcore_rnavar_pipeline/main.nf b/subworkflows/local/utils_nfcore_rnavar_pipeline/main.nf index 431e7286..de6dfe78 100644 --- a/subworkflows/local/utils_nfcore_rnavar_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_rnavar_pipeline/main.nf @@ -92,9 +92,9 @@ workflow PIPELINE_INITIALISATION { // ch_samplesheet = Channel.fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json")) - .map{ meta, fastq_1, fastq_2 -> - if (!fastq_2) return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ] - else return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ] + .map{ meta, fastq_1, fastq_2, bam, bai, cram, crai -> + def new_meta = meta + [ single_end: !fastq_2 ] + [ meta.id, new_meta, fastq_1, fastq_2, bam, bai, cram, crai ] } emit: @@ -180,7 +180,24 @@ def validateInputSamplesheet(input) { // Function to check samples are internally consistent after being grouped // def checkSamplesAfterGrouping(input) { - def (metas, fastqs) = input[1..2] + def (_ids, metas, fastqs_1, fastqs_2, bams, bais, crams, crais) = input + + def fastqs_1_list = fastqs_1.findAll { it -> it != [] } + def fastqs_2_list = fastqs_2.findAll { it -> it != [] } + def bam_list = bams.findAll { it -> it != [] } + def bai_list = bais.findAll { it -> it != [] } + def cram_list = crams.findAll { it -> it != [] } + def crai_list = crais.findAll { it -> it != [] } + + def alignment_file_list = bam_list + cram_list + if(alignment_file_list.size() > 1) { + error("Please check input samplesheet -> Multiple BAM/CRAM files per sample are not supported: ${metas[0].id}") + } + + def fastqs = fastqs_1_list + fastqs_2_list + if(alignment_file_list.size() == 1 && fastqs.size() > 0) { + error("Please check input samplesheet -> Detected FASTQ and BAM/CRAM files for the same sample. Please provide only one file type per sample: ${metas[0].id}") + } // Check that multiple runs of the same sample are of the same strandedness def strandedness_ok = metas.collect{ it.strandedness }.unique().size == 1 @@ -194,7 +211,7 @@ def checkSamplesAfterGrouping(input) { error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") } - return [ metas[0], fastqs ] + return [ metas[0], fastqs, bam_list[0] ?: [], bai_list[0] ?: [], cram_list[0] ?: [], crai_list[0] ?: [] ] } // From eed191f004dd57d9f926f3ee8d5f5d3cef29fe68 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 15:58:14 +0100 Subject: [PATCH 2/8] add bam and cram samplesheet --- tests/csv/1.0/bam.csv | 2 ++ tests/csv/1.0/cram.csv | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tests/csv/1.0/bam.csv create mode 100644 tests/csv/1.0/cram.csv diff --git a/tests/csv/1.0/bam.csv b/tests/csv/1.0/bam.csv new file mode 100644 index 00000000..706a4baa --- /dev/null +++ b/tests/csv/1.0/bam.csv @@ -0,0 +1,2 @@ +sample,bam,bai,strandedness +GM12878,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.bam,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.bam.bai,reverse diff --git a/tests/csv/1.0/cram.csv b/tests/csv/1.0/cram.csv new file mode 100644 index 00000000..28ca3dc4 --- /dev/null +++ b/tests/csv/1.0/cram.csv @@ -0,0 +1,2 @@ +sample,cram,crai,strandedness +GM12878,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/cram/test.rna.paired_end.sorted.cram,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/cram/test.rna.paired_end.sorted.cram.crai,reverse From 7f27a52b70092078f4449adf5690ed0574e6a565 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 15:58:41 +0100 Subject: [PATCH 3/8] add new subwf prepare_alignment --- modules.json | 5 + .../nf-core/samtools/convert/environment.yml | 8 ++ modules/nf-core/samtools/convert/main.nf | 60 ++++++++ modules/nf-core/samtools/convert/meta.yml | 103 ++++++++++++++ .../samtools/convert/tests/main.nf.test | 107 ++++++++++++++ .../samtools/convert/tests/main.nf.test.snap | 131 ++++++++++++++++++ .../nf-core/samtools/convert/tests/tags.yml | 2 + subworkflows/local/prepare_alignment/main.nf | 46 ++++++ 8 files changed, 462 insertions(+) create mode 100644 modules/nf-core/samtools/convert/environment.yml create mode 100644 modules/nf-core/samtools/convert/main.nf create mode 100644 modules/nf-core/samtools/convert/meta.yml create mode 100644 modules/nf-core/samtools/convert/tests/main.nf.test create mode 100644 modules/nf-core/samtools/convert/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/convert/tests/tags.yml create mode 100755 subworkflows/local/prepare_alignment/main.nf diff --git a/modules.json b/modules.json index c3395b67..d42aada0 100755 --- a/modules.json +++ b/modules.json @@ -135,6 +135,11 @@ "git_sha": "1943aa60f7490c3d6740e8872e6e69122ccc8087", "installed_by": ["bam_markduplicates_picard"] }, + "samtools/convert": { + "branch": "master", + "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", + "installed_by": ["modules"] + }, "samtools/faidx": { "branch": "master", "git_sha": "f153f1f10e1083c49935565844cccb7453021682", diff --git a/modules/nf-core/samtools/convert/environment.yml b/modules/nf-core/samtools/convert/environment.yml new file mode 100644 index 00000000..62054fc9 --- /dev/null +++ b/modules/nf-core/samtools/convert/environment.yml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::htslib=1.21 + - bioconda::samtools=1.21 diff --git a/modules/nf-core/samtools/convert/main.nf b/modules/nf-core/samtools/convert/main.nf new file mode 100644 index 00000000..cf9253d1 --- /dev/null +++ b/modules/nf-core/samtools/convert/main.nf @@ -0,0 +1,60 @@ +process SAMTOOLS_CONVERT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : + 'biocontainers/samtools:1.21--h50ea8bc_0' }" + + input: + tuple val(meta), path(input), path(index) + tuple val(meta2), path(fasta) + tuple val(meta3), path(fai) + + output: + tuple val(meta), path("*.bam") , emit: bam , optional: true + tuple val(meta), path("*.cram") , emit: cram, optional: true + tuple val(meta), path("*.bai") , emit: bai , optional: true + tuple val(meta), path("*.crai") , emit: crai, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def output_extension = input.getExtension() == "bam" ? "cram" : "bam" + + """ + samtools view \\ + --threads ${task.cpus} \\ + --reference ${fasta} \\ + $args \\ + $input \\ + -o ${prefix}.${output_extension} + + samtools index -@${task.cpus} ${prefix}.${output_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + def output_extension = input.getExtension() == "bam" ? "cram" : "bam" + def index_extension = output_extension == "bam" ? "bai" : "crai" + + """ + touch ${prefix}.${output_extension} + touch ${prefix}.${index_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/samtools/convert/meta.yml b/modules/nf-core/samtools/convert/meta.yml new file mode 100644 index 00000000..d5bfa161 --- /dev/null +++ b/modules/nf-core/samtools/convert/meta.yml @@ -0,0 +1,103 @@ +name: samtools_convert +description: convert and then index CRAM -> BAM or BAM -> CRAM file +keywords: + - view + - index + - bam + - cram +tools: + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: http://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] + identifier: biotools:samtools +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - index: + type: file + description: BAM/CRAM index file + pattern: "*.{bai,crai}" + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Reference file to create the CRAM file + pattern: "*.{fasta,fa}" + - - meta3: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fai: + type: file + description: Reference index file to create the CRAM file + pattern: "*.{fai}" +output: + - bam: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: filtered/converted BAM file + pattern: "*{.bam}" + - cram: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.cram": + type: file + description: filtered/converted CRAM file + pattern: "*{cram}" + - bai: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bai": + type: file + description: filtered/converted BAM index + pattern: "*{.bai}" + - crai: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.crai": + type: file + description: filtered/converted CRAM index + pattern: "*{.crai}" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@FriederikeHanssen" + - "@maxulysse" +maintainers: + - "@FriederikeHanssen" + - "@maxulysse" + - "@matthdsm" diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test b/modules/nf-core/samtools/convert/tests/main.nf.test new file mode 100644 index 00000000..91a0c69e --- /dev/null +++ b/modules/nf-core/samtools/convert/tests/main.nf.test @@ -0,0 +1,107 @@ +nextflow_process { + + name "Test Process SAMTOOLS_CONVERT" + script "../main.nf" + process "SAMTOOLS_CONVERT" + + tag "modules" + tag "modules_nfcore" + tag "samtools" + tag "samtools/convert" + + test("sarscov2 - [bam, bai], fasta, fai") { + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [ id:'fai' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.cram[0][1]).name).match("bam_to_cram_alignment") }, + { assert snapshot(file(process.out.crai[0][1]).name).match("bam_to_cram_index") }, + { assert snapshot(process.out.versions).match("bam_to_cram_versions") } + ) + } + } + + test("homo_sapiens - [cram, crai], fasta, fai") { + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [ id:'fai' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_alignment") }, + { assert snapshot(file(process.out.bai[0][1]).name).match("cram_to_bam_alignment_index") }, + { assert snapshot(process.out.versions).match("cram_to_bam_versions") } + ) + } + } + + test("sarscov2 - [bam, bai], fasta, fai - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [ id:'fai' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match("stub") } + ) + } + } +} diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test.snap b/modules/nf-core/samtools/convert/tests/main.nf.test.snap new file mode 100644 index 00000000..a021254e --- /dev/null +++ b/modules/nf-core/samtools/convert/tests/main.nf.test.snap @@ -0,0 +1,131 @@ +{ + "cram_to_bam_alignment": { + "content": [ + "test.bam" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-06T11:14:51.300147176" + }, + "bam_to_cram_alignment": { + "content": [ + "test.cram" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-06T11:14:36.625470184" + }, + "cram_to_bam_versions": { + "content": [ + [ + "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T07:52:35.516411351" + }, + "bam_to_cram_versions": { + "content": [ + [ + "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T07:52:24.694454205" + }, + "stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + ], + "bai": [ + + ], + "bam": [ + + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + [ + { + "id": "test", + "single_end": false + }, + "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-16T07:52:45.799885099" + }, + "bam_to_cram_index": { + "content": [ + "test.cram.crai" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-06T11:14:36.640009334" + }, + "cram_to_bam_alignment_index": { + "content": [ + "test.bam.bai" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-03-06T11:14:51.304477426" + } +} \ No newline at end of file diff --git a/modules/nf-core/samtools/convert/tests/tags.yml b/modules/nf-core/samtools/convert/tests/tags.yml new file mode 100644 index 00000000..030d5eb5 --- /dev/null +++ b/modules/nf-core/samtools/convert/tests/tags.yml @@ -0,0 +1,2 @@ +samtools/convert: + - "modules/nf-core/samtools/convert/**" diff --git a/subworkflows/local/prepare_alignment/main.nf b/subworkflows/local/prepare_alignment/main.nf new file mode 100755 index 00000000..84b728e5 --- /dev/null +++ b/subworkflows/local/prepare_alignment/main.nf @@ -0,0 +1,46 @@ +// +// Prepare input alignment files +// + +include { SAMTOOLS_CONVERT } from '../../../modules/nf-core/samtools/convert' +include { SAMTOOLS_INDEX } from '../../../modules/nf-core/samtools/index' + +workflow PREPARE_ALIGNMENT { + take: + ch_cram // [ val(meta), path(cram), path(crai) ] + ch_bam // [ val(meta), path(bam), path(bai) ] + ch_fasta // [ val(meta), path(fasta) ] + ch_fai // [ val(meta), path(fai) ] + + main: + ch_versions = Channel.empty() + + SAMTOOLS_CONVERT( + ch_cram, + ch_fasta, + ch_fai + ) + ch_versions = ch_versions.mix(SAMTOOLS_CONVERT.out.versions.first()) + + def ch_bam_branch = ch_bam.branch { meta, bam, bai -> + indexed: bai + return [ meta, bam, bai ] + not_indexed: !bai + return [ meta, bam ] + } + + def ch_bam_no_index = ch_bam_branch.not_indexed.mix(SAMTOOLS_CONVERT.out.cram) + + SAMTOOLS_INDEX( + ch_bam_no_index + ) + ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first()) + + def ch_bam_out = ch_bam_no_index + .join(SAMTOOLS_INDEX.out.bai, failOnMismatch: true, failOnDuplicate: true) + .mix(ch_bam_branch.indexed) + + emit: + bam = ch_bam_out // [ val(meta), path(bam), path(bai) ] + versions = ch_versions +} From c52c360ee0fbe135c88d1c7f63a35a8c923c1e06 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 16:24:40 +0100 Subject: [PATCH 4/8] finish up the implementation --- conf/modules.config | 1 + main.nf | 2 +- subworkflows/local/prepare_alignment/main.nf | 39 +++++++++++--------- subworkflows/local/prepare_genome/main.nf | 2 +- workflows/rnavar/main.nf | 36 +++++++++++++----- 5 files changed, 50 insertions(+), 30 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 87651eb8..84e7d625 100755 --- a/conf/modules.config +++ b/conf/modules.config @@ -220,6 +220,7 @@ process { withName: '.*:SPLITNCIGAR:GATK4_SPLITNCIGARREADS' { ext.args = '--create-output-bam-index false' + ext.prefix = { "${meta.id}.splitncigarreads" } } withName: '.*:SPLITNCIGAR:SAMTOOLS_INDEX' { diff --git a/main.nf b/main.nf index 4d823ad6..79ba8c9d 100644 --- a/main.nf +++ b/main.nf @@ -112,7 +112,7 @@ workflow NFCORE_RNAVAR { ch_gtf = PREPARE_GENOME.out.gtf ch_dict = params.dict ? Channel.fromPath(params.dict).map{ it -> [ [id:'dict'], it ] }.collect() : PREPARE_GENOME.out.dict - ch_fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai) + ch_fasta_fai = params.fasta_fai ? Channel.fromPath(params.fasta_fai).map{ it -> [ [id:'fasta_fai'], it ] }.collect() : PREPARE_GENOME.out.fasta_fai ch_exon_bed = params.exon_bed ? Channel.fromPath(params.exon_bed).map{ it -> [ [id:'exon_bed'], it ] }.collect() : PREPARE_GENOME.out.exon_bed diff --git a/subworkflows/local/prepare_alignment/main.nf b/subworkflows/local/prepare_alignment/main.nf index 84b728e5..9df331c9 100755 --- a/subworkflows/local/prepare_alignment/main.nf +++ b/subworkflows/local/prepare_alignment/main.nf @@ -15,32 +15,35 @@ workflow PREPARE_ALIGNMENT { main: ch_versions = Channel.empty() - SAMTOOLS_CONVERT( - ch_cram, - ch_fasta, - ch_fai - ) - ch_versions = ch_versions.mix(SAMTOOLS_CONVERT.out.versions.first()) - - def ch_bam_branch = ch_bam.branch { meta, bam, bai -> - indexed: bai - return [ meta, bam, bai ] - not_indexed: !bai - return [ meta, bam ] - } - - def ch_bam_no_index = ch_bam_branch.not_indexed.mix(SAMTOOLS_CONVERT.out.cram) + def ch_alignment_branch = ch_bam + .mix(ch_cram) + .branch { meta, bam, bai -> + indexed: bai + return [ meta, bam, bai ] + not_indexed_bam: !bai && bam.extension == "bam" + return [ meta, bam ] + not_indexed_cram: !bai && bam.extension == "cram" + return [ meta, bam ] + } + + def ch_bam_no_index = ch_alignment_branch.not_indexed_bam.mix(ch_alignment_branch.not_indexed_cram) SAMTOOLS_INDEX( ch_bam_no_index ) ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions.first()) - def ch_bam_out = ch_bam_no_index + def ch_bam_indexed = ch_alignment_branch.not_indexed_bam .join(SAMTOOLS_INDEX.out.bai, failOnMismatch: true, failOnDuplicate: true) - .mix(ch_bam_branch.indexed) + + def ch_cram_indexed = ch_alignment_branch.not_indexed_cram + .join(SAMTOOLS_INDEX.out.crai, failOnMismatch: true, failOnDuplicate: true) + + def ch_alignment_out = ch_bam_indexed + .mix(ch_cram_indexed) + .mix(ch_alignment_branch.indexed) emit: - bam = ch_bam_out // [ val(meta), path(bam), path(bai) ] + bam = ch_alignment_out // [ val(meta), path(bam), path(bai) ] versions = ch_versions } diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index e5d9c8ce..c36767fa 100755 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -69,7 +69,7 @@ workflow PREPARE_GENOME { dict = GATK4_CREATESEQUENCEDICTIONARY.out.dict // path: genome.fasta.dict exon_bed = GTF2BED.out.bed.map{ bed -> [ [ id:bed.baseName ], bed ] }.collect() // path: exon.bed fasta = ch_fasta - fasta_fai = SAMTOOLS_FAIDX.out.fai.map{ meta, fai -> [fai] } // path: genome.fasta.fai + fasta_fai = SAMTOOLS_FAIDX.out.fai // path: genome.fasta.fai gtf = ch_gtf.first() // path: genome.gtf star_index = STAR_GENOMEGENERATE.out.index.first() // path: star/index/ dbsnp_tbi = TABIX_DBSNP.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: dbsnb.vcf.gz.tbi diff --git a/workflows/rnavar/main.nf b/workflows/rnavar/main.nf index 3deaa578..e4f3ce4c 100755 --- a/workflows/rnavar/main.nf +++ b/workflows/rnavar/main.nf @@ -27,6 +27,7 @@ include { TABIX_TABIX as TABIXGVCF } from '../../modules/nf-core/tabix/tabix' include { RECALIBRATE } from '../../subworkflows/local/recalibrate' include { SPLITNCIGAR } from '../../subworkflows/local/splitncigar' include { VCF_ANNOTATE_ALL } from '../../subworkflows/local/vcf_annotate_all' +include { PREPARE_ALIGNMENT } from '../../subworkflows/local/prepare_alignment' // nf-core include { BAM_MARKDUPLICATES_PICARD } from '../../subworkflows/nf-core/bam_markduplicates_picard' @@ -79,18 +80,32 @@ workflow RNAVAR { // To gather used softwares versions for MultiQC ch_versions = Channel.empty() - // MODULE: Concatenate FastQ files from same sample if required - ch_fastq = ch_input.groupTuple().map{ samplesheet -> checkSamplesAfterGrouping(samplesheet) } - .branch{ meta, fastqs -> + // Parse the input data + ch_parsed_input = ch_input.groupTuple().map{ samplesheet -> checkSamplesAfterGrouping(samplesheet) } + .branch{ meta, fastqs, bam, bai, cram, crai -> single : fastqs.size() == 1 return [ meta, fastqs.flatten() ] multiple: fastqs.size() > 1 return [ meta, fastqs.flatten() ] + bam : bam + return [ meta, bam, bai ] + cram : cram + return [ meta, cram, crai ] } - CAT_FASTQ(ch_fastq.multiple) + // MODULE: Prepare the alignment files (convert CRAM -> BAM and index) + PREPARE_ALIGNMENT( + ch_parsed_input.cram, + ch_parsed_input.bam, + ch_fasta, + ch_fasta_fai + ) + ch_versions = ch_versions.mix(PREPARE_ALIGNMENT.out.versions) + + // MODULE: Concatenate FastQ files from same sample if required + CAT_FASTQ(ch_parsed_input.multiple) - ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_fastq.single) + ch_cat_fastq = CAT_FASTQ.out.reads.mix(ch_parsed_input.single) ch_versions = ch_versions.mix(CAT_FASTQ.out.versions) @@ -162,6 +177,7 @@ workflow RNAVAR { if (bai) [meta, bam, bai] else [meta, bam, csi] } + .mix(PREPARE_ALIGNMENT.out.bam) //Gather QC reports ch_reports = ch_reports.mix(BAM_MARKDUPLICATES_PICARD.out.metrics.collect{it[1]}.ifEmpty([])) @@ -177,7 +193,7 @@ workflow RNAVAR { SPLITNCIGAR(ch_genome_bam_bai, ch_fasta, - ch_fasta_fai, + ch_fasta_fai.map { _meta, fai -> fai }, ch_dict, ch_interval_list_split ) @@ -205,7 +221,7 @@ workflow RNAVAR { GATK4_BASERECALIBRATOR( ch_splitncigar_bam_bai_interval, ch_fasta.map{ meta, fasta -> [fasta] }, - ch_fasta_fai, + ch_fasta_fai.map { _meta, fai -> fai }, ch_dict.map{ meta, dict -> [dict] }, ch_known_sites, ch_known_sites_tbi @@ -232,7 +248,7 @@ workflow RNAVAR { params.skip_multiqc, ch_applybqsr_bam_bai_interval, ch_dict.map{ meta, dict -> [dict] }, - ch_fasta_fai, + ch_fasta_fai.map { _meta, fai -> fai }, ch_fasta.map{ meta, fasta -> [fasta] } ) @@ -270,7 +286,7 @@ workflow RNAVAR { GATK4_HAPLOTYPECALLER( ch_haplotypecaller_interval_bam, ch_fasta, - ch_fasta_fai.map{ it -> [[id:it.baseName], it] }, + ch_fasta_fai, ch_dict, ch_dbsnp_for_haplotypecaller, ch_dbsnp_for_haplotypecaller_tbi @@ -319,7 +335,7 @@ workflow RNAVAR { GATK4_VARIANTFILTRATION( ch_haplotypecaller_vcf_tbi, ch_fasta, - ch_fasta_fai.map{ fasta_fai -> [[id:'genome'], fasta_fai]}, + ch_fasta_fai, ch_dict ) From a9ec02d1b70377ca5da8195a7d770e1303bb4cf9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 16:35:06 +0100 Subject: [PATCH 5/8] fix wrong fai input in markduplicates --- workflows/rnavar/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/rnavar/main.nf b/workflows/rnavar/main.nf index e4f3ce4c..fa410948 100755 --- a/workflows/rnavar/main.nf +++ b/workflows/rnavar/main.nf @@ -168,7 +168,7 @@ workflow RNAVAR { // BAM_MARKDUPLICATES_PICARD(ch_genome_bam, ch_fasta, - ch_fasta_fai.map{ it -> [[id:'genome'], it] }) + ch_fasta_fai) ch_genome_bam_bai = BAM_MARKDUPLICATES_PICARD.out.bam .join(BAM_MARKDUPLICATES_PICARD.out.bai, remainder: true) From aff0de8ef578278e4ddbc153b94341c9dd77ec7b Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 17:14:10 +0100 Subject: [PATCH 6/8] fix and add tests --- tests/all_inputs.nf.test | 36 ++++++++ tests/all_inputs.nf.test.snap | 133 +++++++++++++++++++++++++++ tests/annotation.nf.test | 6 +- tests/bam_csi.nf.test | 2 +- tests/bam_input.nf.test | 36 ++++++++ tests/bam_input.nf.test.snap | 79 ++++++++++++++++ tests/cram_input.nf.test | 36 ++++++++ tests/cram_input.nf.test.snap | 79 ++++++++++++++++ tests/csv/1.0/all.csv | 4 + tests/default.nf.test | 2 +- tests/removeduplicates.nf.test | 2 +- tests/skip_baserecalibration.nf.test | 2 +- 12 files changed, 410 insertions(+), 7 deletions(-) create mode 100644 tests/all_inputs.nf.test create mode 100644 tests/all_inputs.nf.test.snap create mode 100644 tests/bam_input.nf.test create mode 100644 tests/bam_input.nf.test.snap create mode 100644 tests/cram_input.nf.test create mode 100644 tests/cram_input.nf.test.snap create mode 100644 tests/csv/1.0/all.csv diff --git a/tests/all_inputs.nf.test b/tests/all_inputs.nf.test new file mode 100644 index 00000000..ee55eb6e --- /dev/null +++ b/tests/all_inputs.nf.test @@ -0,0 +1,36 @@ +nextflow_pipeline { + + name "Test pipeline | all inputs" + script "../main.nf" + tag "pipeline" + tag "pipeline_rnavar" + + test("Run with profile test") { + + when { + params { + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + outdir = "$outputDir" + input = "${projectDir}/tests/csv/1.0/all.csv" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name + ).match() } + ) + } + } +} diff --git a/tests/all_inputs.nf.test.snap b/tests/all_inputs.nf.test.snap new file mode 100644 index 00000000..41f88fd4 --- /dev/null +++ b/tests/all_inputs.nf.test.snap @@ -0,0 +1,133 @@ +{ + "Run with profile test": { + "content": [ + 79, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, + [ + "pipeline_info", + "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", + "preprocessing", + "preprocessing/GM12878_bam", + "preprocessing/GM12878_bam/GM12878_bam.recal.bam", + "preprocessing/GM12878_bam/GM12878_bam.recal.bam.bai", + "preprocessing/GM12878_cram", + "preprocessing/GM12878_cram/GM12878_cram.recal.bam", + "preprocessing/GM12878_cram/GM12878_cram.recal.bam.bai", + "preprocessing/GM12878_fastq", + "preprocessing/GM12878_fastq/GM12878_fastq.md.bam", + "preprocessing/GM12878_fastq/GM12878_fastq.md.bam.bai", + "preprocessing/GM12878_fastq/GM12878_fastq.recal.bam", + "preprocessing/GM12878_fastq/GM12878_fastq.recal.bam.bai", + "reports", + "reports/multiqc_data", + "reports/multiqc_data/multiqc.log", + "reports/multiqc_data/multiqc_citations.txt", + "reports/multiqc_data/multiqc_data.json", + "reports/multiqc_data/multiqc_software_versions.txt", + "reports/multiqc_data/multiqc_sources.txt", + "reports/multiqc_report.html", + "reports/stats", + "reports/stats/GM12878_bam", + "reports/stats/GM12878_bam/GM12878_bam.stats", + "reports/stats/GM12878_cram", + "reports/stats/GM12878_cram/GM12878_cram.stats", + "reports/stats/GM12878_fastq", + "reports/stats/GM12878_fastq/GM12878_fastq.flagstat", + "reports/stats/GM12878_fastq/GM12878_fastq.stats", + "reports/stats/GM12878_fastq/STAR_log", + "reports/stats/GM12878_fastq/STAR_log/GM12878_fastq.Log.final.out", + "reports/stats/GM12878_fastq/STAR_log/GM12878_fastq.Log.out", + "reports/stats/GM12878_fastq/STAR_log/GM12878_fastq.Log.progress.out", + "reports/stats/GM12878_fastq/STAR_log/GM12878_fastq.SJ.out.tab", + "samtools", + "samtools/GM12878_fastq.bam", + "samtools/GM12878_fastq.bam.bai", + "variant_calling", + "variant_calling/GM12878_bam", + "variant_calling/GM12878_bam/GM12878_bam.haplotypecaller.filtered.vcf.gz", + "variant_calling/GM12878_bam/GM12878_bam.haplotypecaller.filtered.vcf.gz.tbi", + "variant_calling/GM12878_bam/GM12878_bam.haplotypecaller.vcf.gz", + "variant_calling/GM12878_bam/GM12878_bam.haplotypecaller.vcf.gz.tbi", + "variant_calling/GM12878_cram", + "variant_calling/GM12878_cram/GM12878_cram.haplotypecaller.filtered.vcf.gz", + "variant_calling/GM12878_cram/GM12878_cram.haplotypecaller.filtered.vcf.gz.tbi", + "variant_calling/GM12878_cram/GM12878_cram.haplotypecaller.vcf.gz", + "variant_calling/GM12878_cram/GM12878_cram.haplotypecaller.vcf.gz.tbi", + "variant_calling/GM12878_fastq", + "variant_calling/GM12878_fastq/GM12878_fastq.haplotypecaller.filtered.vcf.gz", + "variant_calling/GM12878_fastq/GM12878_fastq.haplotypecaller.filtered.vcf.gz.tbi", + "variant_calling/GM12878_fastq/GM12878_fastq.haplotypecaller.vcf.gz", + "variant_calling/GM12878_fastq/GM12878_fastq.haplotypecaller.vcf.gz.tbi", + "variant_calling/dbsnp_146.hg38.vcf", + "variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.tbi", + "variant_calling/mills_and_1000G.indels.vcf", + "variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.tbi" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.1" + }, + "timestamp": "2025-01-07T17:13:49.548731154" + } +} \ No newline at end of file diff --git a/tests/annotation.nf.test b/tests/annotation.nf.test index ca4c0c79..c2677c9e 100644 --- a/tests/annotation.nf.test +++ b/tests/annotation.nf.test @@ -27,7 +27,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } @@ -57,7 +57,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } @@ -87,7 +87,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } diff --git a/tests/bam_csi.nf.test b/tests/bam_csi.nf.test index 64ea8f58..7e3fd41f 100644 --- a/tests/bam_csi.nf.test +++ b/tests/bam_csi.nf.test @@ -26,7 +26,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } diff --git a/tests/bam_input.nf.test b/tests/bam_input.nf.test new file mode 100644 index 00000000..7e78259c --- /dev/null +++ b/tests/bam_input.nf.test @@ -0,0 +1,36 @@ +nextflow_pipeline { + + name "Test pipeline | bam input" + script "../main.nf" + tag "pipeline" + tag "pipeline_rnavar" + + test("Run with profile test") { + + when { + params { + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + outdir = "$outputDir" + input = "${projectDir}/tests/csv/1.0/bam.csv" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name + ).match() } + ) + } + } +} diff --git a/tests/bam_input.nf.test.snap b/tests/bam_input.nf.test.snap new file mode 100644 index 00000000..a646d392 --- /dev/null +++ b/tests/bam_input.nf.test.snap @@ -0,0 +1,79 @@ +{ + "Run with profile test": { + "content": [ + 28, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, + [ + "pipeline_info", + "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", + "preprocessing", + "preprocessing/GM12878", + "preprocessing/GM12878/GM12878.recal.bam", + "preprocessing/GM12878/GM12878.recal.bam.bai", + "reports", + "reports/multiqc_data", + "reports/multiqc_data/multiqc.log", + "reports/multiqc_data/multiqc_citations.txt", + "reports/multiqc_data/multiqc_data.json", + "reports/multiqc_data/multiqc_software_versions.txt", + "reports/multiqc_data/multiqc_sources.txt", + "reports/multiqc_report.html", + "reports/stats", + "reports/stats/GM12878", + "reports/stats/GM12878/GM12878.stats", + "variant_calling", + "variant_calling/GM12878", + "variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz", + "variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz.tbi", + "variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz", + "variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz.tbi", + "variant_calling/dbsnp_146.hg38.vcf", + "variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.tbi", + "variant_calling/mills_and_1000G.indels.vcf", + "variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.tbi" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.1" + }, + "timestamp": "2025-01-07T17:03:13.667134079" + } +} \ No newline at end of file diff --git a/tests/cram_input.nf.test b/tests/cram_input.nf.test new file mode 100644 index 00000000..315a7041 --- /dev/null +++ b/tests/cram_input.nf.test @@ -0,0 +1,36 @@ +nextflow_pipeline { + + name "Test pipeline | cram input" + script "../main.nf" + tag "pipeline" + tag "pipeline_rnavar" + + test("Run with profile test") { + + when { + params { + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + outdir = "$outputDir" + input = "${projectDir}/tests/csv/1.0/cram.csv" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name + ).match() } + ) + } + } +} diff --git a/tests/cram_input.nf.test.snap b/tests/cram_input.nf.test.snap new file mode 100644 index 00000000..fab0606f --- /dev/null +++ b/tests/cram_input.nf.test.snap @@ -0,0 +1,79 @@ +{ + "Run with profile test": { + "content": [ + 28, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, + [ + "pipeline_info", + "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", + "preprocessing", + "preprocessing/GM12878", + "preprocessing/GM12878/GM12878.recal.bam", + "preprocessing/GM12878/GM12878.recal.bam.bai", + "reports", + "reports/multiqc_data", + "reports/multiqc_data/multiqc.log", + "reports/multiqc_data/multiqc_citations.txt", + "reports/multiqc_data/multiqc_data.json", + "reports/multiqc_data/multiqc_software_versions.txt", + "reports/multiqc_data/multiqc_sources.txt", + "reports/multiqc_report.html", + "reports/stats", + "reports/stats/GM12878", + "reports/stats/GM12878/GM12878.stats", + "variant_calling", + "variant_calling/GM12878", + "variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz", + "variant_calling/GM12878/GM12878.haplotypecaller.filtered.vcf.gz.tbi", + "variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz", + "variant_calling/GM12878/GM12878.haplotypecaller.vcf.gz.tbi", + "variant_calling/dbsnp_146.hg38.vcf", + "variant_calling/dbsnp_146.hg38.vcf/dbsnp_146.hg38.vcf.gz.tbi", + "variant_calling/mills_and_1000G.indels.vcf", + "variant_calling/mills_and_1000G.indels.vcf/mills_and_1000G.indels.vcf.gz.tbi" + ] + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.1" + }, + "timestamp": "2025-01-07T17:05:36.02051331" + } +} \ No newline at end of file diff --git a/tests/csv/1.0/all.csv b/tests/csv/1.0/all.csv new file mode 100644 index 00000000..09829568 --- /dev/null +++ b/tests/csv/1.0/all.csv @@ -0,0 +1,4 @@ +sample,fastq_1,fastq_2,bam,bai,cram,crai,strandedness +GM12878_fastq,https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz,https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz,,,,,reverse +GM12878_bam,,,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.bam,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/bam/test.rna.paired_end.sorted.bam.bai,,,reverse +GM12878_cram,,,,,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/cram/test.rna.paired_end.sorted.cram,https://github.com/nf-core/test-datasets/raw/refs/heads/modules/data/genomics/homo_sapiens/illumina/cram/test.rna.paired_end.sorted.cram.crai,reverse diff --git a/tests/default.nf.test b/tests/default.nf.test index 18825af0..e0904024 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -25,7 +25,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } diff --git a/tests/removeduplicates.nf.test b/tests/removeduplicates.nf.test index bac8205b..8d3d6116 100644 --- a/tests/removeduplicates.nf.test +++ b/tests/removeduplicates.nf.test @@ -26,7 +26,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } diff --git a/tests/skip_baserecalibration.nf.test b/tests/skip_baserecalibration.nf.test index 78982da0..4599ba8f 100644 --- a/tests/skip_baserecalibration.nf.test +++ b/tests/skip_baserecalibration.nf.test @@ -26,7 +26,7 @@ nextflow_pipeline { // Number of successful tasks workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we tests pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/nf_core_rnavar_software_mqc_versions.yml"), + removeNextflowVersion("$outputDir/pipeline_info/nf_core_pipeline_software_mqc_versions.yml"), // All stable path name, with a relative path stable_name ).match() } From d9534bff3a3fa01e628569e848de63e991959065 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 7 Jan 2025 17:20:54 +0100 Subject: [PATCH 7/8] update docs & changelog --- CHANGELOG.md | 1 + docs/usage.md | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3256a119..83c8d2a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [#116](https://github.com/nf-core/rnavar/pull/116) - Added `unzip` from nf-core modules for working with unzipped fasta and gtf files +- [#157](https://github.com/nf-core/rnavar/pull/157) - Added support for `bam` and `cram` input files ### Changed diff --git a/docs/usage.md b/docs/usage.md index 8e2f2abf..af76cf85 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -111,8 +111,17 @@ TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz,,reverse | `sample` | Custom sample name. This entry will be identical for multiple sequencing libraries/runs from the same sample. Spaces in sample names are automatically converted to underscores (`_`). | | `fastq_1` | Full path to FastQ file for Illumina short reads 1. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | | `fastq_2` | Full path to FastQ file for Illumina short reads 2. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | +| `bam` | Full path to BAM file created with STAR and duplicate marked. File has to have the extension ".bam". | +| `bai` | Full path to index file of the BAM file. File has to have the extension ".bai". | +| `cram` | Full path to CRAM file created with STAR and duplicate marked. File has to have the extension ".cram". | +| `crai` | Full path to index file of the CRAM file. File has to have the extension ".crai". | | `strandedness` | Sample strand-specificity. Must be one of `unstranded`, `forward` or `reverse`. | +:::note +Only one file type per sample is allowed. Supplying FASTQ files and a BAM/CRAM file for the same sample will cause an error in the pipeline. +The pipeline also has no support for multiple BAM/CRAM file per sample. +::: + An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. ## PIPELINE PARAMETERS AND DESCRIPTION From c7885440b858e038b6e074666a251c735ed21c78 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 8 Jan 2025 14:27:36 +0100 Subject: [PATCH 8/8] fix snapshots --- tests/all_inputs.nf.test.snap | 4 +- tests/annotation.nf.test.snap | 234 ++++++++++++++++++++-- tests/bam_csi.nf.test.snap | 67 ++++++- tests/default.nf.test.snap | 70 ++++++- tests/removeduplicates.nf.test.snap | 70 ++++++- tests/skip_baserecalibration.nf.test.snap | 64 +++++- 6 files changed, 472 insertions(+), 37 deletions(-) diff --git a/tests/all_inputs.nf.test.snap b/tests/all_inputs.nf.test.snap index 41f88fd4..23afadb6 100644 --- a/tests/all_inputs.nf.test.snap +++ b/tests/all_inputs.nf.test.snap @@ -126,8 +126,8 @@ ], "meta": { "nf-test": "0.9.1", - "nextflow": "24.10.1" + "nextflow": "24.10.3" }, - "timestamp": "2025-01-07T17:13:49.548731154" + "timestamp": "2025-01-08T13:56:22.79954652" } } \ No newline at end of file diff --git a/tests/annotation.nf.test.snap b/tests/annotation.nf.test.snap index a482d28f..afadab8f 100644 --- a/tests/annotation.nf.test.snap +++ b/tests/annotation.nf.test.snap @@ -1,8 +1,80 @@ { "Run with profile test | annotation with merge": { "content": [ - 46, - null, + 47, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "ENSEMBLVEP_VEP": { + "ensemblvep": 111.0 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "SNPEFF_SNPEFF": { + "snpeff": "5.1d" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "TABIX_BGZIPTABIX": { + "tabix": "1.19.1" + }, + "TABIX_TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "annotation", "annotation/haplotypecaller", @@ -185,15 +257,81 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T14:54:33.842224" + "timestamp": "2025-01-08T13:44:12.561904068" }, "Run with profile test | annotation with vep": { "content": [ - 43, - null, + 44, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "ENSEMBLVEP_VEP": { + "ensemblvep": 111.0 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "TABIX_TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "annotation", "annotation/haplotypecaller", @@ -363,15 +501,81 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T14:49:38.621181" + "timestamp": "2025-01-08T13:37:37.774766173" }, "Run with profile test | annotation with snpeff": { "content": [ - 43, - null, + 44, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "SNPEFF_SNPEFF": { + "snpeff": "5.1d" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "TABIX_BGZIPTABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "annotation", "annotation/haplotypecaller", @@ -437,9 +641,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T14:46:10.437216" + "timestamp": "2025-01-08T13:31:39.422563362" } } \ No newline at end of file diff --git a/tests/bam_csi.nf.test.snap b/tests/bam_csi.nf.test.snap index 8958e3dc..f984dd6a 100644 --- a/tests/bam_csi.nf.test.snap +++ b/tests/bam_csi.nf.test.snap @@ -1,8 +1,65 @@ { "Run with profile test | bam_csi_index": { "content": [ - 39, - null, + 40, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", @@ -43,9 +100,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T14:57:45.737274" + "timestamp": "2025-01-08T14:02:00.162034514" } } \ No newline at end of file diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index b1161f20..a7c2b652 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -1,8 +1,68 @@ { "Run with profile test": { "content": [ - 40, - null, + 41, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", @@ -45,9 +105,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T15:01:04.962148" + "timestamp": "2025-01-08T14:15:23.218615886" } } \ No newline at end of file diff --git a/tests/removeduplicates.nf.test.snap b/tests/removeduplicates.nf.test.snap index 6011aff2..25ee58b7 100644 --- a/tests/removeduplicates.nf.test.snap +++ b/tests/removeduplicates.nf.test.snap @@ -1,8 +1,68 @@ { "Run with profile test | remove_duplicates": { "content": [ - 40, - null, + 41, + { + "APPLYBQSR": { + "gatk4": "4.5.0.0" + }, + "CAT_FASTQ": { + "cat": 8.3 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BASERECALIBRATOR": { + "gatk4": "4.5.0.0" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", @@ -45,9 +105,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T15:05:33.998547" + "timestamp": "2025-01-08T14:21:28.482683082" } } \ No newline at end of file diff --git a/tests/skip_baserecalibration.nf.test.snap b/tests/skip_baserecalibration.nf.test.snap index 2b3cefbe..eb925e0f 100644 --- a/tests/skip_baserecalibration.nf.test.snap +++ b/tests/skip_baserecalibration.nf.test.snap @@ -1,8 +1,62 @@ { "Run with profile test | skip_baserecalibration": { "content": [ - 36, - null, + 37, + { + "CAT_FASTQ": { + "cat": 8.3 + }, + "FASTQC": { + "fastqc": "0.12.1" + }, + "GATK4_BEDTOINTERVALLIST": { + "gatk4": "4.5.0.0" + }, + "GATK4_HAPLOTYPECALLER": { + "gatk4": "4.5.0.0" + }, + "GATK4_MERGEVCFS": { + "gatk4": "4.5.0.0" + }, + "GATK4_SPLITNCIGARREADS": { + "gatk4": "4.5.0.0" + }, + "GATK4_VARIANTFILTRATION": { + "gatk4": "4.5.0.0" + }, + "PICARD_MARKDUPLICATES": { + "picard": "3.1.1" + }, + "SAMTOOLS_FLAGSTAT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_IDXSTATS": { + "samtools": "1.19.2" + }, + "SAMTOOLS_INDEX": { + "samtools": "1.19.2" + }, + "SAMTOOLS_MERGE": { + "samtools": "1.19.2" + }, + "SAMTOOLS_SORT": { + "samtools": "1.19.2" + }, + "SAMTOOLS_STATS": { + "samtools": "1.19.2" + }, + "STAR_ALIGN": { + "star": "2.7.10a", + "samtools": 1.18, + "gawk": "5.1.0" + }, + "TABIX": { + "tabix": "1.19.1" + }, + "Workflow": { + "nf-core/rnavar": "v2.0.0dev" + } + }, [ "pipeline_info", "pipeline_info/nf_core_pipeline_software_mqc_versions.yml", @@ -43,9 +97,9 @@ ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.1", + "nextflow": "24.10.3" }, - "timestamp": "2024-10-11T15:10:25.387052" + "timestamp": "2025-01-08T14:26:44.327045503" } } \ No newline at end of file