INNER CODE UNIT · Python
getRefSeqAnnot
ncbi/dbsnp · tutorials/rsjson_allele_info_demo.py:74
def getRefSeqAnnot(info):
'''
rs refseq info
'''
for idx in range(0, len(rs['alleles'])):
allele_annotation = info[idx]['assembly_annotation'][0]
# get only RefSeq annotation on NC
if (re.match('^NC_', allele_annotation['seq_id'])):
for g in allele_annotation['genes']:
# allele and annotation have same ordering
rs['alleles'][idx]['refseq_annot'] = g
for line in sys.stdin:
rs_obj = json.loads(line)
rs['id'] = rs_obj['refsnp_id']
if 'primary_snapshot_data' in rs_obj:
getPlacements(