How to convert bed file to vcf?
What is the best method of converting bed file to vcf? I have several bed files with different columns. Which tool allows to adapt of different bed files?
• 1,393 views
•
link
1 answer
use AWK, change the header, body according to your needs...
awk 'BEGIN {printf("##fileformat=VCFv4.2\n##INFO=<ID=END,Number=1,Type=Integer>\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n");} {printf("%s\t%s\t.\tN\tN\t.\t.\tEND=%d\n",$1,int($2)+1,$3);}' input.bed
• 0 views
•
link
Log in to answer this question.