VAF filtering in bcftools caller
0
0
Entering edit mode
16 months ago
derealme • 0

Hello,

I'd like to filter germline mutations from BCF generated by bcftools calls. If I understand correctly there should be a VAF tag available to filter by, however when I try to add the VAF tag I get an error:

bcftools +fill-tags test.bcf  -- -t bcftools +fill-tags test.bcf  -- -t AF

Warning: cannot add the VAF/VAF1 annotations, the required FORMAT/AD tag is missing at chr1:10352.

and then when I try to add the AD tag I get:

Error parsing "--tags AD": the tag "AD" is not supported

what is the right way of adding VAF to variant calling bcf file (or mpileup)?

Thanks, D

bcftools VAF • 1.5k views
ADD COMMENT
0
Entering edit mode

You can't fill AD tag from VCF file. This tag is creating when you're calling variants from count of reads. Some people write AD field in INFO column, and you can carry it over to SAMPLE column first.

ADD REPLY
0
Entering edit mode

I see - so rerunning the mpileup this time requesting the AD tag will allow me later to add VAF? is this the right way?

ADD REPLY
1
Entering edit mode

Yes, if you did the variant call with bcftools, you can add the AD tag while doing the pileup with annotate parameter. https://samtools.github.io/bcftools/bcftools.html#mpileup

ADD REPLY
0
Entering edit mode

cool, thank you. So I'm doing the following:

bcftools mpileup --redo-BAQ --per-sample-mF -f ref.fa.gz sample.bam -a FORMAT/AD,FORMAT/ADF,FORMAT/ADR,FORMAT/DP,FORMAT/SP,FORMAT/SCR,INFO/AD,INFO/ADF,INFO/ADR,INFO/SCR,FORMAT/DV,FORMAT/DP4,FORMAT/DPR,INFO/DPR | bcftools call --multiallelic-caller --variants-only -Ou -o calls.bcf

bcftools +fill-tags calls.bcf -- -t VAF

would that work? also, to exclude potential germline variants, roughly what VAF should I filter out?

ADD REPLY
1
Entering edit mode

Just FORMAT/AD should be enough for VAF. Also, bcftools give example of VAF command like so: https://samtools.github.io/bcftools/howtos/plugin.fill-tags.html

bcftools +fill-tags in.bcf -Ob -o out.bcf -- -t FORMAT/VAF
ADD REPLY

Login before adding your answer.

Traffic: 2440 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6