From 21ecd68bfe415ee78173813667f1bb0d465f7f4b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 27 Jan 2022 08:43:02 +0100 Subject: [PATCH 01/71] fix: remove left-over unnecessary code --- modules/deeparg/predict/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/deeparg/predict/main.nf b/modules/deeparg/predict/main.nf index 1af0fd40..9408fa3d 100644 --- a/modules/deeparg/predict/main.nf +++ b/modules/deeparg/predict/main.nf @@ -11,7 +11,7 @@ process DEEPARG_PREDICT { input: tuple val(meta), path(fasta), val(model) - tuple path(db) + path(db) output: tuple val(meta), path("*.align.daa") , emit: daa From 0f7c04647747f535c94f63908bdd82c77f9a9ed1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:51:17 +0200 Subject: [PATCH 02/71] first commit --- modules/elprep/merge/main.nf | 44 ++++++++++++++++++++++ modules/elprep/merge/meta.yml | 44 ++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/elprep/merge/main.nf | 17 +++++++++ tests/modules/elprep/merge/nextflow.config | 5 +++ tests/modules/elprep/merge/test.yml | 11 ++++++ 6 files changed, 125 insertions(+) create mode 100644 modules/elprep/merge/main.nf create mode 100644 modules/elprep/merge/meta.yml create mode 100644 tests/modules/elprep/merge/main.nf create mode 100644 tests/modules/elprep/merge/nextflow.config create mode 100644 tests/modules/elprep/merge/test.yml diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf new file mode 100644 index 00000000..8312d35b --- /dev/null +++ b/modules/elprep/merge/main.nf @@ -0,0 +1,44 @@ +process ELPREP_MERGE { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("**.{bam,sam}"), emit: bam + 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}" + if (meta.single_end) { + args += " --single-end" + } + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + elprep merge \\ + input \\ + ${prefix}.${suffix} \\ + $args \\ + --nr-of-threads $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/merge/meta.yml b/modules/elprep/merge/meta.yml new file mode 100644 index 00000000..e157fddb --- /dev/null +++ b/modules/elprep/merge/meta.yml @@ -0,0 +1,44 @@ +name: "elprep_merge" +description: Merge split bam/sam chunks in one file +keywords: + - bam + - sam + - merge +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM chunks to merge + pattern: "*.{bam,sam}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - bam: + type: file + description: Merged BAM/SAM file + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cd4913cf..ea22a0d6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -587,6 +587,10 @@ ectyper: - modules/ectyper/** - tests/modules/ectyper/** +elprep/merge: + - modules/elprep/merge/** + - tests/modules/elprep/merge/** + emmtyper: - modules/emmtyper/** - tests/modules/emmtyper/** diff --git a/tests/modules/elprep/merge/main.nf b/tests/modules/elprep/merge/main.nf new file mode 100644 index 00000000..b4a40ce3 --- /dev/null +++ b/tests/modules/elprep/merge/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' +include { ELPREP_MERGE } from '../../../../modules/elprep/merge/main.nf' + +workflow test_elprep_merge { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) + ELPREP_MERGE ( ELPREP_SPLIT.out.bam ) +} diff --git a/tests/modules/elprep/merge/nextflow.config b/tests/modules/elprep/merge/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/elprep/merge/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml new file mode 100644 index 00000000..c66fe030 --- /dev/null +++ b/tests/modules/elprep/merge/test.yml @@ -0,0 +1,11 @@ +- name: "elprep merge" + command: nextflow run ./tests/modules/elprep/merge -entry test_elprep_merge -c ./tests/config/nextflow.config -c ./tests/modules/elprep/merge/nextflow.config + tags: + - "elprep" + # + - "elprep/merge" + # + files: + - path: "output/elprep/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/elprep/versions.yml From ccef7f857917189fe1c2563c4d68deb038bade4b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 11:26:01 +0200 Subject: [PATCH 03/71] alignment --- modules/elprep/merge/main.nf | 4 ++-- tests/modules/elprep/merge/test.yml | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 8312d35b..010156f2 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -11,8 +11,8 @@ process ELPREP_MERGE { tuple val(meta), path(bam) output: - tuple val(meta), path("**.{bam,sam}"), emit: bam - path "versions.yml" , emit: versions + tuple val(meta), path("**.{bam,sam}") , emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml index c66fe030..26c16f59 100644 --- a/tests/modules/elprep/merge/test.yml +++ b/tests/modules/elprep/merge/test.yml @@ -2,10 +2,7 @@ command: nextflow run ./tests/modules/elprep/merge -entry test_elprep_merge -c ./tests/config/nextflow.config -c ./tests/modules/elprep/merge/nextflow.config tags: - "elprep" - # - "elprep/merge" - # files: - path: "output/elprep/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc - path: output/elprep/versions.yml From ad15d1b7922c8de1b4b84897e4a44182f5b52299 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 11:27:55 +0200 Subject: [PATCH 04/71] update label --- modules/elprep/merge/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 010156f2..00ed4d60 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -1,6 +1,6 @@ process ELPREP_MERGE { tag "$meta.id" - label 'process_medium' + label 'process_low' conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From 6723ca7f9068ecbdee31dcad07f3115dc5b40667 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:05:02 +0200 Subject: [PATCH 05/71] bump version, add merge before split --- modules/bamtools/split/main.nf | 22 +++++++++++++++------- modules/bamtools/split/meta.yml | 8 +++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 014e5cdb..f6382d97 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -2,13 +2,14 @@ process BAMTOOLS_SPLIT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + conda (params.enable_conda ? "bioconda::bamtools=2.5.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : - 'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' : + 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }" input: tuple val(meta), path(bam) + path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -19,12 +20,19 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' + def args2 = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') + if (bam_list) { + input += " -list $bam_list" + } + """ - bamtools \\ - split \\ - -in $bam \\ - $args + bamtools merge \\ + ${input_list} \\ + $args \\ + bamtools split \\ + $args2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0e848212..6c534281 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,8 +23,13 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A BAM file to split + description: A list of BAM files to merge and then split pattern: "*.bam" + - bam_list: + type: file + description: | + Input file containing bam files to merge before splitting, + one line per file output: - meta: @@ -43,3 +48,4 @@ output: authors: - "@sguizard" + - "@matthdsm" From b35264e9196d8f7c74c28a7bd5bc126a5e16afe8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:11:37 +0200 Subject: [PATCH 06/71] bugfixes --- modules/bamtools/split/main.nf | 6 ++---- modules/bamtools/split/meta.yml | 2 +- tests/modules/bamtools/split/main.nf | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f6382d97..2f5ef09f 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -20,7 +20,6 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' - def args2 = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') if (bam_list) { @@ -30,9 +29,8 @@ process BAMTOOLS_SPLIT { """ bamtools merge \\ ${input_list} \\ - $args \\ - bamtools split \\ - $args2 + | bamtools split \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 6c534281..0fd5d5ca 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -28,7 +28,7 @@ input: - bam_list: type: file description: | - Input file containing bam files to merge before splitting, + Optional input file containing bam files to merge before splitting, one line per file output: diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index eb0bed01..9f30c4f9 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -10,5 +10,5 @@ workflow test_bamtools_split { [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT ( input, [] ) } From 07982d6cb13649c308625bb3d215c39979e1207c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:31:39 +0200 Subject: [PATCH 07/71] fix command line, fix meta.yml --- modules/bamtools/split/main.nf | 5 ++++- tests/modules/bamtools/split/test.yml | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 2f5ef09f..f72d13be 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -23,7 +23,10 @@ process BAMTOOLS_SPLIT { def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') if (bam_list) { - input += " -list $bam_list" + input_list += " -list $bam_list" + } + if (!args.contains("-stub")) { + args += " -stub ${prefix}" } """ diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 4f52e9ce..b52cc9ee 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,10 +1,11 @@ - name: bamtools split test_bamtools_split - command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split -c tests/config/nextflow.config tags: - - bamtools/split - bamtools + - bamtools/split files: - - path: output/bamtools/test.paired_end.sorted.REF_chr22.bam + - path: output/bamtools/test.REF_chr22.bam md5sum: b7dc50e0edf9c6bfc2e3b0e6d074dc07 - - path: output/bamtools/test.paired_end.sorted.REF_unmapped.bam + - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb + - path: output/bamtools/versions.yml From d85f9c7011a2539dc07582c1642f4255a3724b7c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 21 Apr 2022 13:16:23 +0200 Subject: [PATCH 08/71] add subworkflow bam_qc_picard --- subworkflows/nf-core/bam_qc_picard/main.nf | 43 +++++++++++++ subworkflows/nf-core/bam_qc_picard/meta.yml | 64 +++++++++++++++++++ .../nf-core/bam_qc_picard/main.nf | 21 ++++++ .../nf-core/bam_qc_picard/test.yml | 33 ++++++++++ 4 files changed, 161 insertions(+) create mode 100644 subworkflows/nf-core/bam_qc_picard/main.nf create mode 100644 subworkflows/nf-core/bam_qc_picard/meta.yml create mode 100644 tests/subworkflows/nf-core/bam_qc_picard/main.nf create mode 100644 tests/subworkflows/nf-core/bam_qc_picard/test.yml diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..31edb2c3 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,43 @@ +// +// Run QC steps on BAM/CRAM files using Picard +// + +params.options = [:] + +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' addParams( options: params.options ) +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' addParams( options: params.options ) +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' addParams( options: params.options ) + +workflow BAM_QC_PICARD { + take: + ch_bam_bai // channel: [ val(meta), [ bam ], [bai/csi] ] + ch_fasta // channel: [ fasta ] + ch_bait_interval // channel: [ bait_interval ] + ch_target_interval // channel: [ target_interval ] + + main: + ch_versions = Channel.empty() + + PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta] ) + ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + if (!ch_bait_interval.isEmpty() || !ch_target_interval.isEmpty()) { + if (ch_bait_interval.isEmpty()) { + throw new Error("Bait interval channel is empty") + } + if (ch_target_interval.isEmpty()) { + throw new Error("Target interval channel is empty") + } + PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) + ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) + } else { + PICARD_COLLECTWGSMETRICS( ch_bam_bai, ch_fasta ) + ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + } + + emit: + hs_metrics = PICARD_COLLECTHSMETRICS.out.hs_metrics // channel: [ val(meta), [ hs_metrics ] ] + wgs_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ wgs_metrics ] ] + multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml new file mode 100644 index 00000000..77104e82 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -0,0 +1,64 @@ +name: bam_qc +description: Produces comprehensive statistics from BAM file +keywords: + - statistics + - counts + - hs_metrics + - wgs_metrics + - bam + - sam + - cram +modules: + - picard/collectmultiplemetrics + - picard/collectwgsmetrics + - picard/collecthsmetrics +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - bai: + type: file + description: Index for BAM/CRAM/SAM file + pattern: "*.{bai,crai,sai}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" + - bait_intervals: + type: optional file + description: An interval list file that contains the locations of the baits used. + pattern: "baits.interval_list" + - target_intervals: + type: optional file + description: An interval list file that contains the locations of the targets. + pattern: "targets.interval_list" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - hs_metrics: + type: file + description: Alignment metrics files generated by picard CollectHsMetrics + pattern: "*_collecthsmetrics.txt" + - wgs_metrics: + type: file + description: Alignment metrics files generated by picard CollectWgsMetrics + pattern: "*_{metrics}" + - multiple_metrics: + type: file + description: Alignment metrics files generated by picard CollectMultipleMetrics + pattern: "*_{metrics}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@matthdsm" diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..d88f2bf9 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/main' addParams([:]) + +workflow test_bam_qc_picard_wgs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + ] + + BAM_QC_PICARD ( input, [], [], [] ) +} + +workflow test_bam_qc_picard_targetted { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAM_QC_PICARD ( input, [], file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) ) +} diff --git a/tests/subworkflows/nf-core/bam_qc_picard/test.yml b/tests/subworkflows/nf-core/bam_qc_picard/test.yml new file mode 100644 index 00000000..af98230d --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/test.yml @@ -0,0 +1,33 @@ +- name: bam qc picard wgs + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_wgs -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collectwgsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test.CollectWgsMetrics.coverage_metrics + +- name: bam qc picard targetted + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_targetted -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collecthsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test_collecthsmetrics.txt From 8dad38afc7f28db49c38a23deb7abfeca2ee3bc7 Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 11:35:14 +0200 Subject: [PATCH 09/71] fix test.yml --- tests/modules/elprep/merge/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml index 26c16f59..d6037bec 100644 --- a/tests/modules/elprep/merge/test.yml +++ b/tests/modules/elprep/merge/test.yml @@ -1,8 +1,8 @@ -- name: "elprep merge" - command: nextflow run ./tests/modules/elprep/merge -entry test_elprep_merge -c ./tests/config/nextflow.config -c ./tests/modules/elprep/merge/nextflow.config +- name: elprep merge test_elprep_merge + command: nextflow run tests/modules/elprep/merge -entry test_elprep_merge -c tests/config/nextflow.config tags: - - "elprep" - - "elprep/merge" + - elprep + - elprep/merge files: - - path: "output/elprep/test.bam" + - path: output/elprep/test.bam - path: output/elprep/versions.yml From c4072f274cdf91601c895b206f2011e0b4b809df Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:39:22 +0200 Subject: [PATCH 10/71] fix formatting, fix code style --- modules/elprep/merge/main.nf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 00ed4d60..2b12bfe2 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -18,12 +18,10 @@ process ELPREP_MERGE { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - if (meta.single_end) { - args += " --single-end" - } - def suffix = args.contains("--output-type sam") ? "sam" : "bam" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + def single_end = meta.single_end ? " --single-end" : "" """ # create directory and move all input so elprep can find and merge them before splitting @@ -34,6 +32,7 @@ process ELPREP_MERGE { input \\ ${prefix}.${suffix} \\ $args \\ + ${single_end} \\ --nr-of-threads $task.cpus cat <<-END_VERSIONS > versions.yml From 2f6382168cac2ca8a9ff9d53c868fbde1a0ca5e1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:51:54 +0200 Subject: [PATCH 11/71] update meta.yml --- modules/elprep/merge/meta.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/elprep/merge/meta.yml b/modules/elprep/merge/meta.yml index e157fddb..1f49b1a0 100644 --- a/modules/elprep/merge/meta.yml +++ b/modules/elprep/merge/meta.yml @@ -7,10 +7,10 @@ keywords: tools: - "elprep": description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" licence: "['AGPL v3']" input: From fefffb9bb0776e679c2297e8d80325d57e2f2d7a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 12:36:32 +0200 Subject: [PATCH 12/71] fix output glob --- modules/elprep/merge/main.nf | 6 +++--- tests/modules/elprep/merge/test.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 2b12bfe2..28fa9985 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -11,8 +11,8 @@ process ELPREP_MERGE { tuple val(meta), path(bam) output: - tuple val(meta), path("**.{bam,sam}") , emit: bam - path "versions.yml" , emit: versions + tuple val(meta), path("output/**.{bam,sam}") , emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -30,7 +30,7 @@ process ELPREP_MERGE { elprep merge \\ input \\ - ${prefix}.${suffix} \\ + output/${prefix}.${suffix} \\ $args \\ ${single_end} \\ --nr-of-threads $task.cpus diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml index d6037bec..ad2ecfef 100644 --- a/tests/modules/elprep/merge/test.yml +++ b/tests/modules/elprep/merge/test.yml @@ -4,5 +4,5 @@ - elprep - elprep/merge files: - - path: output/elprep/test.bam + - path: output/elprep/output/test.bam - path: output/elprep/versions.yml From 9a2dad935cad22789380f94b67a44181e89e4392 Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 13:13:39 +0200 Subject: [PATCH 13/71] update config --- tests/modules/elprep/merge/nextflow.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/elprep/merge/nextflow.config b/tests/modules/elprep/merge/nextflow.config index 50f50a7a..4e4570f4 100644 --- a/tests/modules/elprep/merge/nextflow.config +++ b/tests/modules/elprep/merge/nextflow.config @@ -1,5 +1,5 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + withName : ELPREP_MERGE { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } +} From 413980e93a9cb8ba51f430d8a794cb25c43e9305 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:33:16 +0200 Subject: [PATCH 14/71] make use of dependent on input array size --- modules/bamtools/split/main.nf | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f72d13be..7d69a824 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,7 +9,6 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) - path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -21,18 +20,22 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') - if (bam_list) { - input_list += " -list $bam_list" - } - if (!args.contains("-stub")) { - args += " -stub ${prefix}" + def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : "" + + if (size(bam) > 1){ + def bamtools_merge_cmd = "bamtools merge ${input_list} |" + } else { + def split_input = input_list } + """ - bamtools merge \\ - ${input_list} \\ - | bamtools split \\ + ${bamtools_merge_cmd} \\ + bamtools split \\ + $split_input \\ + $stub_cmd \\ $args cat <<-END_VERSIONS > versions.yml From d617a50371abf87bdb376844926088c478ae3f51 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:39:25 +0200 Subject: [PATCH 15/71] add extra test --- tests/modules/bamtools/split/main.nf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 9f30c4f9..2fc16d67 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -4,11 +4,21 @@ nextflow.enable.dsl = 2 include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' -workflow test_bamtools_split { +workflow test_bamtools_split_single_input { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - BAMTOOLS_SPLIT ( input, [] ) + BAMTOOLS_SPLIT ( input ) +} + +workflow test_bamtools_split_multiple_input { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] + [ + + BAMTOOLS_SPLIT ( input ) } From d293cffc6a3beb7f1ef9bab6e95ea421f622b2a5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:42:43 +0200 Subject: [PATCH 16/71] update tests --- tests/modules/bamtools/split/main.nf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 2fc16d67..ef4b9d59 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -2,15 +2,17 @@ nextflow.enable.dsl = 2 -include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_SINGLE } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_MULTIPLE } from '../../../../modules/bamtools/split/main.nf' workflow test_bamtools_split_single_input { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_SINGLE ( input ) } workflow test_bamtools_split_multiple_input { @@ -20,5 +22,5 @@ workflow test_bamtools_split_multiple_input { [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] [ - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_MULTIPLE ( input ) } From 7e883da90460f77b3745468452b4c549327dde13 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:50:50 +0200 Subject: [PATCH 17/71] Revert "make use of dependent on input array size" This reverts commit 413980e93a9cb8ba51f430d8a794cb25c43e9305. --- modules/bamtools/split/main.nf | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 7d69a824..f72d13be 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,6 +9,7 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) + path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -20,22 +21,18 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_list = bam.collect{"-in $it"}.join(' ') - def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : "" - - if (size(bam) > 1){ - def bamtools_merge_cmd = "bamtools merge ${input_list} |" - } else { - def split_input = input_list + if (bam_list) { + input_list += " -list $bam_list" + } + if (!args.contains("-stub")) { + args += " -stub ${prefix}" } - """ - ${bamtools_merge_cmd} \\ - bamtools split \\ - $split_input \\ - $stub_cmd \\ + bamtools merge \\ + ${input_list} \\ + | bamtools split \\ $args cat <<-END_VERSIONS > versions.yml From b4af3f1475b91d0c411e901d6126515babcdafec Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 15:02:41 +0200 Subject: [PATCH 18/71] test fixes --- modules/bamtools/split/main.nf | 9 ++------- tests/modules/bamtools/split/main.nf | 9 ++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f72d13be..7184261e 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,7 +9,6 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) - path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -22,17 +21,13 @@ process BAMTOOLS_SPLIT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') - if (bam_list) { - input_list += " -list $bam_list" - } - if (!args.contains("-stub")) { - args += " -stub ${prefix}" - } + def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" """ bamtools merge \\ ${input_list} \\ | bamtools split \\ + $stub \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index ef4b9d59..ff0cb748 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -15,12 +15,15 @@ workflow test_bamtools_split_single_input { BAMTOOLS_SPLIT_SINGLE ( input ) } -workflow test_bamtools_split_multiple_input { +workflow test_bamtools_split_multiple { input = [ [ id:'test', single_end:false ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] - [ + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)] + + ] BAMTOOLS_SPLIT_MULTIPLE ( input ) } + From 3bcae8e71e705f289ec3786e7b6255eb5e0d56af Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 15:19:52 +0200 Subject: [PATCH 19/71] fix testing errors --- tests/modules/bamtools/split/main.nf | 2 +- tests/modules/bamtools/split/test.yml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index ff0cb748..9787b4ed 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -20,7 +20,7 @@ workflow test_bamtools_split_multiple { input = [ [ id:'test', single_end:false ], // meta map [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)] + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] ] diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index b52cc9ee..63ecac57 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,5 +1,5 @@ -- name: bamtools split test_bamtools_split - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split -c tests/config/nextflow.config +- name: bamtools split test_bamtools_split_single_input + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_single_input -c tests/config/nextflow.config tags: - bamtools - bamtools/split @@ -9,3 +9,15 @@ - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb - path: output/bamtools/versions.yml + +- name: bamtools split test_bamtools_split_multiple + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_multiple -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/split + files: + - path: output/bamtools/test.REF_chr22.bam + md5sum: 585675bea34c48ebe9db06a561d4b4fa + - path: output/bamtools/test.REF_unmapped.bam + md5sum: 16ad644c87b9471f3026bc87c98b4963 + - path: output/bamtools/versions.yml From 2a2ac290c37fbbd6caa41b06993818491131e0f2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:00 +0200 Subject: [PATCH 20/71] Update modules/bamtools/split/meta.yml Co-authored-by: Harshil Patel --- modules/bamtools/split/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0fd5d5ca..badc6974 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,7 +23,7 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A list of BAM files to merge and then split + description: A list of one or more BAM files to merge and then split pattern: "*.bam" - bam_list: type: file From 7bcede747411d77f85dde0c33e3599e81c0cdb14 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:14 +0200 Subject: [PATCH 21/71] Update modules/bamtools/split/meta.yml Co-authored-by: Harshil Patel --- modules/bamtools/split/meta.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index badc6974..8af701f0 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -25,11 +25,6 @@ input: type: file description: A list of one or more BAM files to merge and then split pattern: "*.bam" - - bam_list: - type: file - description: | - Optional input file containing bam files to merge before splitting, - one line per file output: - meta: From b73662c8d9b5a770904ae9f3b1a79c878f125c6c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:32 +0200 Subject: [PATCH 22/71] Update tests/modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/main.nf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 9787b4ed..e5c15c32 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -19,9 +19,10 @@ workflow test_bamtools_split_multiple { input = [ [ id:'test', single_end:false ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] - + [ + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + ] ] BAMTOOLS_SPLIT_MULTIPLE ( input ) From 6efb022f6943ff67421b46359b38582a36278fe5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:44 +0200 Subject: [PATCH 23/71] Update tests/modules/bamtools/split/test.yml Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 63ecac57..5747aa25 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -11,7 +11,7 @@ - path: output/bamtools/versions.yml - name: bamtools split test_bamtools_split_multiple - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_multiple -c tests/config/nextflow.config + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_multiple -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - bamtools - bamtools/split From e9c44f3d85b731add02680fa6a246c0675e1aac7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:35:34 +0200 Subject: [PATCH 24/71] Update tests/modules/bamtools/split/test.yml Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 5747aa25..af639b43 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,5 +1,5 @@ - name: bamtools split test_bamtools_split_single_input - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_single_input -c tests/config/nextflow.config + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_single_input -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - bamtools - bamtools/split From 2d32267fcdce945375294cb776ca129038d2b903 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:36:01 +0200 Subject: [PATCH 25/71] Update modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- modules/bamtools/split/main.nf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 7184261e..9c643b84 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -24,11 +24,13 @@ process BAMTOOLS_SPLIT { def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" """ - bamtools merge \\ - ${input_list} \\ - | bamtools split \\ - $stub \\ - $args + bamtools \\ + merge \\ + $input_list \\ + | bamtools \\ + split \\ + -stub $prefix \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": From da56a2d50968f12ff2aa1a6d6b05fae083ba26c3 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:36:08 +0200 Subject: [PATCH 26/71] Update modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- modules/bamtools/split/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 9c643b84..aaa5b663 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -21,8 +21,6 @@ process BAMTOOLS_SPLIT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') - def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" - """ bamtools \\ merge \\ From 2b29ff5883278856200f003328ece8d4897548bc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:03:02 +0200 Subject: [PATCH 27/71] drop params.options --- subworkflows/nf-core/bam_qc_picard/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 31edb2c3..b8a92a21 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -4,9 +4,9 @@ params.options = [:] -include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' addParams( options: params.options ) -include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' addParams( options: params.options ) -include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' addParams( options: params.options ) +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' workflow BAM_QC_PICARD { take: From 8fb8199f3115c1a7f136202882b39be403ac5cd5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:05:07 +0200 Subject: [PATCH 28/71] fix copilot suggestion --- subworkflows/nf-core/bam_qc_picard/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index b8a92a21..e4a7e5f0 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -22,10 +22,10 @@ workflow BAM_QC_PICARD { ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (!ch_bait_interval.isEmpty() || !ch_target_interval.isEmpty()) { if (ch_bait_interval.isEmpty()) { - throw new Error("Bait interval channel is empty") + log.error("Bait interval channel is empty") } if (ch_target_interval.isEmpty()) { - throw new Error("Target interval channel is empty") + log.error("Target interval channel is empty") } PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) From 433aaece46967b56ba6a4c937ce1c8b0706b260e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:05:31 +0200 Subject: [PATCH 29/71] Update tests/subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- tests/subworkflows/nf-core/bam_qc_picard/main.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf index d88f2bf9..9112416b 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -16,6 +16,8 @@ workflow test_bam_qc_picard_targetted { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) - BAM_QC_PICARD ( input, [], file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) ) + BAM_QC_PICARD ( input, [], bait, target ) } From 3cbf5c63e5677491377f23e6dda20443804a8158 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:09:25 +0200 Subject: [PATCH 30/71] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index e4a7e5f0..851268c6 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -20,7 +20,7 @@ workflow BAM_QC_PICARD { PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta] ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) - if (!ch_bait_interval.isEmpty() || !ch_target_interval.isEmpty()) { + if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { log.error("Bait interval channel is empty") } From 881e9db4bfde569c8e9c0d51a1b3916817610fc0 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:19:30 +0200 Subject: [PATCH 31/71] update tests --- subworkflows/nf-core/bam_qc_picard/meta.yml | 2 +- tests/subworkflows/nf-core/bam_qc_picard/main.nf | 12 +++++++----- tests/subworkflows/nf-core/bam_qc_picard/test.yml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index 77104e82..c4422150 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -47,7 +47,7 @@ output: - hs_metrics: type: file description: Alignment metrics files generated by picard CollectHsMetrics - pattern: "*_collecthsmetrics.txt" + pattern: "*_metrics.txt" - wgs_metrics: type: file description: Alignment metrics files generated by picard CollectWgsMetrics diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf index 9112416b..03696b44 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -6,18 +6,20 @@ include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/m workflow test_bam_qc_picard_wgs { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - BAM_QC_PICARD ( input, [], [], [] ) + BAM_QC_PICARD ( input, fasta, [], [] ) } workflow test_bam_qc_picard_targetted { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) - target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) - BAM_QC_PICARD ( input, [], bait, target ) + BAM_QC_PICARD ( input, fasta, bait, target ) } diff --git a/tests/subworkflows/nf-core/bam_qc_picard/test.yml b/tests/subworkflows/nf-core/bam_qc_picard/test.yml index af98230d..7b0a6c2b 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/test.yml +++ b/tests/subworkflows/nf-core/bam_qc_picard/test.yml @@ -30,4 +30,4 @@ - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics - - path: ./output/picard/test_collecthsmetrics.txt + - path: ./output/picard/test.CollectHsMetrics.coverage_metrics From b92efb7abfc77cb8d9b4149c5fb866409122ce05 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:21:47 +0200 Subject: [PATCH 32/71] add nextflow.config --- tests/subworkflows/nf-core/bam_qc_picard/nextflow.config | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/subworkflows/nf-core/bam_qc_picard/nextflow.config diff --git a/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} From dee8ec9e911ec848e93c8ed0b9667e7c674e9132 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 12:53:17 +0200 Subject: [PATCH 33/71] fix typos --- subworkflows/nf-core/bam_qc_picard/main.nf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 851268c6..747d5995 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -2,11 +2,9 @@ // Run QC steps on BAM/CRAM files using Picard // -params.options = [:] - -include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' -include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' -include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picard/collectmultiplemetrics/main' +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picard/collectwgsmetrics/main' +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecthsmetrics/main' workflow BAM_QC_PICARD { take: @@ -18,7 +16,7 @@ workflow BAM_QC_PICARD { main: ch_versions = Channel.empty() - PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta] ) + PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { From e0a8af869324765ec0c6a375703bfa68f5ba4e77 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:42:14 +0200 Subject: [PATCH 34/71] fix outputs --- subworkflows/nf-core/bam_qc_picard/main.nf | 14 ++++++++------ subworkflows/nf-core/bam_qc_picard/meta.yml | 8 ++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 747d5995..13f4a845 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -8,7 +8,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecth workflow BAM_QC_PICARD { take: - ch_bam_bai // channel: [ val(meta), [ bam ], [bai/csi] ] + ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] @@ -16,7 +16,7 @@ workflow BAM_QC_PICARD { main: ch_versions = Channel.empty() - PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta ) + PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { @@ -25,16 +25,18 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { - PICARD_COLLECTWGSMETRICS( ch_bam_bai, ch_fasta ) + PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) } + ch_coverage_metrics = Channel.empty() + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first(), PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) + emit: - hs_metrics = PICARD_COLLECTHSMETRICS.out.hs_metrics // channel: [ val(meta), [ hs_metrics ] ] - wgs_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ wgs_metrics ] ] + coverage_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ coverage_metrics ] ] multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] versions = ch_versions // channel: [ versions.yml ] diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index c4422150..67d3496e 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -44,14 +44,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - hs_metrics: + - coverage_metrics: type: file - description: Alignment metrics files generated by picard CollectHsMetrics + description: Alignment metrics files generated by picard CollectHsMetrics or CollectWgsMetrics pattern: "*_metrics.txt" - - wgs_metrics: - type: file - description: Alignment metrics files generated by picard CollectWgsMetrics - pattern: "*_{metrics}" - multiple_metrics: type: file description: Alignment metrics files generated by picard CollectMultipleMetrics From 55dfe1d8ab35873790c13ee4eb75af818fef80b2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:43:59 +0200 Subject: [PATCH 35/71] fix hsmetrics input --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 13f4a845..9e429448 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -25,7 +25,7 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, [], ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) From 8ad861a645e86c411b47472616a924063afba106 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:52:03 +0200 Subject: [PATCH 36/71] add fasta index --- subworkflows/nf-core/bam_qc_picard/main.nf | 12 +++++++----- subworkflows/nf-core/bam_qc_picard/meta.yml | 10 +++++----- tests/subworkflows/nf-core/bam_qc_picard/main.nf | 12 +++++++----- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 9e429448..e6f82feb 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -10,14 +10,17 @@ workflow BAM_QC_PICARD { take: ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] + ch_fasta_faix // channel: [ fasta_fai ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] main: ch_versions = Channel.empty() + ch_coverage_metrics = Channel.empty() PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { log.error("Bait interval channel is empty") @@ -26,18 +29,17 @@ workflow BAM_QC_PICARD { log.error("Target interval channel is empty") } PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, [], ch_bait_interval, ch_target_interval ) + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) } - ch_coverage_metrics = Channel.empty() - ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first(), PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) - emit: - coverage_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ coverage_metrics ] ] + coverage_metrics = ch_coverage_metrics // channel: [ val(meta), [ coverage_metrics ] ] multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] - versions = ch_versions // channel: [ versions.yml ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index 67d3496e..c45215d1 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -22,14 +22,14 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" - - bai: - type: file - description: Index for BAM/CRAM/SAM file - pattern: "*.{bai,crai,sai}" - fasta: type: optional file - description: Reference file the CRAM was created with + description: Reference fasta file pattern: "*.{fasta,fa}" + - fasta_fai: + type: optional file + description: Reference fasta file index + pattern: "*.{fasta,fa}.fai" - bait_intervals: type: optional file description: An interval list file that contains the locations of the baits used. diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf index 03696b44..a3e2ed62 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -9,17 +9,19 @@ workflow test_bam_qc_picard_wgs { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - BAM_QC_PICARD ( input, fasta, [], [] ) + BAM_QC_PICARD ( input, fasta, fasta_fai, [], [] ) } workflow test_bam_qc_picard_targetted { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) - target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) - BAM_QC_PICARD ( input, fasta, bait, target ) + BAM_QC_PICARD ( input, fasta, fasta_fai, bait, target ) } From 2fc857955f42c3aed840f9a61062b481a159ff4a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:53:48 +0200 Subject: [PATCH 37/71] fix index omission --- subworkflows/nf-core/bam_qc_picard/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index e6f82feb..341a4310 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -10,7 +10,7 @@ workflow BAM_QC_PICARD { take: ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] - ch_fasta_faix // channel: [ fasta_fai ] + ch_fasta_fai // channel: [ fasta_fai ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] @@ -28,7 +28,7 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, [], ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { From 4618c542e9d64cd71176cfd24fe0edc908eb3d10 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:59:46 +0200 Subject: [PATCH 38/71] fix metrics output --- subworkflows/nf-core/bam_qc_picard/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 341a4310..b8be04b2 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -29,12 +29,12 @@ workflow BAM_QC_PICARD { log.error("Target interval channel is empty") } PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) - ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first()) + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) + ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics.first()) } emit: From 6ca6de91f8da9b8cc9a34f7ef6469eb0f851604d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 07:47:24 +0200 Subject: [PATCH 39/71] bump picard version across the board --- modules/picard/addorreplacereadgroups/main.nf | 6 +++--- modules/picard/cleansam/main.nf | 6 +++--- modules/picard/collecthsmetrics/main.nf | 6 +++--- modules/picard/collectmultiplemetrics/main.nf | 6 +++--- modules/picard/collectwgsmetrics/main.nf | 6 +++--- modules/picard/createsequencedictionary/main.nf | 6 +++--- modules/picard/crosscheckfingerprints/main.nf | 6 +++--- modules/picard/filtersamreads/main.nf | 6 +++--- modules/picard/fixmateinformation/main.nf | 6 +++--- modules/picard/liftovervcf/main.nf | 6 +++--- modules/picard/markduplicates/main.nf | 6 +++--- modules/picard/mergesamfiles/main.nf | 6 +++--- modules/picard/sortsam/main.nf | 6 +++--- modules/picard/sortvcf/main.nf | 6 +++--- 14 files changed, 42 insertions(+), 42 deletions(-) diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index 8e1d10af..e395f4d7 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -2,10 +2,10 @@ process PICARD_ADDORREPLACEREADGROUPS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/cleansam/main.nf b/modules/picard/cleansam/main.nf index fb435911..4cd4db58 100644 --- a/modules/picard/cleansam/main.nf +++ b/modules/picard/cleansam/main.nf @@ -2,10 +2,10 @@ process PICARD_CLEANSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index ef7a9b9f..26ba8a04 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 340463a8..0c79b7a5 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f4efaa4c..ef53d7bd 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 96069e9f..3a8f1477 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -2,10 +2,10 @@ process PICARD_CREATESEQUENCEDICTIONARY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/picard/crosscheckfingerprints/main.nf b/modules/picard/crosscheckfingerprints/main.nf index b3dface5..d3b59402 100644 --- a/modules/picard/crosscheckfingerprints/main.nf +++ b/modules/picard/crosscheckfingerprints/main.nf @@ -2,10 +2,10 @@ process PICARD_CROSSCHECKFINGERPRINTS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(input1) diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index ab75abfa..adedcdc2 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(readlist) diff --git a/modules/picard/fixmateinformation/main.nf b/modules/picard/fixmateinformation/main.nf index 763f3bb4..1993e4fd 100644 --- a/modules/picard/fixmateinformation/main.nf +++ b/modules/picard/fixmateinformation/main.nf @@ -2,10 +2,10 @@ process PICARD_FIXMATEINFORMATION { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index cdbd637e..7ce694e9 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -2,10 +2,10 @@ process PICARD_LIFTOVERVCF { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(input_vcf) diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index e754a587..b9fec576 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index ef5c3980..7b0185cd 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bams) diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index adec17cb..cee60fd1 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTSAM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/sortvcf/main.nf b/modules/picard/sortvcf/main.nf index 4047545e..5fe0ecfd 100644 --- a/modules/picard/sortvcf/main.nf +++ b/modules/picard/sortvcf/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTVCF { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(vcf) From 00467ac64affbbc17b255762f10a6c8fa362aabc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 07:57:11 +0200 Subject: [PATCH 40/71] update command line syntax for all tools --- modules/picard/addorreplacereadgroups/main.nf | 2 +- modules/picard/collecthsmetrics/main.nf | 8 ++++---- modules/picard/collectmultiplemetrics/main.nf | 6 +++--- modules/picard/collectwgsmetrics/main.nf | 6 +++--- modules/picard/createsequencedictionary/main.nf | 4 ++-- modules/picard/liftovervcf/main.nf | 10 +++++----- modules/picard/markduplicates/main.nf | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index e395f4d7..55200d2e 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -43,7 +43,7 @@ process PICARD_ADDORREPLACEREADGROUPS { -PL ${PLATFORM} \\ -PU ${BARCODE} \\ -SM ${SAMPLE} \\ - -CREATE_INDEX true + --CREATE_INDEX true cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 26ba8a04..317aff4b 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -38,10 +38,10 @@ process PICARD_COLLECTHSMETRICS { CollectHsMetrics \\ $args \\ $reference \\ - -BAIT_INTERVALS $bait_intervals \\ - -TARGET_INTERVALS $target_intervals \\ - -INPUT $bam \\ - -OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics + --BAIT_INTERVALS $bait_intervals \\ + --TARGET_INTERVALS $target_intervals \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 0c79b7a5..a653b549 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -33,9 +33,9 @@ process PICARD_COLLECTMULTIPLEMETRICS { -Xmx${avail_mem}g \\ CollectMultipleMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectMultipleMetrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectMultipleMetrics \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index ef53d7bd..957c8058 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -32,9 +32,9 @@ process PICARD_COLLECTWGSMETRICS { -Xmx${avail_mem}g \\ CollectWgsMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 3a8f1477..3a8bb62a 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - R=$fasta \\ - O=${prefix}.dict + -R $fasta \\ + -O ${prefix}.dict cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index 7ce694e9..ea3f4cb7 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF { -Xmx${avail_mem}g \\ LiftoverVcf \\ $args \\ - I=$input_vcf \\ - O=${prefix}.lifted.vcf.gz \\ - CHAIN=$chain \\ - REJECT=${prefix}.unlifted.vcf.gz \\ - R=$fasta + -I $input_vcf \\ + -O ${prefix}.lifted.vcf.gz \\ + --CHAIN $chain \\ + --REJECT ${prefix}.unlifted.vcf.gz \\ + -R $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index b9fec576..58b6b88a 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $args \\ - I=$bam \\ - O=${prefix}.bam \\ - M=${prefix}.MarkDuplicates.metrics.txt + -I $bam \\ + -O ${prefix}.bam \\ + -M ${prefix}.MarkDuplicates.metrics.txt cat <<-END_VERSIONS > versions.yml "${task.process}": From b72ec05d69140c6a9c6054175d1412b2f116466f Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 08:19:42 +0200 Subject: [PATCH 41/71] drop md5sum from versions.yml --- tests/modules/picard/addorreplacereadgroups/test.yml | 1 - tests/modules/picard/cleansam/test.yml | 1 - tests/modules/picard/createsequencedictionary/test.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/tests/modules/picard/addorreplacereadgroups/test.yml b/tests/modules/picard/addorreplacereadgroups/test.yml index aa1536bb..6ee81737 100644 --- a/tests/modules/picard/addorreplacereadgroups/test.yml +++ b/tests/modules/picard/addorreplacereadgroups/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: 7b82f3461c2d80fc6a10385e78c9427f - path: output/picard/versions.yml - md5sum: 8a2d176295e1343146ea433c79bb517f diff --git a/tests/modules/picard/cleansam/test.yml b/tests/modules/picard/cleansam/test.yml index 3b235d07..08dcd84d 100644 --- a/tests/modules/picard/cleansam/test.yml +++ b/tests/modules/picard/cleansam/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: a48f8e77a1480445efc57570c3a38a68 - path: output/picard/versions.yml - md5sum: e6457d7c6de51bf6f4b577eda65e57ac diff --git a/tests/modules/picard/createsequencedictionary/test.yml b/tests/modules/picard/createsequencedictionary/test.yml index 2a43be41..59f2dd44 100644 --- a/tests/modules/picard/createsequencedictionary/test.yml +++ b/tests/modules/picard/createsequencedictionary/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.dict contains: ["SN:MT192765.1"] - path: output/picard/versions.yml - md5sum: b3d8c7ea65b8a6d3237b153d13fe2014 From ec10f98d558a84da79ba7c90c2d57f6c6f0f7af5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 09:32:32 +0200 Subject: [PATCH 42/71] picard CollectWgsMetrics: update to new cli args (#1578) * update to new cli args * remove bam index from tuple, not needed by program * bump picard version Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/picard/collectwgsmetrics/main.nf | 14 +++++++------- tests/modules/picard/collectwgsmetrics/main.nf | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f4efaa4c..d9c1ec7c 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,13 +2,13 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) + tuple val(meta), path(bam) path fasta output: @@ -32,9 +32,9 @@ process PICARD_COLLECTWGSMETRICS { -Xmx${avail_mem}g \\ CollectWgsMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\ - REFERENCE_SEQUENCE=$fasta + -INPUT $bam \\ + -OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + -REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/picard/collectwgsmetrics/main.nf b/tests/modules/picard/collectwgsmetrics/main.nf index 1d75a2bd..eddf5603 100644 --- a/tests/modules/picard/collectwgsmetrics/main.nf +++ b/tests/modules/picard/collectwgsmetrics/main.nf @@ -6,8 +6,7 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../../modules/picard/collectwgs workflow test_picard_collectwgsmetrics { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) From 1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b Mon Sep 17 00:00:00 2001 From: Lauri Mesilaakso Date: Fri, 29 Apr 2022 09:37:23 +0200 Subject: [PATCH 43/71] Fix typo (#1586) --- modules/minimap2/align/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index 7ba05ee9..08ac6eef 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -27,8 +27,8 @@ process MINIMAP2_ALIGN { def prefix = task.ext.prefix ?: "${meta.id}" def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}" def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" - def cigar_paf = cigar_paf_format && !sam_format ? "-c" : '' - def set_cigar_bam = cigar_bam && sam_format ? "-L" : '' + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' """ minimap2 \\ $args \\ From 0e01d703ea55899bd048689258d22c153d39b981 Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 29 Apr 2022 10:12:52 +0200 Subject: [PATCH 44/71] remove version md5sum from fixmateinformation --- tests/modules/picard/fixmateinformation/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/picard/fixmateinformation/test.yml b/tests/modules/picard/fixmateinformation/test.yml index f12f823b..f2f9c491 100644 --- a/tests/modules/picard/fixmateinformation/test.yml +++ b/tests/modules/picard/fixmateinformation/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: 746102e8c242c0ef42e045c49d320030 - path: output/picard/versions.yml - md5sum: 4329ba7cdca8f4f6018dfd5c019ba2eb From bda132191db9548cd1fc1c594399cba583bcd061 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:13:22 +0200 Subject: [PATCH 45/71] fix args in nextflow.config --- tests/modules/picard/markduplicates/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/picard/markduplicates/nextflow.config b/tests/modules/picard/markduplicates/nextflow.config index 9178c5b1..40d46110 100644 --- a/tests/modules/picard/markduplicates/nextflow.config +++ b/tests/modules/picard/markduplicates/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PICARD_MARKDUPLICATES_UNSORTED { - ext.args = 'ASSUME_SORT_ORDER=queryname' + ext.args = '--ASSUME_SORT_ORDER queryname' } } From b2e4342105d4e6b06edd33ed2613328eb740b4b8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:21:22 +0200 Subject: [PATCH 46/71] fix args in nextflow.config --- tests/modules/picard/liftovervcf/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/picard/liftovervcf/nextflow.config b/tests/modules/picard/liftovervcf/nextflow.config index e1581bb9..f69fc351 100644 --- a/tests/modules/picard/liftovervcf/nextflow.config +++ b/tests/modules/picard/liftovervcf/nextflow.config @@ -1,5 +1,5 @@ process { - ext.args = "WARN_ON_MISSING_CONTIG=true" + ext.args = "--WARN_ON_MISSING_CONTIG true" publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } From 42564565b934eeb2449e35ec97ed13ff2a67f1de Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 29 Apr 2022 10:26:17 +0200 Subject: [PATCH 47/71] Update diamond/blastx diamond/blastp to support all possible output formats --- modules/diamond/blastp/main.nf | 17 ++++++++++++++--- modules/diamond/blastp/meta.yml | 9 +++++++++ modules/diamond/blastx/main.nf | 17 ++++++++++++++--- modules/diamond/blastx/meta.yml | 9 +++++++++ tests/modules/diamond/blastp/main.nf | 13 ++++++++++++- tests/modules/diamond/blastp/test.yml | 21 ++++++++++++++++++--- tests/modules/diamond/blastx/main.nf | 13 ++++++++++++- tests/modules/diamond/blastx/test.yml | 24 ++++++++++++++++++++---- 8 files changed, 108 insertions(+), 15 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 955952dc..d7c53d6f 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -11,10 +11,11 @@ process DIAMOND_BLASTP { input: tuple val(meta), path(fasta) - path db + path db + val outext output: - tuple val(meta), path('*.txt'), emit: txt + tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output path "versions.yml" , emit: versions when: @@ -23,6 +24,15 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + switch ( outext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +41,9 @@ process DIAMOND_BLASTP { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${outext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 8ac1d371..1aa36c23 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -28,6 +28,14 @@ input: type: directory description: Directory containing the protein blast database pattern: "*" + - outext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" output: - txt: @@ -41,3 +49,4 @@ output: authors: - "@spficklin" + - "@jfy133" diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3700bd36..6703c1e4 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -11,10 +11,11 @@ process DIAMOND_BLASTX { input: tuple val(meta), path(fasta) - path db + path db + val outext output: - tuple val(meta), path('*.txt'), emit: txt + tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output path "versions.yml" , emit: versions when: @@ -23,6 +24,15 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + switch ( outext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +41,9 @@ process DIAMOND_BLASTX { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${outext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 7eb3d7b4..5ee2d55e 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -28,6 +28,14 @@ input: type: directory description: Directory containing the nucelotide blast database pattern: "*" + - outext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" output: - txt: @@ -41,3 +49,4 @@ output: authors: - "@spficklin" + - "@jfy133" diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 87d05bf9..5c1459d8 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -9,7 +9,18 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'txt' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) +} + +workflow test_diamond_blastp_daa { + + db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'daa' + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) } diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 32dfacaa..5e31df1f 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -1,8 +1,23 @@ -- name: diamond blastp - command: nextflow run ./tests/modules/diamond/blastp -entry test_diamond_blastp -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastp/nextflow.config +- name: diamond blastp test_diamond_blastp + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config tags: - diamond - diamond/blastp files: - - path: ./output/diamond/test.diamond_blastp.txt + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastp.txt md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 + - path: output/diamond/versions.yml + +- name: diamond blastp test_diamond_blastp_daa + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp_daa -c tests/config/nextflow.config + tags: + - diamond + - diamond/blastp + files: + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastp.daa + md5sum: d4a79ad1fcb2ec69460e5a09a9468db7 + - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 77eb08ea..d6d5a77a 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,18 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'txt' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) +} + +workflow test_diamond_blastx_daa { + + db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'daa' + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) } diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index fe7c6938..6a792f30 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -1,8 +1,24 @@ -- name: diamond blastx - command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastx/nextflow.config +- name: diamond blastx test_diamond_blastx + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx -c tests/config/nextflow.config tags: - diamond - diamond/blastx files: - - path: ./output/diamond/test.diamond_blastx.txt - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastx.txt + - path: output/diamond/versions.yml + md5sum: 747934f57b7c0f8901570500f206eac6 + +- name: diamond blastx test_diamond_blastx_daa + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config + tags: + - diamond + - diamond/blastx + files: + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastx.daa + md5sum: 2a0ce0f7e01dcead828b87d5cbaccf7a + - path: output/diamond/versions.yml + md5sum: 05cbabfd500fc17e26b3d8061c5a78c3 From 7df2fae7469095b2f211f4e183cd5f7de77a2b98 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 29 Apr 2022 10:26:38 +0200 Subject: [PATCH 48/71] Clean up test data --- tests/modules/diamond/blastp/test.yml | 4 ---- tests/modules/diamond/blastx/test.yml | 6 ------ 2 files changed, 10 deletions(-) diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 5e31df1f..cb297743 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -4,8 +4,6 @@ - diamond - diamond/blastp files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastp.txt md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 - path: output/diamond/versions.yml @@ -16,8 +14,6 @@ - diamond - diamond/blastp files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastp.daa md5sum: d4a79ad1fcb2ec69460e5a09a9468db7 - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index 6a792f30..a2d35c80 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -4,11 +4,8 @@ - diamond - diamond/blastx files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastx.txt - path: output/diamond/versions.yml - md5sum: 747934f57b7c0f8901570500f206eac6 - name: diamond blastx test_diamond_blastx_daa command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config @@ -16,9 +13,6 @@ - diamond - diamond/blastx files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastx.daa md5sum: 2a0ce0f7e01dcead828b87d5cbaccf7a - path: output/diamond/versions.yml - md5sum: 05cbabfd500fc17e26b3d8061c5a78c3 From 20ebb89ff97a2665106be9cace5ccb9aa4eed1be Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:52:40 +0200 Subject: [PATCH 49/71] update to long args --- modules/picard/addorreplacereadgroups/main.nf | 10 +++++----- modules/picard/cleansam/main.nf | 4 ++-- modules/picard/createsequencedictionary/main.nf | 4 ++-- modules/picard/fixmateinformation/main.nf | 4 ++-- modules/picard/liftovervcf/main.nf | 6 +++--- modules/picard/markduplicates/main.nf | 6 +++--- modules/picard/mergesamfiles/main.nf | 4 ++-- modules/picard/sortvcf/main.nf | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index 55200d2e..fd102f67 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -38,11 +38,11 @@ process PICARD_ADDORREPLACEREADGROUPS { -Xmx${avail_mem}g \\ --INPUT ${bam} \\ --OUTPUT ${prefix}.bam \\ - -ID ${ID} \\ - -LB ${LIBRARY} \\ - -PL ${PLATFORM} \\ - -PU ${BARCODE} \\ - -SM ${SAMPLE} \\ + --RGID ${ID} \\ + --RGLB ${LIBRARY} \\ + --RGPL ${PLATFORM} \\ + --RGPU ${BARCODE} \\ + --RGSM ${SAMPLE} \\ --CREATE_INDEX true cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/cleansam/main.nf b/modules/picard/cleansam/main.nf index 4cd4db58..62989565 100644 --- a/modules/picard/cleansam/main.nf +++ b/modules/picard/cleansam/main.nf @@ -31,8 +31,8 @@ process PICARD_CLEANSAM { -Xmx${avail_mem}g \\ CleanSam \\ ${args} \\ - -I ${bam} \\ - -O ${prefix}.bam + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 3a8bb62a..735cc97b 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - -R $fasta \\ - -O ${prefix}.dict + --REFERENCE_SEQUENCE $fasta \\ + --OUTPUT ${prefix}.dict cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/fixmateinformation/main.nf b/modules/picard/fixmateinformation/main.nf index 1993e4fd..539b1082 100644 --- a/modules/picard/fixmateinformation/main.nf +++ b/modules/picard/fixmateinformation/main.nf @@ -31,8 +31,8 @@ process PICARD_FIXMATEINFORMATION { picard \\ FixMateInformation \\ -Xmx${avail_mem}g \\ - -I ${bam} \\ - -O ${prefix}.bam \\ + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam \\ --VALIDATION_STRINGENCY ${STRINGENCY} cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index ea3f4cb7..c92abfeb 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF { -Xmx${avail_mem}g \\ LiftoverVcf \\ $args \\ - -I $input_vcf \\ - -O ${prefix}.lifted.vcf.gz \\ + --INPUT $input_vcf \\ + --OUTPUT ${prefix}.lifted.vcf.gz \\ --CHAIN $chain \\ --REJECT ${prefix}.unlifted.vcf.gz \\ - -R $fasta + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index 58b6b88a..1565c647 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $args \\ - -I $bam \\ - -O ${prefix}.bam \\ - -M ${prefix}.MarkDuplicates.metrics.txt + --INPUT $bam \\ + --OUTPUT ${prefix}.bam \\ + --METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index 7b0185cd..1e32c63a 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -33,8 +33,8 @@ process PICARD_MERGESAMFILES { -Xmx${avail_mem}g \\ MergeSamFiles \\ $args \\ - ${'INPUT='+bam_files.join(' INPUT=')} \\ - OUTPUT=${prefix}.bam + ${'--INPUT '+bam_files.join(' --INPUT ')} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) diff --git a/modules/picard/sortvcf/main.nf b/modules/picard/sortvcf/main.nf index 5fe0ecfd..fb8dbb79 100644 --- a/modules/picard/sortvcf/main.nf +++ b/modules/picard/sortvcf/main.nf @@ -22,8 +22,8 @@ process PICARD_SORTVCF { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def seq_dict = sequence_dict ? "-SEQUENCE_DICTIONARY $sequence_dict" : "" - def reference = reference ? "-REFERENCE_SEQUENCE $reference" : "" + def seq_dict = sequence_dict ? "--SEQUENCE_DICTIONARY $sequence_dict" : "" + def reference = reference ? "--REFERENCE_SEQUENCE $reference" : "" def avail_mem = 3 if (!task.memory) { log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' From 771d5a19f1cf72f663df27dd396e863193bc0f04 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 11:12:24 +0200 Subject: [PATCH 50/71] fix reference arg --- modules/picard/createsequencedictionary/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 735cc97b..2348c496 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -31,7 +31,7 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - --REFERENCE_SEQUENCE $fasta \\ + --REFERENCE $fasta \\ --OUTPUT ${prefix}.dict cat <<-END_VERSIONS > versions.yml From 73600b03393ee2ec585bdc6bb5ff2585fc47bdda Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:20:15 +0200 Subject: [PATCH 51/71] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index b8be04b2..c3a441bc 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -22,12 +22,8 @@ workflow BAM_QC_PICARD { ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { - if (ch_bait_interval.isEmpty()) { - log.error("Bait interval channel is empty") - } - if (ch_target_interval.isEmpty()) { - log.error("Target interval channel is empty") - } + if (!ch_bait_interval) log.error("Bait interval channel is empty") + if (!ch_target_interval) log.error("Target interval channel is empty") PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) From 71ccf0e207d2b034c931d2264b33f5f54abe1f59 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:24:19 +0200 Subject: [PATCH 52/71] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index c3a441bc..e3c890d5 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -25,7 +25,7 @@ workflow BAM_QC_PICARD { if (!ch_bait_interval) log.error("Bait interval channel is empty") if (!ch_target_interval) log.error("Target interval channel is empty") PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) - ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics.first()) + ch_coverage_metrics = PICARD_COLLECTHSMETRICS.out.metrics ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) From 20e3767657ba1a4b87a412121321e79ca109b401 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:24:25 +0200 Subject: [PATCH 53/71] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index e3c890d5..5f46e065 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -30,7 +30,7 @@ workflow BAM_QC_PICARD { } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics.first()) + ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) } emit: From 343c0ebe203e53ca9149ec473a8396836039a516 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:26:00 +0200 Subject: [PATCH 54/71] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 5f46e065..76709ea6 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -30,7 +30,7 @@ workflow BAM_QC_PICARD { } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) } emit: From 7e391c3a3bfc84b71e79077ba2569276e6fc5d2a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:26:06 +0200 Subject: [PATCH 55/71] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 76709ea6..e38697c3 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -25,7 +25,7 @@ workflow BAM_QC_PICARD { if (!ch_bait_interval) log.error("Bait interval channel is empty") if (!ch_target_interval) log.error("Target interval channel is empty") PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) - ch_coverage_metrics = PICARD_COLLECTHSMETRICS.out.metrics + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) From 9d0f03d96a6855af87f19f27728757e839e51842 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 15:07:09 +0200 Subject: [PATCH 56/71] Update modules/elprep/merge/main.nf Co-authored-by: James A. Fellows Yates --- modules/elprep/merge/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 28fa9985..d5ffc497 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -29,7 +29,7 @@ process ELPREP_MERGE { mv ${bam} input/ elprep merge \\ - input \\ + input/ \\ output/${prefix}.${suffix} \\ $args \\ ${single_end} \\ From cb29ae2187a2bc624a948eee589ad11d168a069e Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:14:52 -0500 Subject: [PATCH 57/71] chore: Use forms for bug report --- .github/ISSUE_TEMPLATE/bug_report.md | 64 --------------------------- .github/ISSUE_TEMPLATE/bug_report.yml | 50 +++++++++++++++++++++ 2 files changed, 50 insertions(+), 64 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index f1122ea3..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -name: Bug report -about: Report something that is broken or incorrect -title: "[BUG]" ---- - - - -## Check Documentation - -I have checked the following places for your error: - -- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) -- [ ] [nf-core/module documentation](https://github.com/nf-core/modules/blob/master/README.md) - -## Description of the bug - - - -## Steps to reproduce - -Steps to reproduce the behaviour: - -1. Command line: -2. See error: - -## Expected behaviour - - - -## Log files - -Have you provided the following extra information/files: - -- [ ] The command used to run the module -- [ ] The `.nextflow.log` file - -## System - -- Hardware: -- Executor: -- OS: -- Version - -## Nextflow Installation - -- Version: - -## Container engine - -- Engine: -- version: -- Image tag: - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..d9720fb7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug report +description: Report something that is broken or incorrect +labels: bug +body: + - type: markdown + attributes: + value: | + Before you post this issue, please check the documentation: + + - [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) + - [nf-core/rnaseq pipeline documentation](https://nf-co.re/rnaseq/usage) + + - type: textarea + id: description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: command_used + attributes: + label: Command used and terminal output + description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal. + render: console + placeholder: | + $ nextflow run ... + + Some output where something broke + + - type: textarea + id: files + attributes: + label: Relevant files + description: | + Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed. + Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files. + + - type: textarea + id: system + attributes: + label: System information + description: | + * Nextflow version _(eg. 21.10.3)_ + * Hardware _(eg. HPC, Desktop, Cloud)_ + * Executor _(eg. slurm, local, awsbatch)_ + * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * OS _(eg. CentOS Linux, macOS, Linux Mint)_ + * Version of nf-core/rnaseq _(eg. 1.1, 1.5, 1.8.2)_ From 2da712f6f3d8f9b246e5fdcb1d786d5fbd6ef7d1 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:29:29 -0500 Subject: [PATCH 58/71] chore: Use forms for new modules --- .github/ISSUE_TEMPLATE/new_module.md | 26 ------------------- .github/ISSUE_TEMPLATE/new_module.yml | 36 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/new_module.md create mode 100644 .github/ISSUE_TEMPLATE/new_module.yml diff --git a/.github/ISSUE_TEMPLATE/new_module.md b/.github/ISSUE_TEMPLATE/new_module.md deleted file mode 100644 index 5c7e61cc..00000000 --- a/.github/ISSUE_TEMPLATE/new_module.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: New module -about: Suggest a new module for nf-core/modules -title: "new module: TOOL/SUBTOOL" -label: new module ---- - - - -I think it would be good to have a module for [TOOL](https://bioconda.github.io/recipes/TOOL/README.html) - -- [ ] This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command -- [ ] There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module -- [ ] There is no [open issue](https://github.com/nf-core/modules/issues) for this module -- [ ] If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module diff --git a/.github/ISSUE_TEMPLATE/new_module.yml b/.github/ISSUE_TEMPLATE/new_module.yml new file mode 100644 index 00000000..2d3e9d47 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_module.yml @@ -0,0 +1,36 @@ +name: New module +description: Suggest a new module for nf-core/modules +title: "new module: TOOL/SUBTOOL" +labels: new module +body: + - type: checkboxes + attributes: + label: Is there an existing module for this? + description: This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command + options: + - label: I have searched for the existing module + required: true + + - type: checkboxes + attributes: + label: Is there an open PR for this? + description: There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module + options: + - label: I have searched for existing PRs + required: true + + - type: checkboxes + attributes: + label: Is there an open issue for this? + description: There is no [open issue](https://github.com/nf-core/modules/issues) for this module + options: + - label: I have searched for existing issues + required: true + + - type: checkboxes + attributes: + label: Are you going to work on this? + description: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + options: + - label: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + required: false From 816803dbe98bc5395e87ab51862b57d5b84b2824 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:36:49 -0500 Subject: [PATCH 59/71] chore: Add checkboxes for bug report --- .github/ISSUE_TEMPLATE/bug_report.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d9720fb7..22dc47d4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -2,13 +2,15 @@ name: Bug report description: Report something that is broken or incorrect labels: bug body: - - type: markdown + - type: checkboxes attributes: - value: | - Before you post this issue, please check the documentation: - - - [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) - - [nf-core/rnaseq pipeline documentation](https://nf-co.re/rnaseq/usage) + label: Have you checked the docs? + description: I have checked the following places for my error + options: + - label: "[nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)" + required: true + - label: "[nf-core modules documentation](https://nf-co.re/docs/contributing/modules)" + required: true - type: textarea id: description From ef0483586a1a2fdeff3f90584b558f14302a2973 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:46:36 -0500 Subject: [PATCH 60/71] chore: Use forms for feature request --- .github/ISSUE_TEMPLATE/feature_request.md | 32 ---------------------- .github/ISSUE_TEMPLATE/feature_request.yml | 32 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 72d6c058..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for nf-core/modules -title: "[FEATURE]" ---- - - - -## Is your feature request related to a problem? Please describe - - - - - -## Describe the solution you'd like - - - -## Describe alternatives you've considered - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..316fba90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: Feature request +description: Suggest an idea for nf-core/modules +labels: feature +title: "[FEATURE]" +body: + - type: textarea + id: description + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the bug is. + placeholder: | + + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: A clear and concise description of the solution you want to happen. + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add any other context about the feature request here. From 8bee7d47489ae3a6652e7925a841f32b39f15609 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 29 Apr 2022 09:28:08 -0500 Subject: [PATCH 61/71] chore: Add image tag to bug report Co-authored-by: FriederikeHanssen --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 22dc47d4..349dd44d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -49,4 +49,4 @@ body: * Executor _(eg. slurm, local, awsbatch)_ * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ * OS _(eg. CentOS Linux, macOS, Linux Mint)_ - * Version of nf-core/rnaseq _(eg. 1.1, 1.5, 1.8.2)_ + * Image tag: From fb02d6e85f95e5564ca446fe448e94db5a78d470 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 29 Apr 2022 09:30:03 -0500 Subject: [PATCH 62/71] chore: add OS version to bug report Co-authored-by: FriederikeHanssen --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 349dd44d..71afc6b0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -48,5 +48,5 @@ body: * Hardware _(eg. HPC, Desktop, Cloud)_ * Executor _(eg. slurm, local, awsbatch)_ * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ - * OS _(eg. CentOS Linux, macOS, Linux Mint)_ + * OS and version: _(eg. CentOS Linux, macOS, Ubuntu 22.04)_ * Image tag: From a8a4d76a65af792ca5ab254e9eb0cb521a70047b Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 29 Apr 2022 09:30:45 -0500 Subject: [PATCH 63/71] chore: Add container version Co-authored-by: FriederikeHanssen --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 71afc6b0..74907cfe 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -47,6 +47,6 @@ body: * Nextflow version _(eg. 21.10.3)_ * Hardware _(eg. HPC, Desktop, Cloud)_ * Executor _(eg. slurm, local, awsbatch)_ - * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * Container engine and version: _(e.g. Docker 1.0.0, Singularity, Conda, Podman, Shifter or Charliecloud)_ * OS and version: _(eg. CentOS Linux, macOS, Ubuntu 22.04)_ * Image tag: From 39530b5ca710e028fdec94a704e5eed3f78c5800 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 29 Apr 2022 21:05:12 +0200 Subject: [PATCH 64/71] Bump DIAMOND version to 2.0.15 --- modules/diamond/blastp/main.nf | 8 +++----- modules/diamond/blastx/main.nf | 8 +++----- modules/diamond/makedb/main.nf | 8 +++----- tests/config/test_data.config | 1 + tests/modules/diamond/blastp/main.nf | 8 ++++---- tests/modules/diamond/blastp/test.yml | 8 ++++---- tests/modules/diamond/blastx/main.nf | 4 ++-- tests/modules/diamond/blastx/test.yml | 3 ++- tests/modules/diamond/makedb/main.nf | 2 +- tests/modules/diamond/makedb/test.yml | 9 +++++---- 10 files changed, 28 insertions(+), 31 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index d7c53d6f..ccd455f4 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -2,12 +2,10 @@ process DIAMOND_BLASTP { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 6703c1e4..357427eb 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -2,12 +2,10 @@ process DIAMOND_BLASTX { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/diamond/makedb/main.nf b/modules/diamond/makedb/main.nf index e3d62f00..a76a94e5 100644 --- a/modules/diamond/makedb/main.nf +++ b/modules/diamond/makedb/main.nf @@ -2,12 +2,10 @@ process DIAMOND_MAKEDB { tag "$fasta" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? 'bioconda::diamond=2.0.9' : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: path fasta diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 5d5535c4..62e38c4d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -14,6 +14,7 @@ params { genome_paf = "${test_data_dir}/genomics/sarscov2/genome/genome.paf" genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes" transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta" + proteome_fasta = "${test_data_dir}/genomics/sarscov2/genome/proteome.fasta" transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf" test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed" diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 5c1459d8..80ea2ec5 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -7,8 +7,8 @@ include { DIAMOND_BLASTP } from '../../../../modules/diamond/blastp/main.nf' workflow test_diamond_blastp { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'txt' DIAMOND_MAKEDB ( db ) @@ -17,8 +17,8 @@ workflow test_diamond_blastp { workflow test_diamond_blastp_daa { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'daa' DIAMOND_MAKEDB ( db ) diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index cb297743..c2b8b6f5 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -1,19 +1,19 @@ - name: diamond blastp test_diamond_blastp command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config tags: - - diamond - diamond/blastp + - diamond files: - path: output/diamond/test.diamond_blastp.txt - md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 + md5sum: 2515cf88590afa32356497e79a51fce9 - path: output/diamond/versions.yml - name: diamond blastp test_diamond_blastp_daa command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp_daa -c tests/config/nextflow.config tags: - - diamond - diamond/blastp + - diamond files: - path: output/diamond/test.diamond_blastp.daa - md5sum: d4a79ad1fcb2ec69460e5a09a9468db7 + md5sum: 0b539c68a5b66dd6e20ad5d218f4f4c6 - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index d6d5a77a..d5949762 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -7,7 +7,7 @@ include { DIAMOND_BLASTX } from '../../../../modules/diamond/blastx/main.nf' workflow test_diamond_blastx { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'txt' @@ -17,7 +17,7 @@ workflow test_diamond_blastx { workflow test_diamond_blastx_daa { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'daa' diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index a2d35c80..9c30ba25 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -5,6 +5,7 @@ - diamond/blastx files: - path: output/diamond/test.diamond_blastx.txt + md5sum: eb2aebfa1cb42fcb2121c65528663307 - path: output/diamond/versions.yml - name: diamond blastx test_diamond_blastx_daa @@ -14,5 +15,5 @@ - diamond/blastx files: - path: output/diamond/test.diamond_blastx.daa - md5sum: 2a0ce0f7e01dcead828b87d5cbaccf7a + md5sum: 0df4a833408416f32981415873facc11 - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/makedb/main.nf b/tests/modules/diamond/makedb/main.nf index 70982ae9..d309de6d 100644 --- a/tests/modules/diamond/makedb/main.nf +++ b/tests/modules/diamond/makedb/main.nf @@ -6,7 +6,7 @@ include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' workflow test_diamond_makedb { - input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] DIAMOND_MAKEDB ( input ) } diff --git a/tests/modules/diamond/makedb/test.yml b/tests/modules/diamond/makedb/test.yml index c8f2d79e..cdddf735 100644 --- a/tests/modules/diamond/makedb/test.yml +++ b/tests/modules/diamond/makedb/test.yml @@ -1,8 +1,9 @@ - name: diamond makedb test_diamond_makedb - command: nextflow run ./tests/modules/diamond/makedb -entry test_diamond_makedb -c ./tests/config/nextflow.config -c ./tests/modules/diamond/makedb/nextflow.config + command: nextflow run tests/modules/diamond/makedb -entry test_diamond_makedb -c tests/config/nextflow.config tags: - - diamond - diamond/makedb + - diamond files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/proteome.fasta.dmnd + md5sum: fc28c50b202dd7a7c5451cddff2ba1f4 + - path: output/diamond/versions.yml From 996385fb0f2018d4bb79bc82aea329a58a1e6fe3 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 09:36:34 +0200 Subject: [PATCH 65/71] Remove MD5sumfor DIAMOND DAA file due to occasioanlly variability --- tests/modules/diamond/blastp/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index c2b8b6f5..4fad0cbf 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -15,5 +15,4 @@ - diamond files: - path: output/diamond/test.diamond_blastp.daa - md5sum: 0b539c68a5b66dd6e20ad5d218f4f4c6 - path: output/diamond/versions.yml From 0511e7fbbfa4ba41940d33b687b1cc90227b4eb8 Mon Sep 17 00:00:00 2001 From: Praveen Date: Mon, 2 May 2022 11:35:15 +0200 Subject: [PATCH 66/71] Changed BAI as optional output to handle large genome --- modules/gatk4/markduplicates/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index e8a98156..2650925b 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -12,7 +12,7 @@ process GATK4_MARKDUPLICATES { output: tuple val(meta), path("*.bam") , emit: bam - tuple val(meta), path("*.bai") , emit: bai + tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.metrics"), emit: metrics path "versions.yml" , emit: versions From 6986975bc0425e0b0e6c93dce648167f91f7ebc9 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 11:39:07 +0200 Subject: [PATCH 67/71] Fix output channels allow BLAST table customisation --- modules/diamond/blastp/main.nf | 14 +++++++++--- modules/diamond/blastp/meta.yml | 34 ++++++++++++++++++++++++++-- modules/diamond/blastx/main.nf | 14 +++++++++--- modules/diamond/blastx/meta.yml | 28 +++++++++++++++++++++-- tests/modules/diamond/blastp/main.nf | 6 +++-- tests/modules/diamond/blastx/main.nf | 6 +++-- 6 files changed, 88 insertions(+), 14 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index ccd455f4..6b750145 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -11,10 +11,17 @@ process DIAMOND_BLASTP { tuple val(meta), path(fasta) path db val outext + val blast_columns output: - tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output - path "versions.yml" , emit: versions + tuple val(meta), path('*.{blast}'), optional: true, emit: blast + tuple val(meta), path('*.{xml}') , optional: true, emit: xml + tuple val(meta), path('*.{txt}') , optional: true, emit: txt + tuple val(meta), path('*.{daa}') , optional: true, emit: daa + tuple val(meta), path('*.{sam}') , optional: true, emit: sam + tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv + tuple val(meta), path('*.{paf}') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,6 +29,7 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' switch ( outext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break @@ -39,7 +47,7 @@ process DIAMOND_BLASTP { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ - --outfmt ${outfmt} \\ + --outfmt ${outfmt} ${columns} \\ $args \\ --out ${prefix}.${outext} diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 1aa36c23..0bc12889 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -36,12 +36,42 @@ input: `txt` corresponds to to BLAST tabular format. `tsv` corresponds to taxonomic classification format. pattern: "blast|xml|txt|daa|sam|tsv|paf" + - blast_columns: + type: string + description: | + Optional space separated list of DIAMOND tabular BLAST output keywords + used for in conjunction with the 'txt' outext option (--outfmt 6). See + DIAMOND documnetation for more information. output: - - txt: + - blast: type: file description: File containing blastp hits - pattern: "*.{blastp.txt}" + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" + - txt: + type: file + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: type: file description: File containing software versions diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 357427eb..bb630e32 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -11,10 +11,17 @@ process DIAMOND_BLASTX { tuple val(meta), path(fasta) path db val outext + val blast_columns output: - tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output - path "versions.yml" , emit: versions + tuple val(meta), path('*.{blast}'), optional: true, emit: blast + tuple val(meta), path('*.{xml}') , optional: true, emit: xml + tuple val(meta), path('*.{txt}') , optional: true, emit: txt + tuple val(meta), path('*.{daa}') , optional: true, emit: daa + tuple val(meta), path('*.{sam}') , optional: true, emit: sam + tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv + tuple val(meta), path('*.{paf}') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,6 +29,7 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' switch ( outext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break @@ -39,7 +47,7 @@ process DIAMOND_BLASTX { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ - --outfmt ${outfmt} \\ + --outfmt ${outfmt} ${columns} \\ $args \\ --out ${prefix}.${outext} diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 5ee2d55e..64645d34 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -38,10 +38,34 @@ input: pattern: "blast|xml|txt|daa|sam|tsv|paf" output: + - blast: + type: file + description: File containing blastp hits + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" - txt: type: file - description: File containing blastx hits - pattern: "*.{blastx.txt}" + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: type: file description: File containing software versions diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 80ea2ec5..e90599f0 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -10,9 +10,10 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'txt' + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } workflow test_diamond_blastp_daa { @@ -20,7 +21,8 @@ workflow test_diamond_blastp_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'daa' + blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index d5949762..8f244528 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -10,9 +10,10 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'txt' + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } workflow test_diamond_blastx_daa { @@ -20,7 +21,8 @@ workflow test_diamond_blastx_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'daa' + blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } From 58e5c6aecefbff55b8f29bb542b908da0bd293f7 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 11:55:43 +0200 Subject: [PATCH 68/71] Make variables consistent --- modules/diamond/blastp/main.nf | 6 +++--- modules/diamond/blastp/meta.yml | 4 ++-- modules/diamond/blastx/main.nf | 6 +++--- modules/diamond/blastx/meta.yml | 2 +- tests/modules/diamond/blastp/main.nf | 8 ++++---- tests/modules/diamond/blastx/main.nf | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 6b750145..0d78e230 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -10,7 +10,7 @@ process DIAMOND_BLASTP { input: tuple val(meta), path(fasta) path db - val outext + val out_ext val blast_columns output: @@ -30,7 +30,7 @@ process DIAMOND_BLASTP { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def columns = blast_columns ? "${blast_columns}" : '' - switch ( outext ) { + switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break case "txt": outfmt = 6; break @@ -49,7 +49,7 @@ process DIAMOND_BLASTP { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${outext} + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 0bc12889..3aa81e53 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -28,7 +28,7 @@ input: type: directory description: Directory containing the protein blast database pattern: "*" - - outext: + - out_ext: type: string description: | Specify the type of output file to be generated. `blast` corresponds to @@ -40,7 +40,7 @@ input: type: string description: | Optional space separated list of DIAMOND tabular BLAST output keywords - used for in conjunction with the 'txt' outext option (--outfmt 6). See + used for in conjunction with the 'txt' out_ext option (--outfmt 6). See DIAMOND documnetation for more information. output: diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index bb630e32..ef641435 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -10,7 +10,7 @@ process DIAMOND_BLASTX { input: tuple val(meta), path(fasta) path db - val outext + val out_ext val blast_columns output: @@ -30,7 +30,7 @@ process DIAMOND_BLASTX { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def columns = blast_columns ? "${blast_columns}" : '' - switch ( outext ) { + switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break case "txt": outfmt = 6; break @@ -49,7 +49,7 @@ process DIAMOND_BLASTX { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${outext} + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 64645d34..2dcd7bc6 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -28,7 +28,7 @@ input: type: directory description: Directory containing the nucelotide blast database pattern: "*" - - outext: + - out_ext: type: string description: | Specify the type of output file to be generated. `blast` corresponds to diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index e90599f0..ff669233 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -9,20 +9,20 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] - outext = 'txt' + out_ext = 'txt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } workflow test_diamond_blastp_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] - outext = 'daa' + out_ext = 'daa' blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 8f244528..bb1b55a8 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,20 +9,20 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - outext = 'txt' + out_ext = 'txt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } workflow test_diamond_blastx_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - outext = 'daa' + out_ext = 'daa' blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } From 67b074382e418de8b86409af7d4b7663f6912a02 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 12:29:00 +0200 Subject: [PATCH 69/71] Fix tests --- modules/diamond/blastp/main.nf | 14 +++++++------- modules/diamond/blastx/main.nf | 14 +++++++------- tests/modules/diamond/blastp/test.yml | 1 - tests/modules/diamond/blastx/test.yml | 1 - 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 0d78e230..fc77ee7b 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -14,13 +14,13 @@ process DIAMOND_BLASTP { val blast_columns output: - tuple val(meta), path('*.{blast}'), optional: true, emit: blast - tuple val(meta), path('*.{xml}') , optional: true, emit: xml - tuple val(meta), path('*.{txt}') , optional: true, emit: txt - tuple val(meta), path('*.{daa}') , optional: true, emit: daa - tuple val(meta), path('*.{sam}') , optional: true, emit: sam - tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv - tuple val(meta), path('*.{paf}') , optional: true, emit: paf + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf path "versions.yml" , emit: versions when: diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index ef641435..3479eedb 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -14,13 +14,13 @@ process DIAMOND_BLASTX { val blast_columns output: - tuple val(meta), path('*.{blast}'), optional: true, emit: blast - tuple val(meta), path('*.{xml}') , optional: true, emit: xml - tuple val(meta), path('*.{txt}') , optional: true, emit: txt - tuple val(meta), path('*.{daa}') , optional: true, emit: daa - tuple val(meta), path('*.{sam}') , optional: true, emit: sam - tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv - tuple val(meta), path('*.{paf}') , optional: true, emit: paf + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf path "versions.yml" , emit: versions when: diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 4fad0cbf..aff4e1c5 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -5,7 +5,6 @@ - diamond files: - path: output/diamond/test.diamond_blastp.txt - md5sum: 2515cf88590afa32356497e79a51fce9 - path: output/diamond/versions.yml - name: diamond blastp test_diamond_blastp_daa diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index 9c30ba25..b2b6149f 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -5,7 +5,6 @@ - diamond/blastx files: - path: output/diamond/test.diamond_blastx.txt - md5sum: eb2aebfa1cb42fcb2121c65528663307 - path: output/diamond/versions.yml - name: diamond blastx test_diamond_blastx_daa From bd3bfe0817246082525ab93707976676b1fe208b Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 12:41:24 +0200 Subject: [PATCH 70/71] Add warn of default being used --- modules/diamond/blastp/main.nf | 5 +++++ modules/diamond/blastx/main.nf | 5 +++++ tests/modules/diamond/blastx/main.nf | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index fc77ee7b..033186ea 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -38,6 +38,11 @@ process DIAMOND_BLASTP { case "sam": outfmt = 101; break case "tsv": outfmt = 102; break case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3479eedb..d3272279 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -38,6 +38,11 @@ process DIAMOND_BLASTX { case "sam": outfmt = 101; break case "tsv": outfmt = 102; break case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index bb1b55a8..847a64b1 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,7 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - out_ext = 'txt' + out_ext = 'tfdfdt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) From f1c2f624ebf8fb4368b6d5f26ea5b3cfafadf25c Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 2 May 2022 13:17:22 +0200 Subject: [PATCH 71/71] Update tests/modules/diamond/blastx/main.nf Co-authored-by: Mahesh Binzer-Panchal --- tests/modules/diamond/blastx/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 847a64b1..8316aa91 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,7 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - out_ext = 'tfdfdt' + out_ext = 'tfdfdt' // Nonsense file extension to check default case. blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db )