How can I make a BED file from a VCF file?
1
2
Entering edit mode
4.0 years ago
VictoriaP ▴ 20

I have ~60 .vcf files with multiple viral insertion data. I need to create a bed file from these to use with bedtools.

How do I create a BED file from a VCF file/multiple VCF files?

BED Bedtools • 6.8k views
ADD COMMENT
1
Entering edit mode

BED and VCF are formats. Information content wise, VCF has more information than basic 3-field BED, so extracting a BED out of a VCF should be pretty straightforward.

The question here is - are you looking to extract one BED per VCF, or are you looking to combine the information content from the VCF and get a BED that represents some sort of operation on this information content? Perhaps a BED file with all variants found across any of the 60 VCF files or a BED file with variants found in all of the 60+ VCF files?

ADD REPLY
0
Entering edit mode

Thanks, I finally managed it. I needed to make a single BED file with all of the HERV viral insertion points identified from all of the 60+ files.

... Now to figure out how to properly use bedtools closest.

ADD REPLY
4
Entering edit mode
4.0 years ago
Brice Sarver ★ 3.8k

Check out vcf2bed in BEDOPS. You can also try searching this site for more advice.

ADD COMMENT
0
Entering edit mode

Thank you! This site was really helpful!

ADD REPLY
1
Entering edit mode

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they work.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

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