Filtering VCF variants based on txt file with variants CHROM, POS and ID
1
0
Entering edit mode
2.6 years ago
avelarbio46 ▴ 30

Hello everyone!

Let's say I have a vcf file (version 4.2). Then, I have a list of variants that I want to exclude from my VCF file. This list is a TXT file containing 3 columns: chromosome, position and ID (dbsnp) where available.

For example, lets say I have the data from this database:

http://srv00.recas.ba.infn.it/atlas/download.html

Then I select the three columns of chromosome name, position and ID for dbsnp.

Is there anyway to remove these variants from my VCF files?

VCF • 879 views
ADD COMMENT
0
Entering edit mode
2.6 years ago
Ram 44k

You only need CHR and POS from the file. Use bcftools view -T ^file.txt. See: https://samtools.github.io/bcftools/bcftools.html#view

ADD COMMENT

Login before adding your answer.

Traffic: 1892 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6