This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Remove polymorphic SNPs from VCF file

I have a vcf file I filtered based on groups, and now I want to filter it again so it only contains fixed differences from the reference (e.g. remove all polymorphic loci within the set). Is there a straightforward way to do this?

snp

For example with the following VCF:

Chromosome 1 . T G . PASS AC=5;AN=5 GT 1 1 1 1 1

Chromosome 2 . T C . PASS AC=5;AN=5 GT 1 1 1 1 1

Chromosome 3 . C T . PASS AC=2;AN=5 GT 0 0 1 1 0

Chromosome 4 . G T . PASS AC=5;AN=5 GT 1 1 1 1 1

I want to keep Chromosomes like 1, 2, and 4, but exclude those like 3, for a much larger dataset.

1 answer

Hello, I also need to filter polymorphic SNP, how did you finally solve it

Log in to answer this question.