This is a test version of Biostars. For the public version, visit https://www.biostars.org.
exclude variants based on position in vcf file

I have a list of positions (POS) in a text file I would like to remove from a .vcf file. What is the simplest way to do this? I have tried:

vcftools --vcf cluster_1_private.vcf --exclude remove_poly_1.txt --recode --recode-INFO-all --out cluster_1_fixed

but this doesnt seem to work, but note the text file only contains a list of numbers such as:

3416

14547

55489

56775

66521

91512

Maybe I need to specify the POS somehow?

snp

1 answer

Figure it out:

vcftools --vcf cluster_1_private.vcf --exclude-positions remove_poly_1.txt --recode --recode-INFO-all --out cluster_1_fixed

text file needs to be a tab-separated list of chromosome and positions

Log in to answer this question.