5 -- convert Conrad et al. (2011) validation table to VCF
8 local t
= l
:split('\t')
10 local c
= {t
[15], t
[16], t
[11], t
[12], t
[13], t
[14], t
[39], t
[40], 0, 0}
12 c
[9], c
[10] = c
[9] + t
[i
], c
[10] + t
[i
+1]
14 local tmp
= t
[5]:match('"(%S+)"')
15 if tmp
~= nil then t
[5] = tmp
end
16 if t
[2] == '23' then t
[2] = 'X' end
17 local o
= {t
[2], t
[3], t
[1], t
[4], t
[5]}
18 print(table.concat(o
, '\t'), 30, '.',
19 'Type='..t
[50]..';FLT='..t
[51]..';Set='..t
[6]..t
[7]..t
[8]..';CpG='..t
[49],
21 c
[1]..','..c
[2]..':'..t
[41]..','..t
[42],
22 c
[3]..','..c
[4]..':'..t
[43]..','..t
[44],
23 c
[5]..','..c
[6]..':'..t
[45]..','..t
[46],
24 c
[9]..','..c
[10]..':'..t
[47]..','..t
[48],
25 c
[7]..','..c
[8]..':0,0')
27 print('##fileformat=VCFv4.0')
28 print('#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA12878\tNA12891\tNA12892\tChildren\tNA12877')