Skip to content

Commit

Permalink
using "bcftools norm" before mehari
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed May 16, 2024
1 parent c0281a6 commit a56bb6d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions snappy_wrappers/wrappers/mehari/annotate_seqvars/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a56bb6d

Please sign in to comment.