This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to filter allele frequency of each sample with different Zygosity status (exclude likely non-germline variants)

Hello,

I have a multiple sample VCF file and I have to exclude likely non-germline variants based on allele frequency (AF). For example, allele A in Sample X was called as 0/1 but only with AF 25%, so I want to set the genotype of allele A in sample X to "./.".

just as what it dose for this webpage: https://www.goldenhelix.com/learning/knowledge-base/svs-introduction-to-ngs-tutorial/#3-quality-filters search "Zygosity Based Filtering"

The ultimate goal is to convert my vcf file to a genotype matrix. So if there is a way to do this filter in a genotype matrix format, it would also be great.

Thank you very much!

germline vcf filter zygosity

1 answer

I learned how to do it from this thread: Allele Depth (AD) / Allele Balance (AB) Filtering in GATK 4

Log in to answer this question.