This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bcftools allele frequency

Dear all

Can you please help me analysing a VCF file. I want to use bcftools isec option to check the difference in values in allele frequency for two VCF files at common locations. So can you please help me with the parameters?

vcf bcftools allel isec

1 answer

 join -t, -1 1 -2 1  \
           <(bcftools query -f '%CHROM-%POS-%REF-%ALT,%INFO/AF\n' input1.vcf | sort -t, -k1,1)  \
           <(bcftools query -f '%CHROM-%POS-%REF-%ALT,%INFO/AF\n' input2.vcf | sort -t, -k1,1)

Thank you so much. So this will extract the allele frequency in the two vcf files based on matching positions? But how do I find if their values are different?

It it answered your question , please validate (green mark on the left) to close the question.

Log in to answer this question.