Biostar Beta. Not for public use.
Filtering a vcf based on known variants
0
Entering edit mode
2.4 years ago
idedios • 30
USA/Irvine/NeoGenomics Laboratories

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 • 505 views
ADD COMMENTlink
3
Entering edit mode
24 months ago
Alice • 280
USA

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

ADD COMMENTlink
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 REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1