Question: exclude variants based on position in vcf file
0
gravatar for goatsrunfaster
6 months ago by
goatsrunfaster20 wrote:

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 • 264 views
ADD COMMENTlink modified 6 months ago • written 6 months ago by goatsrunfaster20
1
gravatar for goatsrunfaster
6 months ago by
goatsrunfaster20 wrote:

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

ADD COMMENTlink written 6 months ago by goatsrunfaster20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1884 users visited in the last hour