How to convert genomic region of following type to vcf file?
I have list of genomic co-ordinates as follows:
chr7:g.87053221C>T
chr9:g.133738306G>A
chr9:g.133738309A>G
chr9:g.133738325T>C
chr9:g.133738330A>G
chr9:g.133738340A>G
chr9:g.133738342C>G
I need to convert this to a vcf file and perform liftover to Grch38 coordinate? Are there any tools or codes available to perform this?
• 1,086 views
•
link
1 answer
tr ":.>" "\t" < input.txt | sed -r 's/([0-9]+)([ATGC]+)/\1\t\2/' | awk 'BEGIN{print("##fileformat=VCFv4.2");print("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO");} {printf("%s\t%s\t.\t%s\t%s\t.\t.\t.\n",$1,$3,$4,$5);}'
##fileformat=VCFv4.2
#CHROM POS ID REF ALT QUAL FILTER INFO
chr7 87053221 . C T . . .
chr9 133738306 . G A . . .
chr9 133738309 . A G . . .
chr9 133738325 . T C . . .
chr9 133738330 . A G . . .
chr9 133738340 . A G . . .
chr9 133738342 . C G . . .
• 0 views
•
link
Log in to answer this question.