From 95b451b1b259b24c29b0f9453a521fcc2f1b92ba Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Mon, 27 May 2024 10:23:57 +0200 Subject: [PATCH] fix: bump mehari to v0.25.5 for bugs fixed there (#510) --- .../mehari/annotate_seqvars/wrapper.py | 18 ++++++++++++++---- .../wrappers/mehari/environment.yaml | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/snappy_wrappers/wrappers/mehari/annotate_seqvars/wrapper.py b/snappy_wrappers/wrappers/mehari/annotate_seqvars/wrapper.py index dce342909..ceea699b4 100644 --- a/snappy_wrappers/wrappers/mehari/annotate_seqvars/wrapper.py +++ b/snappy_wrappers/wrappers/mehari/annotate_seqvars/wrapper.py @@ -58,21 +58,31 @@ # Run actual tools -------------------------------------------------------------------------------- -# Extract around BED file, if given. +# Extract around BED file, if given. Otherwise, "just" normalize. if [[ -n "{export_config[path_exon_bed]}" ]] && [[ "{export_config[path_exon_bed]}" != "None" ]]; then set -e bcftools view \ -R {export_config[path_exon_bed]} \ {snakemake.input.vcf} \ + | bcftools norm \ + -m -any \ + --force \ + --fasta-ref {snakemake.config[static_data_config][reference][path]} \ | bcftools sort -T $TMPDIR \ - | bcftools norm -d all \ | bgzip -c \ > $TMPDIR/tmp.vcf.gz tabix -f $TMPDIR/tmp.vcf.gz else set -e - ln -sr {snakemake.input.vcf} $TMPDIR/tmp.vcf.gz - ln -sr {snakemake.input.vcf}.tbi $TMPDIR/tmp.vcf.gz.tbi + bcftools norm \ + -m -any \ + --force \ + --fasta-ref {snakemake.config[static_data_config][reference][path]} \ + {snakemake.input.vcf} \ + | bcftools sort -T $TMPDIR \ + | bgzip -c \ + > $TMPDIR/tmp.vcf.gz + tabix -f $TMPDIR/tmp.vcf.gz fi # Perform Mehari sequence variant annotation. diff --git a/snappy_wrappers/wrappers/mehari/environment.yaml b/snappy_wrappers/wrappers/mehari/environment.yaml index 1682b165a..8fb73b56b 100644 --- a/snappy_wrappers/wrappers/mehari/environment.yaml +++ b/snappy_wrappers/wrappers/mehari/environment.yaml @@ -5,7 +5,7 @@ dependencies: - bcftools==1.19 - htslib==1.19.1 - samtools==1.19.2 - - mehari==0.21.1 + - mehari==0.25.5 - jq==1.7.1 - vcfpy==0.13.8 - pysam==0.22.0