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 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?
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.
Check out vcf2bed in BEDOPS. You can also try searching this site for more advice.
Thank you! This site was really helpful!
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.