This notebook provides examples of the return values for the hgvs data provider
In [1]:
import datetime
import json
from hgvs.dataproviders.uta import connect
hdp = connect()
In [2]:
def json_encoder(o):
if isinstance(o, datetime.datetime):
return o.isoformat()
# o must be serializable
return o
def print_json(data):
if type(data) is list:
ddata = [dict(d) for d in data]
else:
ddata = dict(data)
return print(json.dumps(ddata, default=json_encoder, indent=4, sort_keys=True))
pj = print_json
In [3]:
pj(hdp.get_gene_info("VHL"))
In [4]:
hdp.get_seq("NM_199425.2")
Out[4]:
In [5]:
pj(hdp.get_tx_exons("NM_199425.2", "NC_000020.10", "splign"))
In [6]:
pj(hdp.get_tx_for_gene("VHL"))
In [7]:
pj(hdp.get_tx_for_region("NC_000020.10", "splign", 25059178, 25059588))
In [8]:
pj(hdp.get_tx_identity_info("NM_001256272.1"))
In [9]:
pj(hdp.get_tx_info("NM_001256272.1", "NC_000020.10", "splign"))
In [10]:
pj(hdp.get_tx_mapping_options("NM_001256272.1"))
In [11]:
pj(hdp.get_similar_transcripts("NM_001256272.1"))
In [12]:
hdp.get_pro_ac_for_tx_ac("NM_001256272.1")
Out[12]:
In [ ]: