Parsing ANNOVAR

A new approach @CINECA

  • Using mETL package
  • Configuration file is in YAML format through python library

In [1]:
# Init the magic
from magic.config import conf
from magic.app import App

Define what you need


In [2]:
# Configuration
input_file = "input/test/test_annovar.hg19.tsv"
conf.add_field("Chr")
conf.add_field("Start")
conf.add_field("End")

Run!

Execute the parser command with the configuration obtained from fields specified above.


In [3]:
# Do it
data = App(input_file, conf).run()

The result is an array with all rows parsed. This print is limited to the first 4 elements.


In [4]:
# DEBUG
print(data[:4])


[(1, u'chr1', u'10385471', u'10385471'), (2, u'chr1', u'17722363', u'17722363'), (3, u'chr1', u'45796269', u'45796269'), (4, u'chr1', u'45798555', u'45798555')]