From a5e71ec9c6e10f5a04caae88c35e1dadb94d8b60 Mon Sep 17 00:00:00 2001 From: Furentsu Date: Tue, 13 Feb 2024 12:37:57 +0100 Subject: [PATCH 1/7] installed fq2bam --- modules.json | 5 ++ modules/nf-core/parabricks/fq2bam/main.nf | 90 ++++++++++++++++++++++ modules/nf-core/parabricks/fq2bam/meta.yml | 83 ++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 modules/nf-core/parabricks/fq2bam/main.nf create mode 100644 modules/nf-core/parabricks/fq2bam/meta.yml diff --git a/modules.json b/modules.json index e2440fa692..733f5b8ee0 100644 --- a/modules.json +++ b/modules.json @@ -340,6 +340,11 @@ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", "installed_by": ["bam_ngscheckmate"] }, + "parabricks/fq2bam": { + "branch": "master", + "git_sha": "2fe1d9713a234768540b9fb0ee515e52dc613ddf", + "installed_by": ["modules"] + }, "samblaster": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf new file mode 100644 index 0000000000..af886cc476 --- /dev/null +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -0,0 +1,90 @@ +process PARABRICKS_FQ2BAM { + tag "$meta.id" + label 'process_high' + + container "nvcr.io/nvidia/clara/clara-parabricks:4.2.0-1" + + /* + NOTE: Parabricks requires the files to be non-symlinked + Do not change the stageInMode to soft linked! This is default on Nextflow. + If you change this setting be careful. + */ + stageInMode "copy" + + input: + tuple val(meta), path(reads), path(interval_file) + tuple val(meta2), path(fasta) + tuple val(meta3), path(index) + path known_sites + + output: + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*.bai") , emit: bai + path "versions.yml" , emit: versions + path "qc_metrics", optional:true , emit: qc_metrics + path("*.table"), optional:true , emit: bqsr_table + path("duplicate-metrics.txt"), optional:true , emit: duplicate_metrics + + when: + task.ext.when == null || task.ext.when + + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads" + 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(' ') : "" + """ + + INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` + mv $fasta \$INDEX + + pbrun \\ + fq2bam \\ + --ref \$INDEX \\ + $in_fq_command \\ + --read-group-sm $meta.id \\ + --out-bam ${prefix}.bam \\ + $known_sites_command \\ + $known_sites_output \\ + $interval_file_command \\ + --num-gpus $task.accelerator.request \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' ) + END_VERSIONS + """ + + stub: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + error "Parabricks module does not support Conda. Please use Docker / Singularity / Podman instead." + } + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def in_fq_command = meta.single_end ? "--in-se-fq $reads" : "--in-fq $reads" + 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 metrics_output_command = args = "--out-duplicate-metrics duplicate-metrics.txt" ? "touch duplicate-metrics.txt" : "" + def known_sites_output_command = known_sites ? "touch ${prefix}.table" : "" + def qc_metrics_output_command = args = "--out-qc-metrics-dir qc_metrics " ? "mkdir qc_metrics && touch qc_metrics/alignment.txt" : "" + """ + touch ${prefix}.bam + touch ${prefix}.bam.bai + $metrics_output_command + $known_sites_output_command + $qc_metrics_output_command + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pbrun: \$(echo \$(pbrun version 2>&1) | sed 's/^Please.* //' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/parabricks/fq2bam/meta.yml b/modules/nf-core/parabricks/fq2bam/meta.yml new file mode 100644 index 0000000000..d8f60f3b4b --- /dev/null +++ b/modules/nf-core/parabricks/fq2bam/meta.yml @@ -0,0 +1,83 @@ +name: "parabricks_fq2bam" +description: NVIDIA Clara Parabricks GPU-accelerated alignment, sorting, BQSR calculation, and duplicate marking. Note this nf-core module requires files to be copied into the working directory and not symlinked. +keywords: + - align + - sort + - bqsr + - duplicates +tools: + - "parabricks": + description: "NVIDIA Clara Parabricks GPU-accelerated genomics tools" + homepage: "https://www.nvidia.com/en-us/clara/genomics/" + documentation: "https://docs.nvidia.com/clara/parabricks/4.0.1/Documentation/" + licence: ["custom"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: fastq.gz files + pattern: "*.fastq.gz" + - interval_file: + type: file + description: (optional) file(s) containing genomic intervals for use in base quality score recalibration (BQSR) + pattern: "*.{bed,interval_list,picard,list,intervals}" + - meta2: + type: map + description: | + Groovy Map containing fasta information + - fasta: + type: file + description: reference fasta file - must be unzipped + pattern: "*.fasta" + - meta3: + type: map + description: | + Groovy Map containing index information + - index: + type: file + description: reference BWA index + pattern: "*.{amb,ann,bwt,pac,sa}" + - known_sites: + type: file + description: (optional) known sites file(s) for calculating BQSR. markdups must be true to perform BQSR. + pattern: "*.vcf.gz" +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: Sorted BAM file + pattern: "*.bam" + - bai: + type: file + description: index corresponding to sorted BAM file + pattern: "*.bai" + - qc_metrics: + type: directory + description: (optional) optional directory of qc metrics + pattern: "qc_metrics" + - bqsr_table: + type: file + description: (optional) table from base quality score recalibration calculation, to be used with parabricks/applybqsr + pattern: "*.table" + - duplicate_metrics: + type: file + description: (optional) metrics calculated from marking duplcates in the bam file + pattern: "*-duplicate-metrics.txt" +authors: + - "@bsiranosian" + - "@adamrtalbot" +maintainers: + - "@bsiranosian" + - "@adamrtalbot" From 6652f01601b80f841c082b4d9c77d1343647a270 Mon Sep 17 00:00:00 2001 From: Furentsu Date: Thu, 29 Feb 2024 16:36:11 +0100 Subject: [PATCH 2/7] included fq2bam module --- .../local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index c61ac7f4cc..3fee55e514 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -8,6 +8,7 @@ include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/ma include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' include { DRAGMAP_ALIGN } from '../../../modules/nf-core/dragmap/align/main' include { SENTIEON_BWAMEM } from '../../../modules/nf-core/sentieon/bwamem/main' +include { PARABRICKS_FQ2BAM } from '../modules/nf-core/parabricks/fq2bam/main' workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { take: From 0b3a6f0fce76df5a5546be7c2f5e84deb2829121 Mon Sep 17 00:00:00 2001 From: Furentsu Date: Fri, 1 Mar 2024 16:19:09 +0100 Subject: [PATCH 3/7] started fastq2bam integration into alignment subworkflow --- .../local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index 3fee55e514..51efb55afc 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -13,6 +13,8 @@ include { PARABRICKS_FQ2BAM } from '../modules/nf-core/parabricks/fq2bam/ma workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { take: reads // channel: [mandatory] meta, reads + interval_file // intervals_bed_combined [optional] for parabricks + known_sites // known_sites_indels [optional] for parabricks index // channel: [mandatory] index sort // boolean: [mandatory] true -> sort, false -> don't sort fasta @@ -29,6 +31,9 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { DRAGMAP_ALIGN(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort) // If aligner is dragmap // The sentieon-bwamem-module does sorting as part of the conversion from sam to bam. SENTIEON_BWAMEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, fasta.map{fa -> [[:], fa]}, fasta_fai.map{fai -> [[:], fai]}) // If aligner is sentieon-bwamem + // The parabricks-fq2bam module performs alignment and sorting as part of the conversion from fastq to bam. + // Additionally, it can perform mark duplicates and generate a bqsr table (input for parabricks-applybqsr module) + PARABRICKS_FQ2BAM(reads, fasta.map{fa -> [[:], fa]}, index.map{ it -> [[ id:'index' ], it ] }, known_sites) // Get the bam files from the aligner // Only one aligner is run From 51586571fff2f280a9e2329d93547a73fdc4f550 Mon Sep 17 00:00:00 2001 From: Furentsu Date: Sat, 9 Mar 2024 15:21:43 +0100 Subject: [PATCH 4/7] added parabricks fq2bam to fast_align_bwamem_mem2_dragmap_sentieon subworkflow --- .../fastq_align_bwamem_mem2_dragmap_sentieon/main.nf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index 51efb55afc..bca481f2ca 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -33,7 +33,12 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { SENTIEON_BWAMEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, fasta.map{fa -> [[:], fa]}, fasta_fai.map{fai -> [[:], fai]}) // If aligner is sentieon-bwamem // The parabricks-fq2bam module performs alignment and sorting as part of the conversion from fastq to bam. // Additionally, it can perform mark duplicates and generate a bqsr table (input for parabricks-applybqsr module) - PARABRICKS_FQ2BAM(reads, fasta.map{fa -> [[:], fa]}, index.map{ it -> [[ id:'index' ], it ] }, known_sites) + PARABRICKS_FQ2BAM( + reads, + [], + fasta.map{fa -> [[:], fa]}, index.map{ it -> [[ id:'index' ], it ] }, + [] + ) // Get the bam files from the aligner // Only one aligner is run @@ -42,8 +47,10 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { bam = bam.mix(BWAMEM2_MEM.out.bam) bam = bam.mix(DRAGMAP_ALIGN.out.bam) bam = bam.mix(SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bam ] }) + bam = bam.mix(PARABRICKS_FQ2BAM.out.bam) bai = SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bai ] } + bai = bai.mix(PARABRICKS_FQ2BAM.out.bai) // Gather reports of all tools used reports = reports.mix(DRAGMAP_ALIGN.out.log) @@ -53,6 +60,7 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { versions = versions.mix(BWAMEM2_MEM.out.versions) versions = versions.mix(DRAGMAP_ALIGN.out.versions) versions = versions.mix(SENTIEON_BWAMEM.out.versions) + versions = versions.mix(PARABRICKS_FQ2BAM.out.versions) emit: bam // channel: [ [meta], bam ] From b1ca9ed914abb7d6042bf4a4b0cf1280eb7a1879 Mon Sep 17 00:00:00 2001 From: Furentsu Date: Mon, 18 Mar 2024 13:14:51 +0100 Subject: [PATCH 5/7] integration of fq2bam - WIP --- .../main.nf | 17 +++++++---- .../tests/main.nf.test | 29 +++++++++++++++++++ workflows/sarek.nf | 6 ++-- 3 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index bca481f2ca..e35201bd9c 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -13,17 +13,18 @@ include { PARABRICKS_FQ2BAM } from '../modules/nf-core/parabricks/fq2bam/ma workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { take: reads // channel: [mandatory] meta, reads - interval_file // intervals_bed_combined [optional] for parabricks - known_sites // known_sites_indels [optional] for parabricks index // channel: [mandatory] index sort // boolean: [mandatory] true -> sort, false -> don't sort fasta fasta_fai + interval_file // path: [optional] intervals_bed_combined for parabricks + known_sites // path: [optional] known_sites_indels for parabricks main: versions = Channel.empty() reports = Channel.empty() + optional_parabricks = Channel.empty() // Only one of the following should be run BWAMEM1_MEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort) // If aligner is bwa-mem @@ -34,9 +35,9 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { // The parabricks-fq2bam module performs alignment and sorting as part of the conversion from fastq to bam. // Additionally, it can perform mark duplicates and generate a bqsr table (input for parabricks-applybqsr module) PARABRICKS_FQ2BAM( - reads, - [], - fasta.map{fa -> [[:], fa]}, index.map{ it -> [[ id:'index' ], it ] }, + reads, + [], + fasta.map{fa -> [[:], fa]}, index.map{ it -> [[ id:'index' ], it ] }, [] ) @@ -52,6 +53,11 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { bai = SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bai ] } bai = bai.mix(PARABRICKS_FQ2BAM.out.bai) + // Gather optional outputs for parabricks + qc_metrics = optional_parabricks.mix(PARABRICKS_FQ2BAM.out.qc_metrics) + bqsr_table = optional_parabricks.mix(PARABRICKS_FQ2BAM.out.bqsr_table) + duplicate_metrics = optional_parabricks.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) + // Gather reports of all tools used reports = reports.mix(DRAGMAP_ALIGN.out.log) @@ -67,4 +73,5 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { bai // channel: [ [meta], bai ] reports versions // channel: [ versions.yml ] + optional_parabricks // channel [ optional_parabricks ] } diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test new file mode 100644 index 0000000000..e0eb48d957 --- /dev/null +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test @@ -0,0 +1,29 @@ +nextflow_workflow { + + name "Test Workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON" + script "subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf" + workflow "FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON" + + test("Should run without failures") { + + when { + params { + // define parameters here. Example: + // outdir = "tests/results" + } + workflow { + """ + // define inputs of the workflow here. Example: + // input[0] = file("test-file.txt") + """ + } + } + + then { + assert workflow.success + assert snapshot(workflow.out).match() + } + + } + +} diff --git a/workflows/sarek.nf b/workflows/sarek.nf index 88baa30567..7b81842632 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -588,7 +588,7 @@ workflow SAREK { versions = versions.mix(FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON.out.versions) } - if (params.step in ['mapping', 'markduplicates']) { + if (params.step in ['mapping', 'markduplicates'] && !params.step in ['parabricks']) { // ch_cram_no_markduplicates_restart = Channel.empty() cram_markduplicates_no_spark = Channel.empty() @@ -701,7 +701,7 @@ workflow SAREK { else CHANNEL_MARKDUPLICATES_CREATE_CSV(ch_md_cram_for_restart, csv_subfolder, params.outdir, params.save_output_as_bam) } - if (params.step in ['mapping', 'markduplicates', 'prepare_recalibration']) { + if (params.step in ['mapping', 'markduplicates', 'prepare_recalibration'] && !params.step in ['parabricks']) { // Run if starting from step "prepare_recalibration" if (params.step == 'prepare_recalibration') { @@ -737,7 +737,7 @@ workflow SAREK { } // STEP 3: Create recalibration tables - if (!(params.skip_tools && params.skip_tools.split(',').contains('baserecalibrator'))) { + if (!(params.skip_tools && params.skip_tools.split(',').contains('baserecalibrator')) && !params.step in ['parabricks']) { ch_table_bqsr_no_spark = Channel.empty() ch_table_bqsr_spark = Channel.empty() From bd1981e342586d4eabff0b941ed354ac6980faf6 Mon Sep 17 00:00:00 2001 From: Furentsu Date: Wed, 20 Mar 2024 15:50:11 +0100 Subject: [PATCH 6/7] draft pr --- .../main.nf | 22 +++++++------- .../tests/main.nf.test | 29 ------------------- 2 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index e35201bd9c..53f6a8d8c4 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -13,18 +13,16 @@ include { PARABRICKS_FQ2BAM } from '../modules/nf-core/parabricks/fq2bam/ma workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { take: reads // channel: [mandatory] meta, reads + interval_file // channel: [optional for parabricks] intervals_bed_combined index // channel: [mandatory] index sort // boolean: [mandatory] true -> sort, false -> don't sort fasta fasta_fai - interval_file // path: [optional] intervals_bed_combined for parabricks - known_sites // path: [optional] known_sites_indels for parabricks + known_sites // channel [optional for parabricks] known_sites_indels main: - versions = Channel.empty() reports = Channel.empty() - optional_parabricks = Channel.empty() // Only one of the following should be run BWAMEM1_MEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort) // If aligner is bwa-mem @@ -36,9 +34,9 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { // Additionally, it can perform mark duplicates and generate a bqsr table (input for parabricks-applybqsr module) PARABRICKS_FQ2BAM( reads, - [], + [[id:'null'], []], fasta.map{fa -> [[:], fa]}, index.map{ it -> [[ id:'index' ], it ] }, - [] + [[id:'null'], []], ) // Get the bam files from the aligner @@ -53,10 +51,10 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { bai = SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bai ] } bai = bai.mix(PARABRICKS_FQ2BAM.out.bai) - // Gather optional outputs for parabricks - qc_metrics = optional_parabricks.mix(PARABRICKS_FQ2BAM.out.qc_metrics) - bqsr_table = optional_parabricks.mix(PARABRICKS_FQ2BAM.out.bqsr_table) - duplicate_metrics = optional_parabricks.mix(PARABRICKS_FQ2BAM.out.duplicate_metrics) + // Optional outputs for parabricks_fq2bam + qc_metrics = PARABRICKS_FQ2BAM.out.qc_metrics + bqsr_table = PARABRICKS_FQ2BAM.out.bqsr_table + duplicate_metrics = PARABRICKS_FQ2BAM.out.duplicate_metrics // Gather reports of all tools used reports = reports.mix(DRAGMAP_ALIGN.out.log) @@ -71,7 +69,9 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { emit: bam // channel: [ [meta], bam ] bai // channel: [ [meta], bai ] + qc_metrics // file: qc_metrics/alignment.txt + bqsr_table // file: *.table + duplicate_metrics // file: duplicate-metrics.txt reports versions // channel: [ versions.yml ] - optional_parabricks // channel [ optional_parabricks ] } diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test deleted file mode 100644 index e0eb48d957..0000000000 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/tests/main.nf.test +++ /dev/null @@ -1,29 +0,0 @@ -nextflow_workflow { - - name "Test Workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON" - script "subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf" - workflow "FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON" - - test("Should run without failures") { - - when { - params { - // define parameters here. Example: - // outdir = "tests/results" - } - workflow { - """ - // define inputs of the workflow here. Example: - // input[0] = file("test-file.txt") - """ - } - } - - then { - assert workflow.success - assert snapshot(workflow.out).match() - } - - } - -} From 3c05085146dc2c9bca5c1bc8e56fb9c2ca8f87df Mon Sep 17 00:00:00 2001 From: maxulysse Date: Thu, 11 Apr 2024 15:42:02 +0200 Subject: [PATCH 7/7] fix channel input --- .../local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index 12805a0488..0f099815b6 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -32,7 +32,7 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { SENTIEON_BWAMEM(reads, index, fasta, fasta_fai) // If aligner is sentieon-bwamem // The parabricks-fq2bam module performs alignment and sorting as part of the conversion from fastq to bam. // Additionally, it can perform mark duplicates and generate a bqsr table (input for parabricks-applybqsr module) - PARABRICKS_FQ2BAM(reads, [[id:'null'], []], fasta, index, [[id:'null'], []],) + PARABRICKS_FQ2BAM(reads.map{meta, reads -> [meta, reads, []] } , fasta, index, []) // Get the bam files from the aligner // Only one aligner is run