Code:
cat file.vcf | \ awk -F $'\t' 'BEGIN {OFS=FS} {print $1,$2,$2,$4,$5,"","hg19"}' | \ sed 's/,\([ACGT]\)\t/\t\1/g' | \ grep -v "#" | \ awk 'NR==1{print "Chromosome\tStart_Position\tEnd_Position\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tNCBI_Build"}1' \ > file.maf
Leave a comment: