This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
query = ''' | |
select distinct ?p1 where { | |
VALUES ?pd { | |
<http://www.wikidata.org/entity/Q423026> | |
<http://www.wikidata.org/entity/Q616005> | |
<http://www.wikidata.org/entity/Q7644128> | |
<http://www.wikidata.org/entity/Q898273> | |
<http://www.wikidata.org/entity/Q898362> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib | |
import json | |
__author__ = 'Sebastian Burgstaller' | |
__license__ = 'AGPLv3' | |
prefix = ''' | |
PREFIX schema: <http://schema.org/> | |
PREFIX wd: <http://www.wikidata.org/entity/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instance of Gene Ontology Evidence code (Q23173209) | |
go_evidence_codes = { | |
'EXP': 'Q23173789', | |
'IDA': 'Q23174122', | |
'IPI': 'Q23174389', | |
'IMP': 'Q23174671', | |
'IGI': 'Q23174952', | |
'IEP': 'Q23175251', | |
'ISS': 'Q23175558', | |
'ISO': 'Q23190637', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import PBB_login | |
import sys | |
import pprint | |
__author__ = 'Sebastian Burgstaller-Muehlbacher' | |
__license__ = 'AGPLv3' | |
def exec_wd_query(y): | |
rev_id_block = [x[1] for x in y] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Sebastian Burgstaller' | |
__licence__ = 'GPLv3' | |
import PBB_Core | |
import pandas as pd | |
import requests | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eferences = { 'P279': [ { 'ref_properties': ['P248', 'P143', 'TIMESTAMP'], | |
'ref_values': ['Q17939676', 'Q20641742', 'TIMESTAMP']}], | |
'P351': [ { 'ref_properties': ['P248', 'P143', 'TIMESTAMP'], | |
'ref_values': ['Q17939676', 'Q20641742', 'TIMESTAMP']}], | |
'P353': [ { 'ref_properties': ['P248', 'P143', 'TIMESTAMP'], | |
'ref_values': ['Q17939676', 'Q20641742', 'TIMESTAMP']}], | |
'P703': [ { 'ref_properties': ['P248', 'P143 | |
9;, 'TIMESTAMP'], | |
'ref_values': ['Q17939676', 'Q20641742', 'TIMESTAMP']}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Sebastian Burgstaller' | |
__licence__ = 'GPLv3' | |
""" | |
Test retrieval and construction of a WD json representation | |
""" | |
import PBB_Core | |
import pprint | |
import time | |
from PBB_login import WDLogin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Sebastian Burgstaller' | |
from PBB_login import WDLogin | |
import requests | |
import json | |
import pprint | |
user = '' | |
pwd = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'sebastian' | |
__license__ = 'GPLv3' | |
import pywikibot | |
import pywikibot.login | |
gene_list = ['BRCA1', 'REELIN', 'MYL2', 'TP53', 'INS'] | |
hgid = ['Q1232', 'Q1235', 'Q1236', 'Q1234', 'Q1233'] | |
mgid = ['Q1238', 'Q1239', 'Q1240', 'Q1237', 'Q1241'] | |
pages = ['Template:PBB/672', 'Template:PBB/5649', 'Template:PBB/4633', 'Template:PBB/7157', 'Template:PBB/3630'] |