一种快速的23andme原始基因组文件分析器
arv的Python项目详细描述
arv-一个用于python的快速23andme解析器
arv(挪威语;"heritage"或"heritance")是一个用于解析raw的python模块。 23和我的基因组文件。它允许您从rsid中查找snp。
fromarvimportload,unphased_matchasmatchgenome=load("genome.txt")print("You are a {gender} with {color} eyes and {complexion} skin.".format(gender="man"ifgenome.y_chromosomeelse"woman",complexion="light"ifgenome["rs1426654"]=="AA"else"dark",color=match(genome["rs12913832"],{"AA":"brown","AG":"brown or green","GG":"blue"})))
对于我的基因组,这个小程序产生:
You are a man with blue eyes and light skin.
解析器是非常快的,已经用精细的C++编写,暴露了 通过Cython。我测试过的2013款Xeon机器将一个24 MB的文件解析为一个哈希值 表在大约78毫秒内。较新的23andme文件较小,仅在一个 62毫秒!
与Python2.7+和3+一起使用。可与PIP一起安装!
$ pip install --upgrade arv
有关软件要求,请参见下文。