This is a test version of Biostars. For the public version, visit https://www.biostars.org.
remove private alleles from a vcf file

Hello

is there an inbuild way to remove singletons from a vcf file? I would just really need to use vcf tools to just exclude them from the vcf file and than recode it into a new vcf file without the singleton variants.

The problem is that --singletons only uses the positions fo the singletons

snp

Could you use the output of --singletons as an input file for vcftools --positions option?

2 answers

vcflib has a tool called vcffilter that can be used to do what you are asking.


https://github.com/ekg/vcflib

In vcftools, you could just use a small MAF to achieve this. Something like --maf 0.0001 would achieve what you need (assuming you have fewer than 5000 samples).

Clever solution, although this would miss any "private doubletons" in the dataset.

Is MAF minimum or maximum allele frequency and what would I set it at for 88 samples?

Log in to answer this question.