This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to use bcftools query -f to extract three alleles from multisample vcf file

Hi,

I have exome capture data for parents and aligned them to reference seq separately, and got SNPs/indels between each parent and reference. Now, I want to find SNPs/indels between to parents and for that I aligned sorted duplications-marked bam files of parents to reference again, but when I opened vcf file, there were only SNPs/indels between parent1 and reference. I think I made a mistake to extract specific columns from the vcf file (below).

bcftools
-f '%CHROM\t%POS\t%REF\t%ALT{0}\t%QUAL\t%INFO/DP\t%INFO/RO\t%INFO/AO{0}[\t%GT\t%DP\t%RO\t%AO{0}]\n' \

Based on a code above am I extracting only t%REF and t%ALT{0}? If yes, how should I indicate that I need SNPs/indels between reference, parent1 and parent2?

Thanks

alignment

Thanks! Submitted the job with minor changes again. If it does not work, will try. Appreciate !

1 answer

if you already have exome data from each parent, if you have aligned it, and you have called variants, then you would have already ended up with 2 bam files and 2 vcf files.

if you need now to compare variants among them you don't have to map them again. you just have to compare the vcf files you already have, and bcftools isec should be enough.

Log in to answer this question.