This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Deblock a VCF

Hi all,

I am trying to deblock a gVCF file and it requires an input BED file. While I have the BED files for the standard genomes such as HG18/HG19 etc my question is how do I generate a BED file from the 1000 genomes reference fasta file or say from a custom reference fasta file?

Thanks in advance.

vcf

1 answer

Hi, getting the lenght of each chromosome of your reference genome (or fasta file), you can use bedtools makewindows to divide it in regions and represent them in bed format.

For example, to divide the human genome into windows of 1MB:

$ bedtools makewindows -g hg19.txt -w 1000000 > hg19_1Mb.bed

where hg19.txt, the file containing chromosome lengths, has the following tab delimited format:

chr1    249250621
chr2    243199373
...

Log in to answer this question.