comparison vcf2lv.sh @ 2:885ba15c2564 draft

Uploaded
author saskia-hiltemann
date Mon, 03 Aug 2015 05:45:16 -0400
parents 1209f18a5a83
children 58815aed4ec3
comparison
equal deleted inserted replaced
1:1c6710924e80 2:885ba15c2564
17 FS="\t"; 17 FS="\t";
18 OFS="\t"; 18 OFS="\t";
19 count=0; 19 count=0;
20 20
21 #output new header 21 #output new header
22 print "variantId", "chromosome", "begin", "end", "varType", "reference", "alleleSeq", "xRef" 22 print "variantId", "chromosome", "begin", "end", "varType", "reference", "alleleSeq"
23 }{ 23 }{
24 24
25 if(substr($0,1,1)!="#" && $5 != "."){ #skip header or nonvariant entries (period in ALT column) 25 if(substr($0,1,1)!="#" && $5 != "."){ #skip header or nonvariant entries (period in ALT column)
26 26
27 # detect multivariants 27 # detect multivariants
83 alleleSeq=alt 83 alleleSeq=alt
84 } 84 }
85 85
86 #print output variant(s) 86 #print output variant(s)
87 87
88 if(chromosome != "chrM") 88 print count, chromosome, start, end, varType, reference, alleleSeq
89 print count, chromosome, start, end, varType, reference, alleleSeq, ""
90 89
91 count+=1 90 count+=1
92 } 91 }
93 } 92 }
94 }END{}' $vcffile > $outputfile 93 }END{}' $vcffile > $outputfile