From df512a62bba0e57de6d4763bb484cce446f2fbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 15:43:14 +0100 Subject: [PATCH 01/47] add parabricks --- .../nf-core/fastq_align_parabricks/main.nf | 47 +++++++++++++ .../nf-core/fastq_align_parabricks/meta.yml | 51 ++++++++++++++ .../fastq_align_parabricks/tests/main.nf.test | 69 +++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 subworkflows/nf-core/fastq_align_parabricks/main.nf create mode 100644 subworkflows/nf-core/fastq_align_parabricks/meta.yml create mode 100644 subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf new file mode 100644 index 00000000000..e2503bcf328 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -0,0 +1,47 @@ +// +// Alignment and BQSR with Nvidia CLARA Parabricks +// + +include { PARABRICKS_FQ2BAM } from '../../../modules/nf-core/parabricks/fq2bam/main' +include { PARABRICKS_APPLYBQSR } from '../../../modules/nf-core/parabricks/applybqsr/main' + +workflow FASTQ_ALIGN_PARABRICKS { + + take: + ch_reads // channel: [mandatory] meta, reads + ch_interval_file // channel: [optional for parabricks] intervals_bed_combined + // val_sort // boolean: [mandatory] true -> sort, false -> don't sort + ch_fasta + ch_fasta_fai + ch_known_sites // channel [optional for parabricks] known_sites_indels + + main: + ch_reports = Channel.empty() + ch_versions = Channel.empty() + ch_bam = Channel.empty() + ch_bai = Channel.empty() + ch_bqsr_table = Channel.empty() + ch_qc_metrics = Channel.empty() + ch_duplicate_metrics = Channel.empty() + + PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, ch_reads, ch_interval_file ]}, ch_fasta, ch_fasta_fai, ch_known_sites) + + // Collecting FQ2BAM outputs + ch_bam = bam.mix(PARABRICKS_FQ2BAM.out.bam) + ch_bai = bai.mix(PARABRICKS_FQ2BAM.out.bai) + ch_bqsr_table = ch_bqsr_table(PARABRICKS_FQ2BAM.out.bqsr_table) + ch_qc_metrics = ch_qc_metrics(PARABRICKS_FQ2BAM.out.qc_metrics) + ch_duplicate_metrics = ch_duplicate_metrics(PARABRICKS_FQ2BAM.out.duplicate_metrics) + + // Apply BQSR + PARABRICKS_APPLYBQSR(ch_bam.map{meta, bam -> [ch_bam, ch_bai, ch_bqsr_table, ch_interval_file] }) + + ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) + ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) + + emit: + bam = PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] + bai = PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] + versions = ch_versions // channel: [ versions.yml ] + +} diff --git a/subworkflows/nf-core/fastq_align_parabricks/meta.yml b/subworkflows/nf-core/fastq_align_parabricks/meta.yml new file mode 100644 index 00000000000..902eb90dc48 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_parabricks/meta.yml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "fastq_align_parabricks" +## TODO nf-core: Add a description of the subworkflow and list keywords +description: Sort SAM/BAM/CRAM file +keywords: + - sort + - bam + - sam + - cram +## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow +components: + - parabricks/fq2bam + - parabricks/applybqsr +## TODO nf-core: List all of the channels used as input with a description and their structure +input: + - ch_bam: + type: file + description: | + The input channel containing the BAM/CRAM/SAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.{bam/cram/sam}" +## TODO nf-core: List all of the channels used as output with a descriptions and their structure +output: + - bam: + type: file + description: | + Channel containing BAM files + Structure: [ val(meta), path(bam) ] + pattern: "*.bam" + - bai: + type: file + description: | + Channel containing indexed BAM (BAI) files + Structure: [ val(meta), path(bai) ] + pattern: "*.bai" + - csi: + type: file + description: | + Channel containing CSI files + Structure: [ val(meta), path(csi) ] + pattern: "*.csi" + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@famosab" +maintainers: + - "@famosab" diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test new file mode 100644 index 00000000000..bf9ac02b84a --- /dev/null +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -0,0 +1,69 @@ +nextflow_workflow { + + name "Test Subworkflow FASTQ_ALIGN_PARABRICKS" + script "../main.nf" + config "./nextflow.config" + workflow "FASTQ_ALIGN_PARABRICKS" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fastq_align_parabricks" + tag "parabricks" + tag "parabricks/fq2bam" + tag "parabricks/applybqsr" + + test("fastq_align_parabricks_single_end") { + + when { + workflow { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ]]) + input[1] = [] // interval file + input[2] = Channel.value([ + [id: 'reference'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[3] = Channel.value([ + [id: 'reference_index'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + input[4] = Channel.value([ + [id: 'known_sites'], + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + ) + } + } + + // test("fastq_align_parabricks_paired_end") { + + // when { + // workflow { + // """ + // input[0] = Channel.of([[ id:'test', single_end:false ], [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + // ] ) + // input[1] = BWA_INDEX.out.index + // input[2] = false + // input[3] = Channel.value([[id: 'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + // """ + // } + // } + + // then { + // assertAll( + // { assert workflow.success}, + // { assert snapshot(workflow.out).match()} + // ) + // } + // } +} \ No newline at end of file From 296188a4e5a1c3d715cff00ae37784b252f86f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 15:58:54 +0100 Subject: [PATCH 02/47] remove config tag --- subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index bf9ac02b84a..cb3f42072f5 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -2,7 +2,6 @@ nextflow_workflow { name "Test Subworkflow FASTQ_ALIGN_PARABRICKS" script "../main.nf" - config "./nextflow.config" workflow "FASTQ_ALIGN_PARABRICKS" tag "subworkflows" From 661bdd4c3918c93532e7bdf26be77fb3f2b6a1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 16:01:46 +0100 Subject: [PATCH 03/47] fix typo --- subworkflows/nf-core/fastq_align_parabricks/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index e2503bcf328..700f404dc97 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -27,8 +27,8 @@ workflow FASTQ_ALIGN_PARABRICKS { PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, ch_reads, ch_interval_file ]}, ch_fasta, ch_fasta_fai, ch_known_sites) // Collecting FQ2BAM outputs - ch_bam = bam.mix(PARABRICKS_FQ2BAM.out.bam) - ch_bai = bai.mix(PARABRICKS_FQ2BAM.out.bai) + ch_bam = ch_bam.mix(PARABRICKS_FQ2BAM.out.bam) + ch_bai = ch_bai.mix(PARABRICKS_FQ2BAM.out.bai) ch_bqsr_table = ch_bqsr_table(PARABRICKS_FQ2BAM.out.bqsr_table) ch_qc_metrics = ch_qc_metrics(PARABRICKS_FQ2BAM.out.qc_metrics) ch_duplicate_metrics = ch_duplicate_metrics(PARABRICKS_FQ2BAM.out.duplicate_metrics) From b7abc0ae930a2858d10827c1b0fe8368a48a812e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 16:04:21 +0100 Subject: [PATCH 04/47] fix typo --- subworkflows/nf-core/fastq_align_parabricks/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 700f404dc97..c159219e33a 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -29,9 +29,9 @@ workflow FASTQ_ALIGN_PARABRICKS { // Collecting FQ2BAM outputs ch_bam = ch_bam.mix(PARABRICKS_FQ2BAM.out.bam) ch_bai = ch_bai.mix(PARABRICKS_FQ2BAM.out.bai) - ch_bqsr_table = ch_bqsr_table(PARABRICKS_FQ2BAM.out.bqsr_table) - ch_qc_metrics = ch_qc_metrics(PARABRICKS_FQ2BAM.out.qc_metrics) - ch_duplicate_metrics = ch_duplicate_metrics(PARABRICKS_FQ2BAM.out.duplicate_metrics) + ch_bqsr_table = ch_bqsr_table.mix(PARABRICKS_FQ2BAM.out.bqsr_table) + ch_qc_metrics = ch_qc_metrics.mix(PARABRICKS_FQ2BAM.out.qc_metrics) + ch_duplicate_metrics = ch_duplicate_metrics.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) // Apply BQSR PARABRICKS_APPLYBQSR(ch_bam.map{meta, bam -> [ch_bam, ch_bai, ch_bqsr_table, ch_interval_file] }) From 83bd44323421060e724b05f25a6cd628f7025748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 16:08:19 +0100 Subject: [PATCH 05/47] fix typo --- .../nf-core/fastq_align_parabricks/main.nf | 2 +- .../tests/main.nf.test.snap | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index c159219e33a..dd42d09faf8 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -34,7 +34,7 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_duplicate_metrics = ch_duplicate_metrics.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) // Apply BQSR - PARABRICKS_APPLYBQSR(ch_bam.map{meta, bam -> [ch_bam, ch_bai, ch_bqsr_table, ch_interval_file] }) + PARABRICKS_APPLYBQSR(ch_bam.map{meta, bam -> [ch_bam, ch_bai, ch_bqsr_table, ch_interval_file]}, ch_fasta) ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap new file mode 100644 index 00000000000..e4a38c75167 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap @@ -0,0 +1,31 @@ +{ + "fastq_align_parabricks_single_end": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "bai": [ + + ], + "bam": [ + + ], + "versions": [ + + ] + } + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-28T16:07:36.691396" + } +} \ No newline at end of file From dc00c7be3e26b24585c7ab734d69d57f188306fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 16:14:56 +0100 Subject: [PATCH 06/47] update paths --- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index cb3f42072f5..fe1da2e7111 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -18,7 +18,8 @@ nextflow_workflow { """ input[0] = Channel.of([ [ id:'test', single_end:true ], - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ]]) + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) input[1] = [] // interval file input[2] = Channel.value([ [id: 'reference'], @@ -30,7 +31,7 @@ nextflow_workflow { ]) input[4] = Channel.value([ [id: 'known_sites'], - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) ]) """ } From ec71494295b13afe1e5e6fa56557faee9c2a100e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 16:15:20 +0100 Subject: [PATCH 07/47] update paths --- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index fe1da2e7111..ea85cc86708 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -29,10 +29,7 @@ nextflow_workflow { [id: 'reference_index'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) ]) - input[4] = Channel.value([ - [id: 'known_sites'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) - ]) + input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } } From 202d30561d680150e5d3ead0eb705f5a0e3ca050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 28 Oct 2024 16:56:31 +0100 Subject: [PATCH 08/47] remove ch --- subworkflows/nf-core/fastq_align_parabricks/main.nf | 2 +- subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index dd42d09faf8..63d6637f35c 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -24,7 +24,7 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_qc_metrics = Channel.empty() ch_duplicate_metrics = Channel.empty() - PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, ch_reads, ch_interval_file ]}, ch_fasta, ch_fasta_fai, ch_known_sites) + PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, reads, ch_interval_file ]}, ch_fasta, ch_fasta_fai, ch_known_sites) // Collecting FQ2BAM outputs ch_bam = ch_bam.mix(PARABRICKS_FQ2BAM.out.bam) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index ea85cc86708..301f09e3370 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -20,7 +20,7 @@ nextflow_workflow { [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] ]) - input[1] = [] // interval file + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) input[2] = Channel.value([ [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) From 68d2e4662ab312225880deb4561388959be30dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 10:45:30 +0100 Subject: [PATCH 09/47] change gpu access --- modules/nf-core/parabricks/fq2bam/main.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index dac03b34c87..02caa21108c 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -32,6 +32,7 @@ process PARABRICKS_FQ2BAM { def known_sites_command = known_sites ? known_sites.collect{"--knownSites $it"}.join(' ') : "" def known_sites_output = known_sites ? "--out-recal-file ${prefix}.table" : "" def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" + def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` @@ -46,7 +47,7 @@ process PARABRICKS_FQ2BAM { $known_sites_command \\ $known_sites_output \\ $interval_file_command \\ - --num-gpus $task.accelerator.request \\ + $num_gpus \\ $args cat <<-END_VERSIONS > versions.yml From b3e43e887d2c8e3cc2b66d63e0222e3a31c647f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 12:10:48 +0100 Subject: [PATCH 10/47] change fasta --- modules/nf-core/parabricks/fq2bam/main.nf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 02caa21108c..dc24d413c7d 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -36,11 +36,10 @@ process PARABRICKS_FQ2BAM { """ INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` - mv $fasta \$INDEX pbrun \\ fq2bam \\ - --ref \$INDEX \\ + --ref $fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 99cd5c11330872cfc88a61755672d4a02a923e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 12:43:27 +0100 Subject: [PATCH 11/47] update container --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index dc24d413c7d..67f4bd2703d 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -2,7 +2,7 @@ process PARABRICKS_FQ2BAM { tag "$meta.id" label 'process_high' - container "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1" + container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" input: tuple val(meta), path(reads), path(interval_file) From d34c6df56591e51b3e1e33637f34d4afdd418864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 14:45:02 +0100 Subject: [PATCH 12/47] low memory --- modules/nf-core/parabricks/fq2bam/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 67f4bd2703d..eac25f4f6cb 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -39,6 +39,7 @@ process PARABRICKS_FQ2BAM { pbrun \\ fq2bam \\ + --low-memory \\ --ref $fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ From 41c206c815c23e00b5d431f801212dca4a3b7183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 14:47:54 +0100 Subject: [PATCH 13/47] indey --- modules/nf-core/parabricks/fq2bam/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index eac25f4f6cb..f7727e499ac 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -35,12 +35,12 @@ process PARABRICKS_FQ2BAM { def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ - INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` + ln -sf \$(readlink $fasta) $index/$fasta pbrun \\ fq2bam \\ --low-memory \\ - --ref $fasta \\ + --ref $index/$fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 72c6ea5cd457c0454fb8d0e24893061a81263671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 14:51:49 +0100 Subject: [PATCH 14/47] index bwamem --- .../fastq_align_parabricks/tests/main.nf.test | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 301f09e3370..7639ef8c0e1 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -10,9 +10,24 @@ nextflow_workflow { tag "parabricks" tag "parabricks/fq2bam" tag "parabricks/applybqsr" + tag "bwamem/index" test("fastq_align_parabricks_single_end") { + setup { + run("BWAMEM_INDEX") { + script "../../../bwamem/index/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + """ + } + } + } + when { workflow { """ @@ -25,10 +40,7 @@ nextflow_workflow { [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) - input[3] = Channel.value([ - [id: 'reference_index'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) - ]) + input[3] = BWAMEM_INDEX.out.index input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } From 55901ffd3a41535f4d94a326d3710cb8fbcf97c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 14:58:18 +0100 Subject: [PATCH 15/47] index bwamem --- subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 7639ef8c0e1..4f31b4d9fbc 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -16,7 +16,7 @@ nextflow_workflow { setup { run("BWAMEM_INDEX") { - script "../../../bwamem/index/main.nf" + script "../../../../modules/nf-core/bwamem/index/main.nf" process { """ input[0] = Channel.of([ From b662fa539c4307ec9be55cb07d0b0d126006d417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 15:05:57 +0100 Subject: [PATCH 16/47] index bwa --- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 4f31b4d9fbc..4313d5604cd 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -10,13 +10,14 @@ nextflow_workflow { tag "parabricks" tag "parabricks/fq2bam" tag "parabricks/applybqsr" - tag "bwamem/index" + tag "bwa" + tag "bwa/index" test("fastq_align_parabricks_single_end") { setup { - run("BWAMEM_INDEX") { - script "../../../../modules/nf-core/bwamem/index/main.nf" + run("BWA_INDEX") { + script "../../../../modules/nf-core/bwa/index/main.nf" process { """ input[0] = Channel.of([ @@ -40,7 +41,7 @@ nextflow_workflow { [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) - input[3] = BWAMEM_INDEX.out.index + input[3] = BWA_INDEX.out.index input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } From 2e6a27dc30521c5e8646602be1009189cbd9d83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 15:49:36 +0100 Subject: [PATCH 17/47] add index file --- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 4313d5604cd..6cd058bfe15 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -41,7 +41,10 @@ nextflow_workflow { [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) - input[3] = BWA_INDEX.out.index + input[3] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } From 2e8dfa9e16c89dec8c9ad3cfa7e2479550759463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 15:51:33 +0100 Subject: [PATCH 18/47] add index file --- modules/nf-core/parabricks/fq2bam/main.nf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index f7727e499ac..4c70172d47d 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -35,12 +35,10 @@ process PARABRICKS_FQ2BAM { def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ - ln -sf \$(readlink $fasta) $index/$fasta - pbrun \\ fq2bam \\ --low-memory \\ - --ref $index/$fasta \\ + --ref $fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 6e7b6f57b5ba694cae26d1fd0394f3ddc819aac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 15:54:38 +0100 Subject: [PATCH 19/47] add index file --- modules/nf-core/parabricks/fq2bam/main.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 4c70172d47d..fcb879a7c57 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -34,11 +34,12 @@ process PARABRICKS_FQ2BAM { def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ + INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` pbrun \\ fq2bam \\ --low-memory \\ - --ref $fasta \\ + --ref \$INDEX\\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 7eced100bfc6c3fa83121c9ae5bb62c6a602b66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 15:56:05 +0100 Subject: [PATCH 20/47] add index file --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index fcb879a7c57..3e82f01f5ca 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -39,7 +39,7 @@ process PARABRICKS_FQ2BAM { pbrun \\ fq2bam \\ --low-memory \\ - --ref \$INDEX\\ + --ref $fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 5cbee34164c3342c15fdb812b3fcc3fdfc884f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 15:59:15 +0100 Subject: [PATCH 21/47] stage in --- modules/nf-core/parabricks/fq2bam/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 3e82f01f5ca..1de98d70676 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -4,6 +4,8 @@ process PARABRICKS_FQ2BAM { container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" + stageInMode: 'copy' + input: tuple val(meta), path(reads), path(interval_file) tuple val(meta2), path(fasta) @@ -34,8 +36,6 @@ process PARABRICKS_FQ2BAM { def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ - INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` - pbrun \\ fq2bam \\ --low-memory \\ From 7367d156ad058a7c72ceb4ba52cf32201c51adb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:01:05 +0100 Subject: [PATCH 22/47] stage in --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 1de98d70676..657a6477bd4 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -4,7 +4,7 @@ process PARABRICKS_FQ2BAM { container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" - stageInMode: 'copy' + stageInMode 'copy' input: tuple val(meta), path(reads), path(interval_file) From e676ee9018d37d18d41379a0c16e415f273ad0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:22:23 +0100 Subject: [PATCH 23/47] workdir --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 657a6477bd4..8f5bf133b92 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -39,7 +39,7 @@ process PARABRICKS_FQ2BAM { pbrun \\ fq2bam \\ --low-memory \\ - --ref $fasta \\ + --ref $task.workDir \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 280feec715a283bee74b10260d1e90080201280b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:25:52 +0100 Subject: [PATCH 24/47] revert workdir --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 8f5bf133b92..a916a7a17c9 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -39,7 +39,7 @@ process PARABRICKS_FQ2BAM { pbrun \\ fq2bam \\ --low-memory \\ - --ref $task.workDir \\ + --ref gi$fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 472a3a9d4794f6d8a9f3b3a8e4600b0645dfeee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:28:03 +0100 Subject: [PATCH 25/47] revert workdir --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index a916a7a17c9..657a6477bd4 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -39,7 +39,7 @@ process PARABRICKS_FQ2BAM { pbrun \\ fq2bam \\ --low-memory \\ - --ref gi$fasta \\ + --ref $fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From ad8cd2276e4f8d972148df0587f43e2698dd8c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:38:52 +0100 Subject: [PATCH 26/47] add bwa index --- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 6cd058bfe15..4313d5604cd 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -41,10 +41,7 @@ nextflow_workflow { [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) - input[3] = Channel.of([ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) - ]) + input[3] = BWA_INDEX.out.index input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } From 5e6202afa64b5815f7cc7112cd64d63bdd1786be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:40:47 +0100 Subject: [PATCH 27/47] add bwa index link --- modules/nf-core/parabricks/fq2bam/main.nf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 657a6477bd4..c228f9d1fd6 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -36,6 +36,8 @@ process PARABRICKS_FQ2BAM { def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ + ln -sf \$(readlink $fasta) $index/$fasta + pbrun \\ fq2bam \\ --low-memory \\ From e0227b6a269a8de1ace1c5a65de2d9284ebda9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:42:03 +0100 Subject: [PATCH 28/47] add bwa index link --- modules/nf-core/parabricks/fq2bam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index c228f9d1fd6..9d0fb165575 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -41,7 +41,7 @@ process PARABRICKS_FQ2BAM { pbrun \\ fq2bam \\ --low-memory \\ - --ref $fasta \\ + --ref $index/$fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 3ce2d860396eb4248eda093e7a86170ac5ed6e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:43:31 +0100 Subject: [PATCH 29/47] add bwa index link --- modules/nf-core/parabricks/fq2bam/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 9d0fb165575..351f8711e04 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -37,6 +37,7 @@ process PARABRICKS_FQ2BAM { def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ ln -sf \$(readlink $fasta) $index/$fasta + cp $fasta $index/$fasta pbrun \\ fq2bam \\ From 87daaf9c82d07c97b45e8a81cb08cd3ab942decd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 16:47:23 +0100 Subject: [PATCH 30/47] rm stage --- modules/nf-core/parabricks/fq2bam/main.nf | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 351f8711e04..8a250ca6d5e 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -4,8 +4,6 @@ process PARABRICKS_FQ2BAM { container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" - stageInMode 'copy' - input: tuple val(meta), path(reads), path(interval_file) tuple val(meta2), path(fasta) @@ -37,7 +35,6 @@ process PARABRICKS_FQ2BAM { def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ ln -sf \$(readlink $fasta) $index/$fasta - cp $fasta $index/$fasta pbrun \\ fq2bam \\ From cd9faa6e2e96e46930aa27ab5c7e0d8323bdc7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Tue, 29 Oct 2024 17:01:47 +0100 Subject: [PATCH 31/47] please work now --- modules/nf-core/parabricks/fq2bam/main.nf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 8a250ca6d5e..462fd95f317 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -34,12 +34,13 @@ process PARABRICKS_FQ2BAM { def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ - ln -sf \$(readlink $fasta) $index/$fasta + INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` + cp $fasta \$INDEX pbrun \\ fq2bam \\ + --ref \$INDEX \\ --low-memory \\ - --ref $index/$fasta \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ From 332eea6cdde848781f9b578f7c4e77cf5fea770d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Wed, 30 Oct 2024 10:33:19 +0100 Subject: [PATCH 32/47] remove fq2bam from this PR --- modules/nf-core/parabricks/fq2bam/main.nf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index 462fd95f317..dac03b34c87 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -2,7 +2,7 @@ process PARABRICKS_FQ2BAM { tag "$meta.id" label 'process_high' - container "nvcr.io/nvidia/clara/clara-parabricks:4.3.2-1" + container "nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1" input: tuple val(meta), path(reads), path(interval_file) @@ -32,22 +32,21 @@ process PARABRICKS_FQ2BAM { def known_sites_command = known_sites ? known_sites.collect{"--knownSites $it"}.join(' ') : "" def known_sites_output = known_sites ? "--out-recal-file ${prefix}.table" : "" def interval_file_command = interval_file ? interval_file.collect{"--interval-file $it"}.join(' ') : "" - def num_gpus = task.accelerator ? "--num-gpus $task.accelerator.request" : '' """ + INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` - cp $fasta \$INDEX + mv $fasta \$INDEX pbrun \\ fq2bam \\ --ref \$INDEX \\ - --low-memory \\ $in_fq_command \\ --read-group-sm $meta.id \\ --out-bam ${prefix}.bam \\ $known_sites_command \\ $known_sites_output \\ $interval_file_command \\ - $num_gpus \\ + --num-gpus $task.accelerator.request \\ $args cat <<-END_VERSIONS > versions.yml From f5c8cc4fbf165e19c3b2a9eed2af6da77e0d83ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Wed, 30 Oct 2024 10:38:51 +0100 Subject: [PATCH 33/47] update tests --- .../fastq_align_parabricks/tests/main.nf.test | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 4313d5604cd..4df58799239 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -13,21 +13,21 @@ nextflow_workflow { tag "bwa" tag "bwa/index" - test("fastq_align_parabricks_single_end") { - - setup { - run("BWA_INDEX") { - script "../../../../modules/nf-core/bwa/index/main.nf" - process { - """ - input[0] = Channel.of([ - [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - """ - } + setup { + run("BWA_INDEX") { + script "../../../../modules/nf-core/bwa/index/main.nf" + process { + """ + input[0] = Channel.of([ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + """ } } + } + + test("sarscov2 - fastq.gz - single end") { when { workflow { @@ -55,25 +55,26 @@ nextflow_workflow { } } - // test("fastq_align_parabricks_paired_end") { + test("sarscov2 - fastq.gz - paired end") { - // when { - // workflow { - // """ - // input[0] = Channel.of([[ id:'test', single_end:false ], [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] - // ] ) - // input[1] = BWA_INDEX.out.index - // input[2] = false - // input[3] = Channel.value([[id: 'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) - // """ - // } - // } + when { + workflow { + """ + input[0] = Channel.of([[ id:'test', single_end:false ], + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ]) + input[1] = BWA_INDEX.out.index + input[2] = false + input[3] = Channel.value([[id: 'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + """ + } + } - // then { - // assertAll( - // { assert workflow.success}, - // { assert snapshot(workflow.out).match()} - // ) - // } - // } + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + ) + } + } } \ No newline at end of file From a27baac9ed59f95cc5671e521b87f831f89b6b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Wed, 30 Oct 2024 10:44:56 +0100 Subject: [PATCH 34/47] change inputs in test and to fq2bam --- .../nf-core/fastq_align_parabricks/main.nf | 8 ++++---- .../fastq_align_parabricks/tests/main.nf.test | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 63d6637f35c..8b53f295ab2 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -9,11 +9,11 @@ workflow FASTQ_ALIGN_PARABRICKS { take: ch_reads // channel: [mandatory] meta, reads - ch_interval_file // channel: [optional for parabricks] intervals_bed_combined - // val_sort // boolean: [mandatory] true -> sort, false -> don't sort ch_fasta - ch_fasta_fai + ch_index + ch_interval_file // channel: [optional for parabricks] intervals_bed_combined ch_known_sites // channel [optional for parabricks] known_sites_indels + // val_sort // boolean: [mandatory] true -> sort, false -> don't sort main: ch_reports = Channel.empty() @@ -24,7 +24,7 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_qc_metrics = Channel.empty() ch_duplicate_metrics = Channel.empty() - PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, reads, ch_interval_file ]}, ch_fasta, ch_fasta_fai, ch_known_sites) + PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, reads ]}, ch_fasta, ch_index, ch_interval_file, ch_known_sites) // Collecting FQ2BAM outputs ch_bam = ch_bam.mix(PARABRICKS_FQ2BAM.out.bam) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 4df58799239..69b2479ed39 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -36,12 +36,12 @@ nextflow_workflow { [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] ]) - input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) - input[2] = Channel.value([ + input[1] = Channel.value([ [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) - input[3] = BWA_INDEX.out.index + input[2] = BWA_INDEX.out.index + input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } @@ -63,9 +63,13 @@ nextflow_workflow { input[0] = Channel.of([[ id:'test', single_end:false ], [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] ]) - input[1] = BWA_INDEX.out.index - input[2] = false - input[3] = Channel.value([[id: 'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[1] = Channel.value([ + [id: 'reference'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = BWA_INDEX.out.index + input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) + input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } } From f9088af96c2762ccd0f9d6f1790cbf1f03bce5a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Wed, 30 Oct 2024 10:50:16 +0100 Subject: [PATCH 35/47] add low memory --- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 5 ++++- .../nf-core/fastq_align_parabricks/tests/nextflow.config | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 69b2479ed39..d682a73b957 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -61,7 +61,10 @@ nextflow_workflow { workflow { """ input[0] = Channel.of([[ id:'test', single_end:false ], - [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] ]) input[1] = Channel.value([ [id: 'reference'], diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config new file mode 100644 index 00000000000..507305cbf69 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config @@ -0,0 +1,8 @@ +process { + withName: 'PARABRICKS_FQ2BAM' { + ext.args = '--low-memory' + } + // Ref: https://forums.developer.nvidia.com/t/problem-with-gpu/256825/6 + // Parabricks’s fq2bam requires 24GB of memory. + // Using --low-memory for testing +} From fcd7bd858b98a0020f0cc5b239f38c5e8e83a880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Wed, 30 Oct 2024 10:59:18 +0100 Subject: [PATCH 36/47] adjust applybqsr input --- subworkflows/nf-core/fastq_align_parabricks/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 8b53f295ab2..38696c2f065 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -34,7 +34,7 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_duplicate_metrics = ch_duplicate_metrics.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) // Apply BQSR - PARABRICKS_APPLYBQSR(ch_bam.map{meta, bam -> [ch_bam, ch_bai, ch_bqsr_table, ch_interval_file]}, ch_fasta) + PARABRICKS_APPLYBQSR(ch_bam, ch_bai, ch_bqsr_table, ch_interval_file, ch_fasta) ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) From 38bbe78d9dd6ca1e1b1a099e1291f340c82aff2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Wed, 30 Oct 2024 11:05:19 +0100 Subject: [PATCH 37/47] adjust io to be consistent --- subworkflows/nf-core/fastq_align_parabricks/main.nf | 2 +- .../nf-core/fastq_align_parabricks/tests/main.nf.test | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 38696c2f065..7b1dadf0752 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -24,7 +24,7 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_qc_metrics = Channel.empty() ch_duplicate_metrics = Channel.empty() - PARABRICKS_FQ2BAM(ch_reads.map{meta, reads -> [ meta, reads ]}, ch_fasta, ch_index, ch_interval_file, ch_known_sites) + PARABRICKS_FQ2BAM(ch_reads, ch_fasta, ch_index, ch_interval_file, ch_known_sites) // Collecting FQ2BAM outputs ch_bam = ch_bam.mix(PARABRICKS_FQ2BAM.out.bam) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index d682a73b957..4637fb2625b 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -41,7 +41,10 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) input[2] = BWA_INDEX.out.index - input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) + input[3] = Channel.value([ + [id: 'intervals'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) + ]) input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } @@ -71,7 +74,10 @@ nextflow_workflow { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) input[2] = BWA_INDEX.out.index - input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) + input[3] = Channel.value([ + [id: 'intervals'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) + ]) input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } From 84ff84fc8a04961d3f611bb05cae35c2e5d71bbb Mon Sep 17 00:00:00 2001 From: famosab Date: Mon, 18 Nov 2024 11:48:49 +0100 Subject: [PATCH 38/47] wip --- .../nf-core/fastq_align_parabricks/main.nf | 16 ++- .../tests/{nextflow.config => lowmem.config} | 5 + .../fastq_align_parabricks/tests/main.nf.test | 2 + .../tests/main.nf.test.snap | 106 ++++++++++++++++++ 4 files changed, 120 insertions(+), 9 deletions(-) rename subworkflows/nf-core/fastq_align_parabricks/tests/{nextflow.config => lowmem.config} (77%) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 7b1dadf0752..11c881724e3 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -9,14 +9,12 @@ workflow FASTQ_ALIGN_PARABRICKS { take: ch_reads // channel: [mandatory] meta, reads - ch_fasta - ch_index - ch_interval_file // channel: [optional for parabricks] intervals_bed_combined + ch_fasta // channel: [mandatory] meta, fasta + ch_index // channel: [mandatory] meta, index + ch_interval_file // channel: [optional for parabricks] meta, intervals_bed_combined ch_known_sites // channel [optional for parabricks] known_sites_indels - // val_sort // boolean: [mandatory] true -> sort, false -> don't sort main: - ch_reports = Channel.empty() ch_versions = Channel.empty() ch_bam = Channel.empty() ch_bai = Channel.empty() @@ -34,14 +32,14 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_duplicate_metrics = ch_duplicate_metrics.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) // Apply BQSR - PARABRICKS_APPLYBQSR(ch_bam, ch_bai, ch_bqsr_table, ch_interval_file, ch_fasta) + // PARABRICKS_APPLYBQSR(ch_bam, ch_bai, ch_bqsr_table, ch_interval_file, ch_fasta) ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) - ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) + //ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) emit: - bam = PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] - bai = PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] + bam = ch_bam //PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] + bai = ch_bai //PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config b/subworkflows/nf-core/fastq_align_parabricks/tests/lowmem.config similarity index 77% rename from subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config rename to subworkflows/nf-core/fastq_align_parabricks/tests/lowmem.config index 507305cbf69..88dbe55c15e 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/lowmem.config @@ -1,7 +1,12 @@ process { + withName: 'PARABRICKS_FQ2BAM' { ext.args = '--low-memory' } + + withName: 'PARABRICKS_APPLYBQSR' { + stageInMode = 'copy' + } // Ref: https://forums.developer.nvidia.com/t/problem-with-gpu/256825/6 // Parabricks’s fq2bam requires 24GB of memory. // Using --low-memory for testing diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 4637fb2625b..b24dc0a4aad 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -13,6 +13,8 @@ nextflow_workflow { tag "bwa" tag "bwa/index" + config "./lowmem.config" + setup { run("BWA_INDEX") { script "../../../../modules/nf-core/bwa/index/main.nf" diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap index e4a38c75167..d3ee9aae67a 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap @@ -27,5 +27,111 @@ "nextflow": "24.04.4" }, "timestamp": "2024-10-28T16:07:36.691396" + }, + "sarscov2 - fastq.gz - single end": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,a989684840fb07e1cf8c74cc2208b283" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam.bai:md5,b42d497c4b8bfda390bc49777fafee75" + ] + ], + "2": [ + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + ], + "bai": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam.bai:md5,b42d497c4b8bfda390bc49777fafee75" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,a989684840fb07e1cf8c74cc2208b283" + ] + ], + "versions": [ + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-18T11:42:27.869160615" + }, + "sarscov2 - fastq.gz - paired end": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,729ae53d6dcb627b478d5e3aa454dd90" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.bai:md5,ad5084ca0975b685e0f36322ca2fa137" + ] + ], + "2": [ + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + ], + "bai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.bai:md5,ad5084ca0975b685e0f36322ca2fa137" + ] + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,729ae53d6dcb627b478d5e3aa454dd90" + ] + ], + "versions": [ + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-18T11:43:11.246974608" } } \ No newline at end of file From 108446073480dfa6bbe5c99d4c787569d737d78b Mon Sep 17 00:00:00 2001 From: famosab Date: Mon, 18 Nov 2024 13:05:16 +0100 Subject: [PATCH 39/47] try applybqsr --- .../nf-core/fastq_align_parabricks/main.nf | 17 ++++++++++------- .../fastq_align_parabricks/tests/main.nf.test | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 11c881724e3..b6a5824f3ff 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -25,21 +25,24 @@ workflow FASTQ_ALIGN_PARABRICKS { PARABRICKS_FQ2BAM(ch_reads, ch_fasta, ch_index, ch_interval_file, ch_known_sites) // Collecting FQ2BAM outputs - ch_bam = ch_bam.mix(PARABRICKS_FQ2BAM.out.bam) - ch_bai = ch_bai.mix(PARABRICKS_FQ2BAM.out.bai) - ch_bqsr_table = ch_bqsr_table.mix(PARABRICKS_FQ2BAM.out.bqsr_table) ch_qc_metrics = ch_qc_metrics.mix(PARABRICKS_FQ2BAM.out.qc_metrics) ch_duplicate_metrics = ch_duplicate_metrics.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) // Apply BQSR - // PARABRICKS_APPLYBQSR(ch_bam, ch_bai, ch_bqsr_table, ch_interval_file, ch_fasta) + PARABRICKS_APPLYBQSR( + PARABRICKS_FQ2BAM.out.bam, + PARABRICKS_FQ2BAM.out.bai, + PARABRICKS_FQ2BAM.out.bqsr_table, + ch_interval_file, + ch_fasta + ) ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) - //ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) + ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) emit: - bam = ch_bam //PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] - bai = ch_bai //PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] + bam = PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] + bai = PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index b24dc0a4aad..c4001373a93 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -55,7 +55,12 @@ nextflow_workflow { then { assertAll( { assert workflow.success}, - { assert snapshot(workflow.out).match()} + { assert snapshot( + bam(workflow.out.bam[0][1]).getReadsMD5(), + file(workflow.out.bai[0][1]).name, + workflow.out.versions + ).match() + } ) } } @@ -88,7 +93,12 @@ nextflow_workflow { then { assertAll( { assert workflow.success}, - { assert snapshot(workflow.out).match()} + { assert snapshot( + bam(workflow.out.bam[0][1]).getReadsMD5(), + file(workflow.out.bai[0][1]).name, + workflow.out.versions + ).match() + } ) } } From cad4876dba656ae91eeca15e89070da10ed26f44 Mon Sep 17 00:00:00 2001 From: Sateesh Date: Mon, 18 Nov 2024 13:32:16 +0000 Subject: [PATCH 40/47] minor updates --- .../nf-core/fastq_align_parabricks/main.nf | 44 +++++++++++-------- .../fastq_align_parabricks/tests/main.nf.test | 34 +++++++------- .../tests/{lowmem.config => nextflow.config} | 0 3 files changed, 42 insertions(+), 36 deletions(-) rename subworkflows/nf-core/fastq_align_parabricks/tests/{lowmem.config => nextflow.config} (100%) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index b6a5824f3ff..9547ec84d73 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -1,7 +1,6 @@ // // Alignment and BQSR with Nvidia CLARA Parabricks // - include { PARABRICKS_FQ2BAM } from '../../../modules/nf-core/parabricks/fq2bam/main' include { PARABRICKS_APPLYBQSR } from '../../../modules/nf-core/parabricks/applybqsr/main' @@ -15,34 +14,41 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_known_sites // channel [optional for parabricks] known_sites_indels main: - ch_versions = Channel.empty() - ch_bam = Channel.empty() - ch_bai = Channel.empty() - ch_bqsr_table = Channel.empty() - ch_qc_metrics = Channel.empty() + ch_versions = Channel.empty() + ch_bam = Channel.empty() + ch_bai = Channel.empty() + ch_bqsr_table = Channel.empty() + ch_qc_metrics = Channel.empty() ch_duplicate_metrics = Channel.empty() - PARABRICKS_FQ2BAM(ch_reads, ch_fasta, ch_index, ch_interval_file, ch_known_sites) + PARABRICKS_FQ2BAM( + ch_reads, + ch_fasta, + ch_index, + ch_interval_file, + ch_known_sites + ) // Collecting FQ2BAM outputs - ch_qc_metrics = ch_qc_metrics.mix(PARABRICKS_FQ2BAM.out.qc_metrics) - ch_duplicate_metrics = ch_duplicate_metrics.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) + ch_bam = PARABRICKS_FQ2BAM.out.bam + ch_bai = PARABRICKS_FQ2BAM.out.bai + ch_qc_metrics = PARABRICKS_FQ2BAM.out.qc_metrics + ch_bqsr_table = PARABRICKS_FQ2BAM.out.bqsr_table + ch_duplicate_metrics = PARABRICKS_FQ2BAM.out.duplicate_metrics + ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) // Apply BQSR PARABRICKS_APPLYBQSR( - PARABRICKS_FQ2BAM.out.bam, - PARABRICKS_FQ2BAM.out.bai, - PARABRICKS_FQ2BAM.out.bqsr_table, - ch_interval_file, + ch_bam, + ch_bai, + ch_bqsr_table.ifEmpty([]), + ch_interval_file, ch_fasta - ) - - ch_versions = ch_versions.mix(PARABRICKS_FQ2BAM.out.versions) + ) ch_versions = ch_versions.mix(PARABRICKS_APPLYBQSR.out.versions) emit: - bam = PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] - bai = PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] + bam = PARABRICKS_APPLYBQSR.out.bam // channel: [ [meta], bam ] + bai = PARABRICKS_APPLYBQSR.out.bai // channel: [ [meta], bai ] versions = ch_versions // channel: [ versions.yml ] - } diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index c4001373a93..e253a047dfa 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -3,6 +3,7 @@ nextflow_workflow { name "Test Subworkflow FASTQ_ALIGN_PARABRICKS" script "../main.nf" workflow "FASTQ_ALIGN_PARABRICKS" + config "./lowmem.config" tag "subworkflows" tag "subworkflows_nfcore" @@ -13,8 +14,6 @@ nextflow_workflow { tag "bwa" tag "bwa/index" - config "./lowmem.config" - setup { run("BWA_INDEX") { script "../../../../modules/nf-core/bwa/index/main.nf" @@ -29,7 +28,7 @@ nextflow_workflow { } } - test("sarscov2 - fastq.gz - single end") { + test("sarscov2 single-end [fastq_gz]") { when { workflow { @@ -37,16 +36,16 @@ nextflow_workflow { input[0] = Channel.of([ [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] - ]) + ]) input[1] = Channel.value([ [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) + ]) input[2] = BWA_INDEX.out.index input[3] = Channel.value([ [id: 'intervals'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) - ]) + ]) input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } @@ -56,35 +55,36 @@ nextflow_workflow { assertAll( { assert workflow.success}, { assert snapshot( - bam(workflow.out.bam[0][1]).getReadsMD5(), - file(workflow.out.bai[0][1]).name, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.versions - ).match() + ).match() } ) } } - test("sarscov2 - fastq.gz - paired end") { + test("sarscov2 paired-end [fastq_gz]") { when { workflow { """ - input[0] = Channel.of([[ id:'test', single_end:false ], + input[0] = Channel.of([ + [ id:'test', single_end:false ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] - ]) + ]) input[1] = Channel.value([ [id: 'reference'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) + ]) input[2] = BWA_INDEX.out.index input[3] = Channel.value([ [id: 'intervals'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) - ]) + ]) input[4] = file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/vcf/test.vcf.gz', checkIfExists: true) """ } @@ -94,10 +94,10 @@ nextflow_workflow { assertAll( { assert workflow.success}, { assert snapshot( - bam(workflow.out.bam[0][1]).getReadsMD5(), - file(workflow.out.bai[0][1]).name, + workflow.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5() }, + workflow.out.bai.collect { meta, bai -> file(bai).name }, workflow.out.versions - ).match() + ).match() } ) } diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/lowmem.config b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config similarity index 100% rename from subworkflows/nf-core/fastq_align_parabricks/tests/lowmem.config rename to subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config From 7bb02226e58b7ca66bde9985d74ebcc6497c6b24 Mon Sep 17 00:00:00 2001 From: famosab Date: Mon, 18 Nov 2024 14:44:51 +0100 Subject: [PATCH 41/47] update snap --- .../fastq_align_parabricks/tests/main.nf.test | 2 +- .../tests/main.nf.test.snap | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index e253a047dfa..6316cc6fdee 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -3,7 +3,7 @@ nextflow_workflow { name "Test Subworkflow FASTQ_ALIGN_PARABRICKS" script "../main.nf" workflow "FASTQ_ALIGN_PARABRICKS" - config "./lowmem.config" + config "./nextflow.config" tag "subworkflows" tag "subworkflows_nfcore" diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap index d3ee9aae67a..845d5b04a00 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap @@ -1,4 +1,40 @@ { + "sarscov2 single-end [fastq_gz]": { + "content": [ + [ + + ], + [ + + ], + [ + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-18T14:36:04.177154901" + }, + "sarscov2 paired-end [fastq_gz]": { + "content": [ + [ + + ], + [ + + ], + [ + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-18T14:36:50.014951531" + }, "fastq_align_parabricks_single_end": { "content": [ { From 9748d56b8f1a1f5b4cc7a622cdc410b7d3f98e7f Mon Sep 17 00:00:00 2001 From: famosab Date: Mon, 18 Nov 2024 14:50:50 +0100 Subject: [PATCH 42/47] update snap --- .../nf-core/fastq_align_parabricks/tests/nextflow.config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config index 88dbe55c15e..b589d4591bf 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config @@ -3,11 +3,12 @@ process { withName: 'PARABRICKS_FQ2BAM' { ext.args = '--low-memory' } + // Ref: https://forums.developer.nvidia.com/t/problem-with-gpu/256825/6 + // Parabricks’s fq2bam requires 24GB of memory. + // Using --low-memory for testing withName: 'PARABRICKS_APPLYBQSR' { stageInMode = 'copy' } - // Ref: https://forums.developer.nvidia.com/t/problem-with-gpu/256825/6 - // Parabricks’s fq2bam requires 24GB of memory. - // Using --low-memory for testing + } From eb135628e301dc2c9440b2aba3a4e5ee222a0df8 Mon Sep 17 00:00:00 2001 From: famosab Date: Tue, 19 Nov 2024 15:30:23 +0100 Subject: [PATCH 43/47] update snap - problem is the naming in applybqsr --- .../tests/main.nf.test.snap | 153 ++---------------- 1 file changed, 10 insertions(+), 143 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap index 845d5b04a00..0b536a63317 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test.snap @@ -2,172 +2,39 @@ "sarscov2 single-end [fastq_gz]": { "content": [ [ - + "7e2bd786d964e42ddbc2ab0c9f340b09" ], [ - + "test.bqsr.bam.bai" ], [ - "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77", + "versions.yml:md5,df165e28f025dad39d826caead132115" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-18T14:36:04.177154901" + "timestamp": "2024-11-19T15:25:23.622710503" }, "sarscov2 paired-end [fastq_gz]": { "content": [ [ - + "73e8e89cda8fce1cf07bdebff0f793ec" ], [ - + "test.bqsr.bam.bai" ], [ - "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" + "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77", + "versions.yml:md5,df165e28f025dad39d826caead132115" ] ], "meta": { "nf-test": "0.9.2", "nextflow": "24.10.0" }, - "timestamp": "2024-11-18T14:36:50.014951531" - }, - "fastq_align_parabricks_single_end": { - "content": [ - { - "0": [ - - ], - "1": [ - - ], - "2": [ - - ], - "bai": [ - - ], - "bam": [ - - ], - "versions": [ - - ] - } - ], - "meta": { - "nf-test": "0.9.1", - "nextflow": "24.04.4" - }, - "timestamp": "2024-10-28T16:07:36.691396" - }, - "sarscov2 - fastq.gz - single end": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam:md5,a989684840fb07e1cf8c74cc2208b283" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam.bai:md5,b42d497c4b8bfda390bc49777fafee75" - ] - ], - "2": [ - "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" - ], - "bai": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam.bai:md5,b42d497c4b8bfda390bc49777fafee75" - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam:md5,a989684840fb07e1cf8c74cc2208b283" - ] - ], - "versions": [ - "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-18T11:42:27.869160615" - }, - "sarscov2 - fastq.gz - paired end": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam:md5,729ae53d6dcb627b478d5e3aa454dd90" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam.bai:md5,ad5084ca0975b685e0f36322ca2fa137" - ] - ], - "2": [ - "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" - ], - "bai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam.bai:md5,ad5084ca0975b685e0f36322ca2fa137" - ] - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam:md5,729ae53d6dcb627b478d5e3aa454dd90" - ] - ], - "versions": [ - "versions.yml:md5,4d671c4d60b6a0279cfca507525daa77" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.0" - }, - "timestamp": "2024-11-18T11:43:11.246974608" + "timestamp": "2024-11-19T15:26:09.183487496" } } \ No newline at end of file From 2a4c49f83cbd664b80201d7c93a049b3a94b3ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20Ba=CC=88uerle?= Date: Mon, 2 Dec 2024 13:59:12 +0100 Subject: [PATCH 44/47] add tag gpu --- subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test | 1 + 1 file changed, 1 insertion(+) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test index 6316cc6fdee..7f102f528a9 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/main.nf.test @@ -13,6 +13,7 @@ nextflow_workflow { tag "parabricks/applybqsr" tag "bwa" tag "bwa/index" + tag "gpu" setup { run("BWA_INDEX") { From 82a075468dc954135ee8b31ff61a4847b22244a6 Mon Sep 17 00:00:00 2001 From: famosab Date: Mon, 16 Dec 2024 11:30:55 +0100 Subject: [PATCH 45/47] update meta --- .../nf-core/fastq_align_parabricks/meta.yml | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/meta.yml b/subworkflows/nf-core/fastq_align_parabricks/meta.yml index 902eb90dc48..60bcb63e3a0 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/meta.yml +++ b/subworkflows/nf-core/fastq_align_parabricks/meta.yml @@ -1,25 +1,43 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json name: "fastq_align_parabricks" -## TODO nf-core: Add a description of the subworkflow and list keywords -description: Sort SAM/BAM/CRAM file +description: Align a fastq file using GPU-based acceleration keywords: - - sort - - bam - - sam - - cram -## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow + - fastq + - align + - parabricks + - gpu + - preprocessing components: - parabricks/fq2bam - parabricks/applybqsr -## TODO nf-core: List all of the channels used as input with a description and their structure input: - - ch_bam: + - ch_reads: type: file description: | - The input channel containing the BAM/CRAM/SAM files - Structure: [ val(meta), path(bam) ] - pattern: "*.{bam/cram/sam}" -## TODO nf-core: List all of the channels used as output with a descriptions and their structure + Channel containing reads (either one file for se or two files for pe) + Structure: [ val(meta), path(fastq1), path(fastq2) ] + - ch_fasta: + type: file + description: | + Channel containing reference fasta file + Structure: [ val(meta), path(fasta) ] + - ch_index: + type: file + description: | + Channel containing reference BWA index + Structure: [ val(meta), path(.{amb,ann,bwt,pac,sa}) ] + - ch_interval_file: + type: file + description: | + (optional) file(s) containing genomic intervals for use in base + quality score recalibration (BQSR) + Structure: [ val(meta), path(.{bed,interval_list,picard,list,intervals}) ] + - ch_known_sites: + type: file + description: | + (optional) known sites file(s) for calculating BQSR. markdups must + be true to perform BQSR. + Structure [ path(vcf) ] output: - bam: type: file @@ -33,12 +51,6 @@ output: Channel containing indexed BAM (BAI) files Structure: [ val(meta), path(bai) ] pattern: "*.bai" - - csi: - type: file - description: | - Channel containing CSI files - Structure: [ val(meta), path(csi) ] - pattern: "*.csi" - versions: type: file description: | From cd5ec00c3902ebe95a4c33023ac0005dd0b06b97 Mon Sep 17 00:00:00 2001 From: famosab Date: Mon, 16 Dec 2024 11:33:19 +0100 Subject: [PATCH 46/47] update config --- .../nf-core/fastq_align_parabricks/tests/nextflow.config | 4 ---- 1 file changed, 4 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config index b589d4591bf..59e6276120c 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config +++ b/subworkflows/nf-core/fastq_align_parabricks/tests/nextflow.config @@ -7,8 +7,4 @@ process { // Parabricks’s fq2bam requires 24GB of memory. // Using --low-memory for testing - withName: 'PARABRICKS_APPLYBQSR' { - stageInMode = 'copy' - } - } From 5c967c1e2ded029c3011d123dc07de9288ca89ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20B=C3=A4uerle?= <45968370+famosab@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:09:02 +0100 Subject: [PATCH 47/47] Apply suggestions from code review Co-authored-by: Maxime U Garcia --- subworkflows/nf-core/fastq_align_parabricks/main.nf | 4 ++-- subworkflows/nf-core/fastq_align_parabricks/meta.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_parabricks/main.nf b/subworkflows/nf-core/fastq_align_parabricks/main.nf index 9547ec84d73..e27192bdbf8 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/main.nf +++ b/subworkflows/nf-core/fastq_align_parabricks/main.nf @@ -10,8 +10,8 @@ workflow FASTQ_ALIGN_PARABRICKS { ch_reads // channel: [mandatory] meta, reads ch_fasta // channel: [mandatory] meta, fasta ch_index // channel: [mandatory] meta, index - ch_interval_file // channel: [optional for parabricks] meta, intervals_bed_combined - ch_known_sites // channel [optional for parabricks] known_sites_indels + ch_interval_file // channel: [optional] meta, intervals_bed_combined + ch_known_sites // channel [optional] known_sites_indels main: ch_versions = Channel.empty() diff --git a/subworkflows/nf-core/fastq_align_parabricks/meta.yml b/subworkflows/nf-core/fastq_align_parabricks/meta.yml index 60bcb63e3a0..27fe1ab34df 100644 --- a/subworkflows/nf-core/fastq_align_parabricks/meta.yml +++ b/subworkflows/nf-core/fastq_align_parabricks/meta.yml @@ -15,7 +15,7 @@ input: type: file description: | Channel containing reads (either one file for se or two files for pe) - Structure: [ val(meta), path(fastq1), path(fastq2) ] + Structure: [ val(meta), [ path(fastq1), path(fastq2) ] ] - ch_fasta: type: file description: |