人类基因组构建hg19的实用程序
pyhg19的Python项目详细描述
PYHG19
从变量的rsid中获取变量的坐标,或从变量的rsid中获取变量的坐标。 坐标
安装
首先,请确保遵循了
pydbsnp。然后安装pyhg19
使用pip3
:
pip3 install pyhg19
或
pip3 install --user pyhg19
对于完整的功能,您应该适当地设置环境变量
PYHG19_PATH
,PYHG19_MASKED
,PYHG19_BOWTIE2_INDEX
。例如,你可以
将此添加到您的.bash_profile
:
exportPYHG19_PATH=<path of your choice> exportPYHG19_MASKED=<path of your choice> exportPYHG19_BOWTIE2_INDEX=<path of your choice>
示例
importpyhg19rs10_coord=pyhg19.coord('rs10')print(f'rs10 is on chromosome {rs10_coord.chr} at position {rs10_coord.pos}')rs10_coord_tuple=pyhg19.coord_tuple('rs10')print('rs10 is on chromosome {} at position {}'.format(rs10_coord_tuple[0],rs10_coord_tuple[1]))rs_something=pyhg19.rsid(chr=1,pos=10019)print('The RSID of the variant on chromosome 1 at position 10019 is {}.'.format(rs_something))