Example bot to replicate the statement added to Wikidata

Load the libraries


In [41]:
from wikidataintegrator import wdi_core, wdi_login
from wikidataintegrator.ref_handlers import update_retrieved_if_new_multiple_refs
import pandas as pd
import numpy as np
import requests

In [7]:
df = pd.read_csv('https://search.clinicalgenome.org/kb/gene-validity.csv', skiprows=6, header=None)     
df


Out[7]:
0 1 2 3 4 5 6 7
0 A2ML1 HGNC:23336 Noonan syndrome with multiple lentigines MONDO_0007893 SOP5 No Reported Evidence https://search.clinicalgenome.org/kb/gene-vali... 2018-06-07T14:37:47.175Z
1 A2ML1 HGNC:23336 cardiofaciocutaneous syndrome MONDO_0015280 SOP5 No Reported Evidence https://search.clinicalgenome.org/kb/gene-vali... 2018-06-07T14:31:03.696Z
2 A2ML1 HGNC:23336 Costello syndrome MONDO_0009026 SOP5 No Reported Evidence https://search.clinicalgenome.org/kb/gene-vali... 2018-06-07T14:34:05.324Z
3 A2ML1 HGNC:23336 Noonan syndrome MONDO_0018997 SOP5 Disputed https://search.clinicalgenome.org/kb/gene-vali... 2018-06-07T14:23:53.157Z
4 A2ML1 HGNC:23336 Noonan syndrome-like disorder with loose anage... MONDO_0011899 SOP5 No Reported Evidence https://search.clinicalgenome.org/kb/gene-vali... 2018-06-07T14:40:11.599Z
5 AARS HGNC:20 undetermined early-onset epileptic encephalopathy MONDO_0018614 SOP6 Limited https://search.clinicalgenome.org/kb/gene-vali... 2018-11-20T17:00:00.000Z
6 ABCC9 HGNC:60 hypertrichotic osteochondrodysplasia Cantu type MONDO_0009406 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-09-27T00:00:00
7 ABCD1 HGNC:61 X-linked cerebral adrenoleukodystrophy MONDO_0010247 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-02-07T14:00:00
8 ABHD12 HGNC:15868 PHARC syndrome MONDO_0012984 SOP5 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-06-28T16:45:15.791Z
9 ACAD8 HGNC:87 isobutyryl-CoA dehydrogenase deficiency MONDO_0012648 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-04-26T16:00:00.000Z
10 ACAD9 HGNC:21497 acyl-CoA dehydrogenase 9 deficiency MONDO_0012624 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-03-27T16:00:00.000Z
11 ACADL HGNC:88 long chain acyl-CoA dehydrogenase deficiency MONDO_0020531 SOP6 Disputed https://search.clinicalgenome.org/kb/gene-vali... 2018-09-25T16:00:00.000Z
12 ACADM HGNC:89 medium chain acyl-CoA dehydrogenase deficiency MONDO_0008721 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-01-23T17:00:00.000Z
13 ACADS HGNC:90 short chain acyl-CoA dehydrogenase deficiency MONDO_0008722 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-01-23T17:00:00.000Z
14 ACADSB HGNC:91 2-methylbutyryl-CoA dehydrogenase deficiency MONDO_0012392 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-03-22T16:00:00.000Z
15 ACADVL HGNC:92 very long chain acyl-CoA dehydrogenase deficiency MONDO_0008723 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-02-20T17:00:00.000Z
16 ACAT1 HGNC:93 beta-ketothiolase deficiency MONDO_0008760 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-05-22T16:00:00.000Z
17 ACSL4 HGNC:3571 non-syndromic X-linked intellectual disability MONDO_0019181 SOP4 Moderate https://search.clinicalgenome.org/kb/gene-vali... 2017-10-20T00:00:00
18 ACTA1 HGNC:129 hypertrophic cardiomyopathy MONDO_0005045 SOP4 No Reported Evidence https://search.clinicalgenome.org/kb/gene-vali... false
19 ACTA2 HGNC:130 familial thoracic aortic aneurysm and aortic d... MONDO_0019625 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2016-09-27T00:00:00
20 ACTC1 HGNC:143 hypertrophic cardiomyopathy MONDO_0005045 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-10-23T14:00:00
21 ACTG1 HGNC:144 nonsyndromic genetic deafness MONDO_0019497 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-01-07T17:00:00.000Z
22 ACTG1 HGNC:144 Baraitser-winter syndrome 2 MONDO_0013812 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-01-07T17:00:00.000Z
23 ACTN2 HGNC:164 intrinsic cardiomyopathy MONDO_0000591 SOP5 Moderate https://search.clinicalgenome.org/kb/gene-vali... 2018-08-06T13:12:55.615Z
24 ACVRL1 HGNC:175 telangiectasia, hereditary hemorrhagic, type 2 MONDO_0010880 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-08-28T16:00:00.000Z
25 ADCY1 HGNC:232 autosomal recessive nonsyndromic deafness MONDO_0019588 SOP4 Limited https://search.clinicalgenome.org/kb/gene-vali... 2017-05-10T00:00:00
26 ADGRV1 HGNC:17416 Usher syndrome type 2C MONDO_0011558 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-02-15T00:00:00
27 ADGRV1 HGNC:17416 nonsyndromic genetic deafness MONDO_0019497 SOP6 Disputed https://search.clinicalgenome.org/kb/gene-vali... 2019-03-19T16:00:00.000Z
28 AFF2 HGNC:3776 FRAXE intellectual disability MONDO_0010659 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-10-20T00:00:00
29 AGTR2 HGNC:338 non-syndromic X-linked intellectual disability MONDO_0019181 SOP4 Disputed https://search.clinicalgenome.org/kb/gene-vali... 2016-11-16T00:00:00
... ... ... ... ... ... ... ... ...
767 TUBB4B HGNC:20771 Leber congenital amaurosis with early-onset de... MONDO_0060650 SOP6 Moderate https://search.clinicalgenome.org/kb/gene-vali... 2018-06-26T16:00:00.000Z
768 UBE2A HGNC:12472 syndromic X-linked intellectual disability Nas... MONDO_0010461 SOP5 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-07-13T13:49:34.109Z
769 UBE3A HGNC:12496 Angelman syndrome MONDO_0007113 SOP5 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-05-02T13:23:44.716Z
770 UPF3B HGNC:20439 complex neurodevelopmental disorder MONDO_0100038 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-07-03T20:14:44.825Z
771 USH1C HGNC:12597 Usher syndrome type 1 MONDO_0010168 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-02-15T00:00:00
772 USH1C HGNC:12597 nonsyndromic genetic deafness MONDO_0019497 SOP6 Limited https://search.clinicalgenome.org/kb/gene-vali... 2018-06-11T04:00:00.000Z
773 USH1G HGNC:16356 Usher syndrome type 1 MONDO_0010168 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-02-15T00:00:00
774 USH1G HGNC:16356 nonsyndromic genetic deafness MONDO_0019497 SOP6 Disputed https://search.clinicalgenome.org/kb/gene-vali... 2019-05-21T16:00:00.000Z
775 USH2A HGNC:12601 Usher syndrome type 2 MONDO_0016484 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-02-15T00:00:00
776 VCL HGNC:12665 hypertrophic cardiomyopathy MONDO_0005045 SOP4 Limited https://search.clinicalgenome.org/kb/gene-vali... 2017-06-01T00:00:00
777 VHL HGNC:12687 hereditary pheochromocytoma-paraganglioma MONDO_0017366 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-06-16T00:00:00
778 VPS13B HGNC:2183 Cohen syndrome MONDO_0008999 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-11-13T15:34:57.342Z
779 VPS8 HGNC:29122 arthrogryposis multiplex congenita MONDO_0015168 SOP4 Limited https://search.clinicalgenome.org/kb/gene-vali... 2016-11-24T00:00:00
780 WAS HGNC:12731 Wiskott-Aldrich syndrome MONDO_0010518 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-10-12T20:54:25.459Z
781 WBP2 HGNC:12738 autosomal recessive nonsyndromic deafness MONDO_0019588 SOP6 Limited https://search.clinicalgenome.org/kb/gene-vali... 2018-12-09T17:00:00.000Z
782 WDR45 HGNC:28912 complex neurodevelopmental disorder MONDO_0100038 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2019-06-18T18:00:00.000Z
783 WFS1 HGNC:12762 Wolfram syndrome MONDO_0018105 SOP5 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-09-11T18:54:09.174Z
784 WFS1 HGNC:12762 Wolfram-like syndrome MONDO_0013673 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-04-17T04:00:00.000Z
785 WHRN HGNC:16361 Usher syndrome type 2D MONDO_0012662 SOP4 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2017-05-10T00:00:00
786 WHRN HGNC:16361 nonsyndromic genetic deafness MONDO_0019497 SOP6 Moderate https://search.clinicalgenome.org/kb/gene-vali... 2018-12-26T17:00:00.000Z
787 WRAP53 HGNC:25522 dyskeratosis congenita MONDO_0015780 SOP4 Moderate https://search.clinicalgenome.org/kb/gene-vali... 2017-01-25T00:00:00
788 WRN HGNC:12791 Werner syndrome MONDO_0010196 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-10-09T17:00:00.000Z
789 XPA HGNC:12814 xeroderma pigmentosum group A MONDO_0010210 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-11-02T21:36:51.734Z
790 XPC HGNC:12816 xeroderma pigmentosum group C MONDO_0010211 SOP6 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-11-02T21:42:21.860Z
791 XRCC2 HGNC:12829 hereditary breast carcinoma MONDO_0016419 SOP4 Limited https://search.clinicalgenome.org/kb/gene-vali... 2017-05-10T00:00:00
792 XRCC2 HGNC:12829 familial ovarian cancer MONDO_0016248 SOP4 No Reported Evidence https://search.clinicalgenome.org/kb/gene-vali... 2017-04-26T00:00:00
793 XRCC4 HGNC:12831 hereditary nonpolyposis colon cancer MONDO_0018630 SOP4 Limited https://search.clinicalgenome.org/kb/gene-vali... 2017-05-08T00:00:00
794 ZEB2 HGNC:14881 Mowat-Wilson syndrome MONDO_0009341 SOP5 Definitive https://search.clinicalgenome.org/kb/gene-vali... 2018-05-24T12:34:43.951Z
795 ZNF292 HGNC:18410 complex neurodevelopmental disorder MONDO_0100038 SOP6 Limited https://search.clinicalgenome.org/kb/gene-vali... 2019-01-15T17:00:00.000Z
796 ZNF81 HGNC:13156 non-syndromic X-linked intellectual disability MONDO_0019181 SOP5 Disputed https://search.clinicalgenome.org/kb/gene-vali... 2018-06-28T18:56:10.060Z

797 rows × 8 columns

login section


In [35]:
print("Logging in...")
#if "WDUSER" in os.environ and "WDPASS" in os.environ:
#    WDUSER = os.environ['WDUSER']
#    WDPASS = os.environ['WDPASS']
#else:
#    raise ValueError("WDUSER and WDPASS must be specified in local.py or as environment variables")
login = wdi_login.WDLogin("<username>", "<password>")


Logging in...
https://www.wikidata.org/w/api.php
Successfully logged in as Andrawaag

set variables


In [6]:
# Retrieve the QID for the 
HGNC = "A2ML1"

sparqlQuery = "SELECT * WHERE {?gene wdt:P353 \""+HGNC+"\"}"
result = wdi_core.WDItemEngine.execute_sparql_query(sparqlQuery)

HGNC_qid = result["results"]["bindings"][0]["gene"]["value"].replace("http://www.wikidata.org/entity/", "")
HGNC_qid


Out[6]:
'Q18051234'

In [43]:
MONDO = "MONDO_0009026".replace("_", ":")
sparqlQuery = "SELECT * WHERE {?disease wdt:P5270 \""+MONDO+"\"}"
result = wdi_core.WDItemEngine.execute_sparql_query(sparqlQuery)

MONDO_qid = result["results"]["bindings"][0]["disease"]["value"].replace("http://www.wikidata.org/entity/", "")
MONDO_qid


Out[43]:
'Q1136492'

In [44]:
from datetime import datetime
import copy
def create_reference():
    refStatedIn = wdi_core.WDItemID(value="Q64403342", prop_nr="P248", is_reference=True)
    timeStringNow = datetime.now().strftime("+%Y-%m-%dT00:00:00Z")
    refRetrieved = wdi_core.WDTime(timeStringNow, prop_nr="P813", is_reference=True)
    refURL = wdi_core.WDUrl(value="https://search.clinicalgenome.org/kb/gene-validity/d910a9d8-516e-443d-acba-8d61f7574792--2018-06-07T14:23:53", prop_nr="P854", is_reference=True)

    return [refStatedIn, refRetrieved, refURL]

In [38]:
reference = create_reference()
statement = [wdi_core.WDItemID(value=MONDO_qid, prop_nr="P2293", references=[copy.deepcopy(reference)])]

In [45]:
#wikidata_item = wdi_core.WDItemEngine(wd_item_id=HGNC_qid,data=statement, append_value=["P2293"])
wikidata_item = wdi_core.WDItemEngine(wd_item_id=HGNC_qid)
wikidata_item.get_wd_json_representation()


Out[45]:
{'labels': {'en': {'language': 'en', 'value': 'A2ML1'},
  'fr': {'language': 'fr', 'value': 'A2ML1'},
  'nl': {'language': 'nl', 'value': 'A2ML1'},
  'srn': {'language': 'srn', 'value': 'A2ML1'},
  'de': {'language': 'de', 'value': 'A2ML1'},
  'it': {'language': 'it', 'value': 'A2ML1'},
  'pt': {'language': 'pt', 'value': 'A2ML1'},
  'es': {'language': 'es', 'value': 'A2ML1'},
  'sv': {'language': 'sv', 'value': 'A2ML1'},
  'uk': {'language': 'uk', 'value': 'A2ML1'},
  'ar': {'language': 'ar', 'value': 'A2ML1'}},
 'descriptions': {'en': {'language': 'en',
   'value': 'protein-coding gene in the species Homo sapiens'},
  'fr': {'language': 'fr', 'value': "gène de l'espèce Homo sapiens"},
  'nl': {'language': 'nl', 'value': 'gen van de soort Homo sapiens'},
  'it': {'language': 'it', 'value': 'gene umano'},
  'de': {'language': 'de', 'value': 'Gen der Spezies Homo sapiens'},
  'pt': {'language': 'pt', 'value': 'gene da espécie Homo sapiens'},
  'es': {'language': 'es', 'value': 'gen de la especie Homo sapiens'},
  'srn': {'language': 'srn', 'value': 'gen fu a sortu Homo sapiens'},
  'sv': {'language': 'sv', 'value': 'Genen från arten Homo sapiens'},
  'ar': {'language': 'ar', 'value': 'جين من أنواع جينات الإنسان العاقل'},
  'uk': {'language': 'uk', 'value': 'білок-кодуючий ген Homo Sapiens'},
  'sq': {'language': 'sq', 'value': 'gjen i llojit Homo sapiens'},
  'zh': {'language': 'zh', 'value': '位於12號人類染色體的基因'}},
 'claims': {'P351': [{'mainsnak': {'snaktype': 'value',
     'property': 'P351',
     'datavalue': {'value': '144568', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$FA31B124-5397-4AF8-BCB1-CD8A46D0B716'}],
  'P279': [{'mainsnak': {'snaktype': 'value',
     'property': 'P279',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 20747295,
       'id': 'Q20747295'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 27975061,
           'id': 'Q27975061'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': '0835e0f7d54bd504f23350c0a097e602803ccb16'}],
    'id': 'Q18051234$529335C1-8B65-4517-BB2F-242E958F55B7'}],
  'P594': [{'mainsnak': {'snaktype': 'value',
     'property': 'P594',
     'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$CCE936D8-8D5C-48A1-8591-44345E132527'}],
  'P704': [{'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000545850', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$96179B7E-7B00-44CD-BC3C-CAEF18A36D46'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000299698', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$88C67E97-2549-4FAD-AD3D-C140077CE647'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000536789', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$1CDE3B14-056F-43F1-A005-A2F7CECE79F4'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000537475', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$6A786D23-7026-4503-BCCE-75B7DE027E30'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000537546', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$9F6211CF-97BD-495A-97B8-4783CCB26BEC'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000539547', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$FA120D5F-AA7A-4B34-BBFB-747055FC0816'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000540049', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$91EB4134-D22D-4C33-B0D7-8AC4B0FCD6EA'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000541459', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$2FD7FDEF-A174-4D6B-A09D-22DD7A7E6598'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P704',
     'datavalue': {'value': 'ENST00000545692', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$7E1EDF05-17DA-4FC7-BD7C-8D8C808FA008'}],
  'P353': [{'mainsnak': {'snaktype': 'value',
     'property': 'P353',
     'datavalue': {'value': 'A2ML1', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$8C7AACF5-8DFC-4435-8534-99A0BBBE9F1D'}],
  'P354': [{'mainsnak': {'snaktype': 'value',
     'property': 'P354',
     'datavalue': {'value': '23336', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$0356077D-FAD8-4815-AB27-B60407F9D73A'}],
  'P593': [{'mainsnak': {'snaktype': 'value',
     'property': 'P593',
     'datavalue': {'value': '67167', 'type': 'string'},
     'datatype': 'string'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$F02BF672-6E80-4C4C-A466-FD68C155DF99'}],
  'P639': [{'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XR_931275', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$2EBC9B1A-BAB4-45D0-B136-A89D71B177D3'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'NM_001282424', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$A22C9307-B7C3-452B-BCD2-3CFC086B94D1'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'NM_144670', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$51B1CB84-C512-4F9B-8DF9-63AB8EB247CF'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XM_011520566', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$6CD15CB4-153B-45D0-AEE3-1F49F3201175'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XM_011520567', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$2CD34515-6033-4A51-AB4B-A565C665D7C4'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XM_017018868', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$66762F95-1169-4DAC-AD82-BE4431311084'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XM_017018869', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$7F28F684-E9E2-4F68-A70B-528FD616E4B0'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XM_017018870', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$D401A468-80E2-4B38-9E77-5AEA0F348C80'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P639',
     'datavalue': {'value': 'XR_001748594', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-05-10T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '38e991b816d8cfb0ddc7caa2626210ed8e351485'}],
    'id': 'Q18051234$A1B9D2E7-232B-4713-943C-904C709E4193'}],
  'P688': [{'mainsnak': {'snaktype': 'value',
     'property': 'P688',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 21115074,
       'id': 'Q21115074'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 905695,
           'id': 'Q905695'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2017-07-06T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P352': [{'snaktype': 'value',
         'property': 'P352',
         'datavalue': {'value': 'A8K2U0', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P352'],
      'hash': 'c4860ba138cc4753f6d9480d6633fd57b3e13594'}],
    'id': 'Q18051234$1580E965-127F-4873-A98C-9F8BB29923F4'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P688',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 21152284,
       'id': 'Q21152284'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 905695,
           'id': 'Q905695'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P352': [{'snaktype': 'value',
         'property': 'P352',
         'datavalue': {'value': 'H0YGG5', 'type': 'string'},
         'datatype': 'external-id'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2016-03-21T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P407': [{'snaktype': 'value',
         'property': 'P407',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 1860,
           'id': 'Q1860'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}]},
      'snaks-order': ['P248', 'P352', 'P813', 'P407'],
      'hash': '0803366ec9ae3556a238dfc8050759b91be8c581'}],
    'id': 'Q18051234$8004B902-602D-4CCA-95EC-C0DACE660EAA'}],
  'P703': [{'mainsnak': {'snaktype': 'value',
     'property': 'P703',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 15978631,
       'id': 'Q15978631'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$DB0266D7-06FC-4B3C-8AE8-2F2CABD4C603'}],
  'P2888': [{'mainsnak': {'snaktype': 'value',
     'property': 'P2888',
     'datavalue': {'value': 'http://identifiers.org/ncbigene/144568',
      'type': 'string'},
     'datatype': 'url'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 16335166,
           'id': 'Q16335166'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P854': [{'snaktype': 'value',
         'property': 'P854',
         'datavalue': {'value': 'http://www.ebi.ac.uk/miriam/main/collections/MIR:00000069',
          'type': 'string'},
         'datatype': 'url'}]},
      'snaks-order': ['P248', 'P854'],
      'hash': '40c4db543dfcc3361dde4c3d6f1483d9703e6a61'}],
    'id': 'Q18051234$84173FE5-D645-4935-9C60-B4EED154CFEE'}],
  'P1057': [{'mainsnak': {'snaktype': 'value',
     'property': 'P1057',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 847102,
       'id': 'Q847102'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {'P659': [{'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 20966585,
         'id': 'Q20966585'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '4fa3861bcf838ed631887f08c47804f038d4e1ca'},
      {'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 21067546,
         'id': 'Q21067546'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '51bec3b4b5c2ec3ddc820210c4a0a9a8de02ac5d'}]},
    'qualifiers-order': ['P659', 'P659'],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$946D8AA6-E17D-4127-9C8D-296D3F3F39F6'}],
  'P644': [{'mainsnak': {'snaktype': 'value',
     'property': 'P644',
     'datavalue': {'value': '8975068', 'type': 'string'},
     'datatype': 'string'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {'P1057': [{'snaktype': 'value',
       'property': 'P1057',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 847102,
         'id': 'Q847102'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': 'e6dbb46bf31a387c2f71016bbbc729ce07066acc'}],
     'P659': [{'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 21067546,
         'id': 'Q21067546'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '51bec3b4b5c2ec3ddc820210c4a0a9a8de02ac5d'}]},
    'qualifiers-order': ['P1057', 'P659'],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$47AC10C2-44DE-4154-B3AF-E4FED829B066'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P644',
     'datavalue': {'value': '8822621', 'type': 'string'},
     'datatype': 'string'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {'P1057': [{'snaktype': 'value',
       'property': 'P1057',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 847102,
         'id': 'Q847102'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': 'e6dbb46bf31a387c2f71016bbbc729ce07066acc'}],
     'P659': [{'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 20966585,
         'id': 'Q20966585'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '4fa3861bcf838ed631887f08c47804f038d4e1ca'}]},
    'qualifiers-order': ['P1057', 'P659'],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$32444CF7-B7D0-44D8-83FC-0255059CCA8D'}],
  'P2548': [{'mainsnak': {'snaktype': 'value',
     'property': 'P2548',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 22809680,
       'id': 'Q22809680'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {'P659': [{'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 20966585,
         'id': 'Q20966585'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '4fa3861bcf838ed631887f08c47804f038d4e1ca'},
      {'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 21067546,
         'id': 'Q21067546'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '51bec3b4b5c2ec3ddc820210c4a0a9a8de02ac5d'}]},
    'qualifiers-order': ['P659', 'P659'],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$0753288B-6E3D-4339-B984-D356FB4CEB20'}],
  'P645': [{'mainsnak': {'snaktype': 'value',
     'property': 'P645',
     'datavalue': {'value': '8887001', 'type': 'string'},
     'datatype': 'string'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {'P1057': [{'snaktype': 'value',
       'property': 'P1057',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 847102,
         'id': 'Q847102'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': 'e6dbb46bf31a387c2f71016bbbc729ce07066acc'}],
     'P659': [{'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 20966585,
         'id': 'Q20966585'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '4fa3861bcf838ed631887f08c47804f038d4e1ca'}]},
    'qualifiers-order': ['P1057', 'P659'],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$628B7E1F-7202-43C3-9D6E-31548612D1DE'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P645',
     'datavalue': {'value': '9039597', 'type': 'string'},
     'datatype': 'string'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {'P1057': [{'snaktype': 'value',
       'property': 'P1057',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 847102,
         'id': 'Q847102'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': 'e6dbb46bf31a387c2f71016bbbc729ce07066acc'}],
     'P659': [{'snaktype': 'value',
       'property': 'P659',
       'datavalue': {'value': {'entity-type': 'item',
         'numeric-id': 21067546,
         'id': 'Q21067546'},
        'type': 'wikibase-entityid'},
       'datatype': 'wikibase-item',
       'hash': '51bec3b4b5c2ec3ddc820210c4a0a9a8de02ac5d'}]},
    'qualifiers-order': ['P1057', 'P659'],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$E47E259E-D706-46CA-BA3C-67254F232CDC'}],
  'P31': [{'mainsnak': {'snaktype': 'value',
     'property': 'P31',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 7187,
       'id': 'Q7187'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 67600000,
           'id': 'Q67600000'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P594': [{'snaktype': 'value',
         'property': 'P594',
         'datavalue': {'value': 'ENSG00000166535', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P594'],
      'hash': 'd5c836483a65c7efa10aebc4f1b1ee79c6a4b579'}],
    'id': 'Q18051234$37E8A7E0-E157-41EE-98DA-C30BDEDB7B80'}],
  'P4196': [{'mainsnak': {'snaktype': 'value',
     'property': 'P4196',
     'datavalue': {'value': '12p13.31', 'type': 'string'},
     'datatype': 'string'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 20641742,
           'id': 'Q20641742'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-08-09T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P351': [{'snaktype': 'value',
         'property': 'P351',
         'datavalue': {'value': '144568', 'type': 'string'},
         'datatype': 'external-id'}]},
      'snaks-order': ['P248', 'P813', 'P351'],
      'hash': '45788881a788ba2d4a8399927a57d9e63189e29e'}],
    'id': 'Q18051234$4C1313BB-DAF2-4ECF-A763-52E8B435ACBF'}],
  'P492': [{'mainsnak': {'snaktype': 'value',
     'property': 'P492',
     'datavalue': {'value': '610627', 'type': 'string'},
     'datatype': 'external-id'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 241953,
           'id': 'Q241953'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-08-19T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}]},
      'snaks-order': ['P248', 'P813'],
      'hash': '8c9589eece4e46f45753c5c5b94e03948d03ecc7'}],
    'id': 'Q18051234$DA1B861B-772D-4119-B6C1-809509653ECA'}],
  'P2293': [{'mainsnak': {'snaktype': 'value',
     'property': 'P2293',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 1543446,
       'id': 'Q1543446'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 64403342,
           'id': 'Q64403342'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-09-18T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P854': [{'snaktype': 'value',
         'property': 'P854',
         'datavalue': {'value': 'https://search.clinicalgenome.org/kb/gene-validity/d910a9d8-516e-443d-acba-8d61f7574792--2018-06-07T14:23:53',
          'type': 'string'},
         'datatype': 'url'}]},
      'snaks-order': ['P248', 'P813', 'P854'],
      'hash': '28ed7c3e9044c3336964f09934c96fd2e23ff33b'}],
    'id': 'Q18051234$d017ec6d-4058-2f76-53c7-b8fe7df19aad'},
   {'mainsnak': {'snaktype': 'value',
     'property': 'P2293',
     'datavalue': {'value': {'entity-type': 'item',
       'numeric-id': 1097490,
       'id': 'Q1097490'},
      'type': 'wikibase-entityid'},
     'datatype': 'wikibase-item'},
    'type': 'statement',
    'rank': 'normal',
    'qualifiers': {},
    'qualifiers-order': [],
    'references': [{'snaks': {'P248': [{'snaktype': 'value',
         'property': 'P248',
         'datavalue': {'value': {'entity-type': 'item',
           'numeric-id': 64403342,
           'id': 'Q64403342'},
          'type': 'wikibase-entityid'},
         'datatype': 'wikibase-item'}],
       'P813': [{'snaktype': 'value',
         'property': 'P813',
         'datavalue': {'value': {'time': '+2019-09-18T00:00:00Z',
           'timezone': 0,
           'before': 0,
           'after': 0,
           'precision': 11,
           'calendarmodel': 'http://www.wikidata.org/entity/Q1985727'},
          'type': 'time'},
         'datatype': 'time'}],
       'P854': [{'snaktype': 'value',
         'property': 'P854',
         'datavalue': {'value': 'https://search.clinicalgenome.org/kb/gene-validity/fc3c41d8-8497-489b-a350-c9e30016bc6a--2018-06-07T14:31:03',
          'type': 'string'},
         'datatype': 'url'}]},
      'snaks-order': ['P248', 'P813', 'P854'],
      'hash': '171cc7a5cad9719efb306f374b9faa2e2c8e0742'}],
    'id': 'Q18051234$f1fc3f19-4779-389b-e71e-dbe0b0e25695'}]},
 'aliases': {'en': [{'language': 'en', 'value': 'CPAMD9'},
   {'language': 'en', 'value': 'alpha-2-macroglobulin like 1'},
   {'language': 'en', 'value': 'p170'},
   {'language': 'en', 'value': 'OMS'}],
  'ar': [{'language': 'ar', 'value': 'A٢ML١'}]},
 'sitelinks': {}}

In [36]:
# wikidata_item.write(login)


Out[36]:
'Q18051234'

In [ ]: