How to force bcftools to call all variants
1
3
Entering edit mode
20 months ago
Hans ▴ 130

Hello I am using bcftools to call variants with this command:

bcftools mpileup   -Ou -b bamlist  -f ref.fasta  | bcftools call -Ob    -mv   >variant.bcf


However, for some specific variants that I know to exist (looking at bam files with IGV), I do not get variant calls. The read depth is shallow 3-4 reads per site. How do I force bcftools to output all possible variants, even tough they have low probability?

calling bcftools mpileup variant call • 2.0k views
0
Entering edit mode
20 months ago

There are some default parameters set like p-value < 0.5 and potentially others. Try setting these to higher values.

bcftools call -h


Another alternative is to not put the -v there at all, that way you'll get the genotype likelihoods for all positions (potentially a huge file)

2
Entering edit mode

I was trying to use the p-value > 0.5 option which is available only under the -c option, but it did not solve the problem.

I have added the FORMAT/AD and DP to the output, omitted the -v flag and added bcftools filter to the pipe and got the desired result. I can further look at the AD (allele depth) to decide which SNP is true.

bcftools mpileup  -a FORMAT/AD,FORMAT/DP  -Ou -b bamlist  -f ref.fasta  | bcftools call -Ou    -m   | bcftools filter -Ob -i 'F_MISSING<0.1&&MAF>0.1'  >variant.bcf

0
Entering edit mode

thanks for sharing the solution.