GATK VCF to BED

2,055 views
Skip to first unread message

Adrian Johnson

unread,
Mar 15, 2011, 1:33:10 PM3/15/11
to bedtools...@googlegroups.com
Hi:
How can I convert GATK VCF file to a bed file. Is there a
functionality in BedTools, to do such conversion. Any help
appreicated.
thanks
Adrian

Vladimir Grubor

unread,
Mar 15, 2011, 1:57:37 PM3/15/11
to bedtools...@googlegroups.com
cat your_file.vcf |tail -n +12 |awk '{FS="\t";OFS="\t";print $1,$2-1,$2,$3, etc}' >your_file.bed

where:
tail removes the first 11 lines of the vcf header - change it to the number that suits you


Cheers,
Vlad




2011/3/15 Adrian Johnson <orioleb...@gmail.com>
Reply all
Reply to author
Forward
0 new messages