Source

utils / vcf2gen.py

Full commit
import sys

for line in open(sys.argv[1]):
  if line[:2] == '##': continue
  if line[0] == '#':
    f = line.strip().split('\t')[9:]
    print '\t'.join(f)
  else:
    s = [x[:3] for x in line.strip().split('\t')[9:]]
    print '\t'.join([x for x in s])