bcftools consensus overlapped variant
1
0
Entering edit mode
2.6 years ago
Ak ▴ 60

Recently I ran into an issue with 'bcftools consensus' as I kept getting overlapped variant.

putty

When I checked the vcf file, I noticed something like this.

putty2

So can anyone give some advice on this? Thanks.

Fyi, the command I've used was:

bcftools mpileup -Ou -f ref.fasta output.all.bam | bcftools call -Ou -mv | bcftools norm -f ref.fasta -m +any -Oz -o output.vcf.gz 
tabix output.vcf.gz
bcftools consensus -f ref.fasta output.vcf.gz > output.consensus.fasta
bcftools variant • 1.4k views
ADD COMMENT
0
Entering edit mode
2.6 years ago
iraun 6.2k

Since those 2 indels are overlapping (overlapping positions), bcf consensus cannot decide which one to use to reconstruct the fasta sequence.

One option is to parse the vcf before running consensus and treat the overlapping variants with one of the following criteria:

  1. Remove all the overlapping variants.
  2. Keep the first or last variant of the overlapping variants
  3. Keep the variant called with highest confidence of the overlapping variants.

I would recommend the option 3. For example, for the case you have posted, I would discard the first indel (position 2104), and keep the second (position 2105), since it has a higher IVD and IMF.

ADD COMMENT
0
Entering edit mode

Thanks for the suggestions! Definitely would want to try option 3. But do you know the command for me to do so? As I have about 2000 of these overlapping variant

ADD REPLY

Login before adding your answer.

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