From 73aaecbc3ae62a124e1148b68b1a69dcfd9db0ed Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Tue, 15 Mar 2022 11:02:40 -0500 Subject: [PATCH] Add BAM indexes as input for optitype module. (#1388) --- modules/optitype/main.nf | 2 +- modules/optitype/meta.yml | 4 ++++ tests/config/test_data.config | 3 ++- tests/modules/optitype/main.nf | 3 ++- tests/modules/optitype/test.yml | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/optitype/main.nf b/modules/optitype/main.nf index 984d4669..b6a3e200 100644 --- a/modules/optitype/main.nf +++ b/modules/optitype/main.nf @@ -8,7 +8,7 @@ process OPTITYPE { 'quay.io/biocontainers/optitype:1.3.5--0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai) output: tuple val(meta), path("${prefix}"), emit: output diff --git a/modules/optitype/meta.yml b/modules/optitype/meta.yml index 4cacadda..9ca10774 100644 --- a/modules/optitype/meta.yml +++ b/modules/optitype/meta.yml @@ -22,6 +22,10 @@ input: type: file description: BAM file pattern: "*.{bam}" + - bai: + type: file + description: BAM index file + pattern: "*.{bai}" output: - meta: diff --git a/tests/config/test_data.config b/tests/config/test_data.config index ed1e2861..0d61d1e9 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -192,7 +192,8 @@ params { test_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test.paired_end.umi_unsorted.bam" test_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test.paired_end.unsorted_tagged.bam" test_paired_end_hla = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.bam" - + test_paired_end_hla_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam" + test_paired_end_hla_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam.bai" test2_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam" test2_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai" test2_paired_end_name_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.name.sorted.bam" diff --git a/tests/modules/optitype/main.nf b/tests/modules/optitype/main.nf index 55b46f0a..6ed14d96 100644 --- a/tests/modules/optitype/main.nf +++ b/tests/modules/optitype/main.nf @@ -6,7 +6,8 @@ include { OPTITYPE } from '../../../modules/optitype/main.nf' workflow test_optitype { input = [ [ id:'test', seq_type:'dna' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_hla'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_hla_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_hla_sorted_bam_bai'], checkIfExists: true) ] OPTITYPE ( input ) diff --git a/tests/modules/optitype/test.yml b/tests/modules/optitype/test.yml index bb493077..0cbb99cb 100644 --- a/tests/modules/optitype/test.yml +++ b/tests/modules/optitype/test.yml @@ -6,4 +6,4 @@ - path: output/optitype/test/test_coverage_plot.pdf - path: output/optitype/test/test_result.tsv contains: - - "1446" + - "1439"