How to force bcftools to call all variants
1
4
Entering edit mode
3.0 years ago
Hans ▴ 140

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 • 3.6k views
ADD COMMENT
0
Entering edit mode

Hi,

I have the same problem and i would also like to force call bcftools in order to get all the variants of my bam. also i am aware of some variants (examining the bam files with Tablet) but they are not called

I am using this command

bcftools mpileup -B -q30 -Q30 -f reference.fasta -a FORMAT/DP,FORMAT/AD --threads 6 -R list_of_specific_position.txt file.bam | bcftools call -m -f GQ -O v -o call_variant.vcf

I tried to apply the command you shared but it creates a file that I can't read. How can I do it? Do you have any suggestions?

tks for the help

Stefania

ADD REPLY
0
Entering edit mode

You should start relaxing the filters (if it was not apparent from the comment I added in other post you created). You are filtering things with -q and -Q options.

ADD REPLY
0
Entering edit mode
3.0 years 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)

ADD COMMENT
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
ADD REPLY
0
Entering edit mode

thanks for sharing the solution.

ADD REPLY

Login before adding your answer.

Traffic: 3088 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