From 8e3b286976ce3fd5b43ff27a537e60ceb6684592 Mon Sep 17 00:00:00 2001 From: jonca79 <54137490+jonca79@users.noreply.github.com> Date: Thu, 25 May 2023 14:42:22 +0200 Subject: [PATCH 1/2] fix: indexed bam files can now be put as input The program needs an indexed bam file but when the bai file is put in input in the Snakemake rule it will be used as a --resource and the program crashes. This fixes this bug. --- bio/gatk/variantannotator/wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bio/gatk/variantannotator/wrapper.py b/bio/gatk/variantannotator/wrapper.py index 5baf8591f4..e8b4150c49 100644 --- a/bio/gatk/variantannotator/wrapper.py +++ b/bio/gatk/variantannotator/wrapper.py @@ -32,7 +32,7 @@ resources = [ f"--resource:{name} {file}" for name, file in snakemake.input.items() - if name not in ["vcf", "aln", "ref", "known", "intervals"] + if name not in ["vcf", "aln", "ref", "known", "intervals", "bai"] ] From 9b38127a1a6c1778c82e9bd976268119bed3d0eb Mon Sep 17 00:00:00 2001 From: jonca79 <54137490+jonca79@users.noreply.github.com> Date: Thu, 25 May 2023 15:23:51 +0200 Subject: [PATCH 2/2] test: added bai file to test example --- bio/gatk/variantannotator/test/Snakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/bio/gatk/variantannotator/test/Snakefile b/bio/gatk/variantannotator/test/Snakefile index 1aa6d4ee44..e9eab68b9d 100644 --- a/bio/gatk/variantannotator/test/Snakefile +++ b/bio/gatk/variantannotator/test/Snakefile @@ -2,6 +2,7 @@ rule gatk_annotator: input: vcf="calls/snvs.vcf.gz", aln="mapped/a.bam", + bai="mapped/a.bam.bai", ref="genome.fasta", db="calls/snvs.vcf.gz", # intervals="targets.bed",