Filtering a vcf based on known variants
1
0
Entering edit mode
6.6 years ago
idedios ▴ 30

I have a variant table with hg19 genomic coordinates that I want to use to filter a vcf. What is a good way to go about filtering the vcf assuming I am only looking for lines where the genomic coordinates match between the vcf file and my known variants table?

vcf • 2.1k views
ADD COMMENT
3
Entering edit mode
6.6 years ago
Alice ▴ 320

What are your file formats? You can use bedtools to intersect variants with coordinates, it can work with both -bed and -vcf files.

ADD COMMENT
0
Entering edit mode

As per Alice, you can use BEDTools; however, this will produce output that is not in VCF format.

If you still want to have the VCF format after you filter, then use bcftools filter --regions-file FILE (see Here for further information).

In both situations, your regions to filter should ideally be in BED format.

ADD REPLY

Login before adding your answer.

Traffic: 2544 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