bcftools
bcftools copied to clipboard
Quick Question - Bcftools Consensus for Indels
Hello,
Let's say I want to call a consensus with two conditions:
- Don't assume reference when variant is missing, print N.
- At heterozygous sites, print the longer allele, if they are the same length, print the ALT
bcftools consensus -f Reference.fasta Filt.vcf.gz --absent N -H LA > consensus.fasta
An example site would look like this:
SUPER_1 168991 . T TAGAAG
But I get errors saying that I have "overlapping variants". In this case, will bcftools incorporate TAGAAG as the call?
The goal is to print the insertion as the call in the consensus in this case. I should note that the reference is a different species, so there are expected to be many indels which are informative. I can normalize this vcf like so: but I'm unsure if this will print the insertions and deletions like I want in the consensus:
bcftools norm --atom-overlaps '*' -f Reference.fasta -m +any Filt.vcf.gz -O z -o Normalized.vcf.gz