How to convert bed file to vcf?
1
1
Entering edit mode
10 months ago
herh ▴ 10

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?

vcf bed • 525 views
ADD COMMENT
2
Entering edit mode
10 months ago

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
ADD COMMENT

Login before adding your answer.

Traffic: 3720 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6