In [1]:
import ga4gh_client.client as client
c = client.HttpClient("http://1kgenomes.ga4gh.org")
In [2]:
for variant_annotation_sets in c.search_variant_annotation_sets(variant_set_id="WyIxa2dlbm9tZXMiLCJ2cyIsImZ1bmN0aW9uYWwtYW5ub3RhdGlvbiJd"):
print "\nName: {},".format(variant_annotation_sets.name)
print" Id: {},".format(variant_annotation_sets.id)
print" Variant Set Id: {},".format(variant_annotation_sets.variant_set_id)
print" Analysis Id: {},".format(variant_annotation_sets.analysis.id)
print" Analysis Created: {}\n".format(variant_annotation_sets.analysis.created)
for info in variant_annotation_sets.analysis.info:
print"{}: {}".format(info, variant_annotation_sets.analysis.info[info].values[0].string_value)
In [3]:
counter = 6
for variant_annotations in c.search_variant_annotations(variant_annotation_set_id="WyIxa2dlbm9tZXMiLCJ2cyIsImZ1bmN0aW9uYWwtYW5ub3RhdGlvbiIsImZ1bmN0aW9uYWwtYW5ub3RhdGlvbiJd", reference_name="1", start=0, end=1000000):
if counter <= 0:
break
counter -= 1
print"Id: {},".format(variant_annotations.id)
print" Variant Id: {},".format(variant_annotations.variant_id)
print" Variant Annotation Set Id: {}".format(variant_annotations.variant_annotation_set_id)
print" Created: {}".format(variant_annotations.created)
print" Transcript Effects Id: {},".format(variant_annotations.transcript_effects[0].id)
print" Featured Id: {},".format(variant_annotations.transcript_effects[0].feature_id)
print" Alternate Bases: {},".format(variant_annotations.transcript_effects[0].alternate_bases)
print" Effects Id: {},".format(variant_annotations.transcript_effects[0].effects[0].id)
print" Effect Term: {},".format(variant_annotations.transcript_effects[0].effects[0].term)
print" Effect Sorce Name: {},".format(variant_annotations.transcript_effects[0].effects[0].source_name)
print" Effect Source Version: {}\n".format(variant_annotations.transcript_effects[0].effects[0].source_version)
In [4]:
variant_annotation_set = c.get_variant_annotation_set(variant_annotation_set_id="WyIxa2dlbm9tZXMiLCJ2cyIsImZ1bmN0aW9uYWwtYW5ub3RhdGlvbiIsImZ1bmN0aW9uYWwtYW5ub3RhdGlvbiJd")
In [5]:
print"Name: {}".format(variant_annotation_set.name)
print" Id: {} ".format(variant_annotation_set.id)
print" Variant Set Id: {}".format(variant_annotation_set.variant_set_id)
print" Analysis Id: {},".format(variant_annotation_set.analysis.id)
print" Analysis Created: {},\n".format(variant_annotation_set.analysis.created)
for info in variant_annotation_set.analysis.info:
print"{}: {},".format(info, variant_annotation_set.analysis.info[info].values[0].string_value)
https://ga4gh-schemas.readthedocs.io/en/latest/schemas/allele_annotation_service.proto.html