Question: How can I make a BED file from a VCF file?
0
gravatar for VictoriaP
3 months ago by
VictoriaP0
South Africa/Cape Town/UCT
VictoriaP0 wrote:

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 files bedtools • 251 views
ADD COMMENTlink modified 3 months ago by Brice Sarver3.5k • written 3 months ago by VictoriaP0
1

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 REPLYlink written 3 months ago by RamRS28k

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 REPLYlink written 3 months ago by VictoriaP0
2
gravatar for Brice Sarver
3 months ago by
Brice Sarver3.5k
United States
Brice Sarver3.5k wrote:

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

ADD COMMENTlink written 3 months ago by Brice Sarver3.5k

Thank you! This site was really helpful!

ADD REPLYlink written 3 months ago by VictoriaP0

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 REPLYlink written 3 months ago by RamRS28k
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: 1558 users visited in the last hour