From adf071fbc2235ee4ef5789aa77410c976d1e94e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Famke=20B=C3=A4uerle?= <45968370+famosab@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:26:14 +0100 Subject: [PATCH] adjust io of fq2bam to be consistent (#6906) * adjust io to be consistent * adjust meta to be consistent * fix meta --- modules/nf-core/parabricks/fq2bam/main.nf | 4 ++-- modules/nf-core/parabricks/fq2bam/meta.yml | 23 +++++++++++++------ .../parabricks/fq2bam/tests/main.nf.test | 8 +++---- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/modules/nf-core/parabricks/fq2bam/main.nf b/modules/nf-core/parabricks/fq2bam/main.nf index a68a64bf948..c1877bdf468 100644 --- a/modules/nf-core/parabricks/fq2bam/main.nf +++ b/modules/nf-core/parabricks/fq2bam/main.nf @@ -8,15 +8,15 @@ process PARABRICKS_FQ2BAM { tuple val(meta), path(reads) tuple val(meta2), path(fasta) tuple val(meta3), path(index) - path(interval_file) + tuple val(meta4), path(interval_file) path(known_sites) output: tuple val(meta), path("*.bam") , emit: bam tuple val(meta), path("*.bai") , emit: bai + tuple val(meta), path("*.table"), emit: bqsr_table , optional:true path "versions.yml" , emit: versions path "qc_metrics" , emit: qc_metrics , optional:true - path("*.table") , emit: bqsr_table , optional:true path("duplicate-metrics.txt") , emit: duplicate_metrics , optional:true when: diff --git a/modules/nf-core/parabricks/fq2bam/meta.yml b/modules/nf-core/parabricks/fq2bam/meta.yml index b1cae9c4fa4..b3e2e7e6ee6 100644 --- a/modules/nf-core/parabricks/fq2bam/meta.yml +++ b/modules/nf-core/parabricks/fq2bam/meta.yml @@ -40,7 +40,11 @@ input: type: file description: reference BWA index pattern: "*.{amb,ann,bwt,pac,sa}" - - - interval_file: + - - meta4: + type: map + description: | + Groovy Map containing index information + - interval_file: type: file description: (optional) file(s) containing genomic intervals for use in base quality score recalibration (BQSR) @@ -71,6 +75,17 @@ output: type: file description: index corresponding to sorted BAM file pattern: "*.bai" + - bqsr_table: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - "*.table": + type: file + description: (optional) table from base quality score recalibration calculation, + to be used with parabricks/applybqsr + pattern: "*.table" - versions: - versions.yml: type: file @@ -81,12 +96,6 @@ output: type: directory description: (optional) optional directory of qc metrics pattern: "qc_metrics" - - bqsr_table: - - "*.table": - type: file - description: (optional) table from base quality score recalibration calculation, - to be used with parabricks/applybqsr - pattern: "*.table" - duplicate_metrics: - duplicate-metrics.txt: type: file diff --git a/modules/nf-core/parabricks/fq2bam/tests/main.nf.test b/modules/nf-core/parabricks/fq2bam/tests/main.nf.test index 46d06322c32..8e4adb2966c 100644 --- a/modules/nf-core/parabricks/fq2bam/tests/main.nf.test +++ b/modules/nf-core/parabricks/fq2bam/tests/main.nf.test @@ -53,7 +53,7 @@ nextflow_process { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa', checkIfExists: true) ]) input[2] = BWA_INDEX.out.index - input[3] = [] + input[3] = [ [], [] ] input[4] = [] """ } @@ -88,7 +88,7 @@ nextflow_process { file('https://github.com/nf-core/test-datasets/raw/methylseq/reference/genome.fa', checkIfExists: true) ]) input[2] = BWA_INDEX.out.index - input[3] = [] + input[3] = [ [], [] ] input[4] = [] """ } @@ -119,7 +119,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) input[2] = BWA_INDEX_PE.out.index - input[3] = [] + input[3] = [ [], [] ] input[4] = [] """ } @@ -156,7 +156,7 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) input[2] = BWA_INDEX_PE.out.index - input[3] = [] + input[3] = [ [], [] ] input[4] = [] """ }