Prise en main SPARQL

Exercice 1 : DESCRIBE

Lister les informations relatives à l'identifiant ENSG00000139618 (Ensembl).


In [1]:
from SPARQLWrapper import SPARQLWrapper, JSON, XML

# Set SPARQL endpoint
endpoint = "http://sparql.wikipathways.org/"

sparql = SPARQLWrapper(endpoint)

In [2]:
# Set prefix
prefix = """
PREFIX wp:      <http://vocabularies.wikipathways.org/wp#>
PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
"""

In [3]:
# Query
query = """
DESCRIBE <http://identifiers.org/wikipathways/WP43_r84102>
"""

In [4]:
sparql.setQuery(prefix + query)
sparql.setReturnFormat("csv")

In [5]:
results = sparql.query().convert()

In [9]:
# print results
print(str(results))


b'@prefix dcterms:\t<http://purl.org/dc/terms/> .\n@prefix ns1:\t<http://identifiers.org/ensembl/> .\n@prefix ns2:\t<http://identifiers.org/wikipathways/> .\nns1:ENSG00000100197\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000106258\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000160868\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000160882\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000165841\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000187048\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000197838\tdcterms:isPartOf\tns2:WP43_r84102 .\n@prefix ns3:\t<http://rdf.wikipathways.org/Pathway/WP43_r84102/Complex/> .\nns3:a3ed2\tdcterms:isPartOf\tns2:WP43_r84102 .\nns3:a7f0b\tdcterms:isPartOf\tns2:WP43_r84102 .\nns3:c3573\tdcterms:isPartOf\tns2:WP43_r84102 .\nns3:d5fb7\tdcterms:isPartOf\tns2:WP43_r84102 .\nns3:d636f\tdcterms:isPartOf\tns2:WP43_r84102 .\nns3:e534e\tdcterms:isPartOf\tns2:WP43_r84102 .\nns3:f2fca\tdcterms:isPartOf\tns2:WP43_r84102 .\n@prefix ns4:\t<http://rdf.wikipathways.org/Pathway/WP43_r84102/ComplexBinding/> .\nns4:a3ed2\tdcterms:isPartOf\tns2:WP43_r84102 .\nns4:a7f0b\tdcterms:isPartOf\tns2:WP43_r84102 .\nns4:c3573\tdcterms:isPartOf\tns2:WP43_r84102 .\nns4:d5fb7\tdcterms:isPartOf\tns2:WP43_r84102 .\nns4:d636f\tdcterms:isPartOf\tns2:WP43_r84102 .\nns4:e534e\tdcterms:isPartOf\tns2:WP43_r84102 .\nns4:f2fca\tdcterms:isPartOf\tns2:WP43_r84102 .\n@prefix ns5:\t<http://rdf.wikipathways.org/Pathway/WP43_r84102/WP/Interaction/> .\nns5:a5e42\tdcterms:isPartOf\tns2:WP43_r84102 .\nns5:f32ed\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000103018\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000119004\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000130612\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186160\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186377\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186684\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000198457\tdcterms:isPartOf\tns2:WP43_r84102 .\n@prefix pav:\t<http://purl.org/pav/> .\nns2:WP43\tpav:hasVersion\tns2:WP43_r84102 .\n@prefix rdf:\t<http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix wp:\t<http://vocabularies.wikipathways.org/wp#> .\nns2:WP43_r84102\trdf:type\twp:Pathway .\n@prefix skos:\t<http://www.w3.org/2004/02/skos/core#> .\nns2:WP43_r84102\trdf:type\tskos:Collection .\n@prefix ns10:\t<http://purl.obolibrary.org/obo/> .\nns2:WP43_r84102\twp:cellTypeOntologyTag\tns10:CL_0000182 ;\n\twp:pathwayOntologyTag\tns10:PW_0000107 ,\n\t\tns10:PW_0000375 .\n@prefix foaf:\t<http://xmlns.com/foaf/0.1/> .\n@prefix ns12:\t<http://www.wikipathways.org/instance/> .\nns2:WP43_r84102\tfoaf:page\tns12:WP43_r84102 .\n@prefix ns13:\t<http://rdf.wikipathways.org/Pathway/> .\nns2:WP43_r84102\twp:isAbout\tns13:WP43_r84102 ;\n\twp:ontologyTag\tns10:PW_0000107 .\n@prefix ns14:\t<http://vocabularies.wikipathways.org/wp#Curation:> .\nns2:WP43_r84102\twp:ontologyTag\tns14:AnalysisCollection ,\n\t\tns10:CL_0000182 ,\n\t\tns10:PW_0000375 ;\n\twp:organism\tns10:NCBITaxon_9606 .\n@prefix xsd:\t<http://www.w3.org/2001/XMLSchema#> .\nns2:WP43_r84102\twp:organismName\t"Homo sapiens"^^xsd:string .\n@prefix dc:\t<http://purl.org/dc/elements/1.1/> .\nns2:WP43_r84102\tdc:identifier\tns2:WP43 ;\n\tdc:source\t"WikiPathways"^^xsd:string ;\n\tdc:title\t"Oxidation by Cytochrome P450"@en ;\n\tdcterms:description\t"Oxidation of a substrate by Cytochrome P450. Adapted from Niesink et al., Chapter 3, p. 47-48." ;\n\tdcterms:identifier\t"WP43"^^xsd:string .\n<http://identifiers.org/chebi/CHEBI:29033>\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000137869\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000140459\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000148795\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000179142\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000255974\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000021461\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000073067\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000127948\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000134716\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000142973\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000145476\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000155016\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000160870\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000162365\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000167600\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000171903\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000171954\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186115\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186204\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186526\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186529\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000187553\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000197446\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000198077\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000003137\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000036530\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000095596\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000108242\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000138109\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000138115\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000146233\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000172817\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000180432\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000197408\tdcterms:isPartOf\tns2:WP43_r84102 .\n<http://identifiers.org/ncbigene/1559>\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000100243\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000159348\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000166347\tdcterms:isPartOf\tns2:WP43_r84102 .\n<http://identifiers.org/chebi/CHEBI:15846>\tdcterms:isPartOf\tns2:WP43_r84102 .\n<http://identifiers.org/chebi/CHEBI:16474>\tdcterms:isPartOf\tns2:WP43_r84102 .\n<http://identifiers.org/chebi/CHEBI:16908>\tdcterms:isPartOf\tns2:WP43_r84102 .\n<http://identifiers.org/chebi/CHEBI:18009>\tdcterms:isPartOf\tns2:WP43_r84102 .\n@prefix hmdb:\t<http://identifiers.org/hmdb/> .\nhmdb:HMDB01377\tdcterms:isPartOf\tns2:WP43_r84102 .\nhmdb:HMDB02111\tdcterms:isPartOf\tns2:WP43_r84102 .\n<http://identifiers.org/chebi/CHEBI:29034>\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000001630\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000019186\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000111012\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000130649\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000135929\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000138061\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000140465\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000140505\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000167910\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000186104\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000065615\tdcterms:isPartOf\tns2:WP43_r84102 .\nns1:ENSG00000166394\tdcterms:isPartOf\tns2:WP43_r84102 .'

In [ ]:


In [ ]:

Exercice 2 : SELECT AND FILTER

Lister les gènes "CYP".


In [ ]:
# Query
query = """
SELECT DISTINCT str(?label) as ?geneProduct
WHERE {
    ?geneProduct a wp:GeneProduct . 
    ?geneProduct rdfs:label ?label .

    FILTER regex(str(?label), "CYP"). 
}
"""

In [47]:
sparql.setQuery(prefix + query)
sparql.setReturnFormat(JSON)

In [48]:
results = sparql.query().convert()

In [49]:
# print results
for result in results["results"]["bindings"]:
    print result['geneProduct']['value']


CYP2D6
CYP3A5
CYP3A4
CYP11B1
CYP2C19
CYP4A11
CYP4A11 gene
CYP2A13
CYP3A4
CYP3A5
CYP20A1
CYP2G1P
CYP4Z1
CYP4X1
CYP27C1
CYP21A2
CYP51A1
CYP2J2
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2E1
CYP2B6
CYP27B1
CYP24A1
CYP26A1
CYP7A1
CYP1A2
CYP4B1
CYP19A1
CYP11A1
CYP17A1
CYP11B2
CYP2A6
CYP2A6
CYP19A1
CYP3A43
CYP2W1
CYP2J2
CYP4B1
CYP4V2
CYP2U1
CYP3A7
CYP4A22
CYP2S1
CYP4F11
CYP4F22
CYP4F2
CYP4F12
CYP4F8
CYP4F3
CYP26C1
CYP2F1
CYP2A7
CYP26B1
CYP46A1
CYP26A1
CYP2C18
CYP2C9
CYP2C8
CYP39A1
CYP7B1
CYP8B1
CYP2B6
CYP
CYP26A1
CYP26B1
CYP51A1
CYP24A1
CYP27B1
CYP2E1
CYP27A1
CYP1B1
CYP1A1
CYP1A1 gene
CYP1A2
CYP1A2
CYP7A1
CYP7A1 gene
CYP2R1
CYP2D6
CYP2D6
CYP2D6
CYP3A5
CYP3A5
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP11B1
CYP2C19
CYP2C19
CYP2C19
CYP4A11
CYP4A11 gene
CYP4A11
CYP4A11 gene
CYP4A11
CYP4A11 gene
CYP4A11
CYP4A11 gene
CYP4A11
CYP4A11 gene
CYP2A13
CYP2A13
CYP2A13
CYP2C19
CYP2D6
CYP2D6
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A4
CYP3A5
CYP4A11
CYP4A11
CYP11B1
CYP17A1
CYP20A1
CYP4Z1
CYP4X1
CYP27C1
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP4A11
CYP4A22
CYP4A11
CYP4A22
CYP4A11
CYP4A22
CYP4A11
CYP4A22
CYP4A11
CYP4A22
CYP4A11
CYP4A22
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP7B1
CYP7B1
CYP7B1
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP2J2
CYP2J2
CYP2J2
CYP19A1
CYP19A1
CYP19A1
CYP19A1
CYP19A1
CYP19A1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP2C9
CYP2C19
CYP2C18
CYP2C8
CYP
CYP4F12
CYP4F11
CYP4F2
CYP4F3
CYP4F12
CYP4F11
CYP4F2
CYP4F3
CYP4F12
CYP4F11
CYP4F2
CYP4F3
CYP2F1
CYP2F1
CYP2F1
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP3A4
CYP3A5
CYP3A43
CYP3A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP2A13
CYP2A6
CYP2A7
CYP1A1
CYP2C19
CYP2E1
CYP1B1
CYP2A13
CYP26A1
CYP7A1
CYP7B1
CYP19A1
CYP1A2
CYP2J2
CYP19A1
CYP19A1
CYP11A1
CYP17A1
CYP11B2
CYP2A6
CYP2A6
CYP2A6
CYP2A6
CYP2A6
CYP2A6
CYP2A6
CYP2A6
CYP11A1
CYP11A1
CYP11A1
CYP11B2
CYP11B2
CYP17A1
CYP17A1
CYP19A1
CYP19A1
CYP21A2
CYP21A2
CYP21A2
CYP3A43
CYP2W1
CYP2J2
CYP2J2
CYP4B1
CYP4V2
CYP2U1
CYP3A7
CYP2S1
CYP4F11
CYP4F22
CYP4F2
CYP4F12
CYP4F8
CYP4F3
CYP26C1
CYP2F1
CYP2A7
CYP2F1
CYP2J2
CYP4B1
CYP4F12
CYP2A6
CYP2D6
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A1
CYP1A1
CYP1A1
CYP27B1
CYP27B1
CYP11B2
CYP4X1
CYP11B1
CYP26B1
CYP46A1
CYP26A1
CYP2C18
CYP2C9
CYP2C9
CYP2C9
CYP2C8
CYP2C8
CYP39A1
CYP7B1
CYP8B1
CYP8B1
CYP8B1
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2B6
CYP2C8
CYP2C8
CYP2C9
CYP
CYP2C9
CYP
CYP2C9
CYP
CYP2C18
CYP8B1
CYP8B1
CYP26A1
CYP26A1
CYP26B1
CYP7B1
CYP27B1
CYP19A1
CYP51A1
CYP3A4
CYP3A4
CYP3A4
CYP7A1
CYP7A1
CYP3A5
CYP76C6
CYP76C4
CYP76C1
CYP76C2
CYP76C3
CYP716A1
CYP-13
CYP20A1
CYP20A1
CYP51A1
CYP51A1
CYP51A1
CYP51A1
CYP24A1
CYP24A1
CYP24A1
CYP24A1
CYP39A1
CYP39A1
CYP11B1
CYP11B2
CYP17A1
CYP11B1
CYP11B2
CYP17A1
CYP11B1
CYP11B2
CYP17A1
CYP11B1
CYP11B2
CYP17A1
CYP11B1
CYP11B2
CYP17A1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP11A1
CYP11A1
CYP11A1
CYP11A1
CYP11A1
CYP2R1
CYP2R1
CYP2R1
CYP4B1
CYP4B1
CYP4B1
CYP26B1
CYP26B1
CYP26B1
CYP26B1
CYP26B1
CYP2U1
CYP2U1
CYP27A1
CYP27A1
CYP27A1
CYP17A1
CYP4X1
CYP4X1
CYP27B1
CYP27B1
CYP27B1
CYP27B1
CYP2W1
CYP2W1
CYP2S1
CYP2S1
CYP26A1
CYP26A1
CYP26A1
CYP26A1
CYP26A1
CYP26A1
CYP4V2
CYP4V2
CYP8B1
CYP8B1
CYP8B1
CYP8B1
CYP8B1
CYP46A1
CYP46A1
CYP27C1
CYP27C1
CYP26C1
CYP26C1
CYP21A2
CYP21A2
CYP21A2
CYP4F22
CYP4F22
CYP4A11
CYP4A22
CYP11B1
CYP11B1
CYP11B2
CYP11B2
CYP11B2
CYP51A1
CYP51A1
CYP24A1
CYP51A1 gene
CYP51A1 gene
CYP51A1 gene
CYP27B1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP27A1
CYP27A1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1B1
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A1
CYP1A1 gene
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP7A1
CYP7A1 gene
CYP7A1
CYP7A1 gene
CYP7A1
CYP7A1 gene
CYP7A1
CYP7A1 gene
CYP7A1
CYP7A1 gene
CYP2R1
CYP2R1
CYP1A1
CYP1A1
CYP1A1
CYP1A1
CYP1A2
CYP1A2
CYP1A2
CYP1A2
CYP1B1
CYP1B1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP2E1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP7A1
CYP24A1
CYP24A1
CYP27A1
CYP27B1
CYP27B1
CYP51A1
CYP2D7P1
CYP24A1
CYP26A1
CYP26A1
CYP7A1
CYP1A2
CYP3A80
CYP4B1
CYP8B
CYP26B1

Exercice 3

Lister les pathways qui ont le gène "CYP".


In [43]:
# Query
query = """
SELECT DISTINCT ?pathway str(?label) as ?geneProduct
WHERE {
    ?geneProduct a wp:GeneProduct . 
    ?geneProduct rdfs:label ?label .
    ?geneProduct dcterms:isPartOf ?pathway .
    ?pathway a wp:Pathway .
    
    FILTER regex(str(?label), "CYP"). 
}
"""

In [44]:
sparql.setQuery(prefix + query)
sparql.setReturnFormat(JSON)

In [45]:
results = sparql.query().convert()

In [46]:
# print results
for result in results["results"]["bindings"]:
    print result['pathway']['value'] + "\t" + result['geneProduct']['value']


http://identifiers.org/wikipathways/WP43_r84102	CYP2D6
http://identifiers.org/wikipathways/WP43_r84102	CYP3A5
http://identifiers.org/wikipathways/WP43_r84102	CYP3A4
http://identifiers.org/wikipathways/WP43_r84102	CYP11B1
http://identifiers.org/wikipathways/WP43_r84102	CYP2C19
http://identifiers.org/wikipathways/WP43_r84102	CYP4A11
http://identifiers.org/wikipathways/WP43_r84102	CYP4A11 gene
http://identifiers.org/wikipathways/WP43_r84102	CYP2A13
http://identifiers.org/wikipathways/WP229_r68389	CYP3A4
http://identifiers.org/wikipathways/WP229_r68389	CYP3A5
http://identifiers.org/wikipathways/WP43_r84102	CYP20A1
http://identifiers.org/wikipathways/WP43_r84102	CYP2G1P
http://identifiers.org/wikipathways/WP43_r84102	CYP4Z1
http://identifiers.org/wikipathways/WP43_r84102	CYP4X1
http://identifiers.org/wikipathways/WP43_r84102	CYP27C1
http://identifiers.org/wikipathways/WP43_r84102	CYP21A2
http://identifiers.org/wikipathways/WP833_r72378	CYP51A1
http://identifiers.org/wikipathways/WP1000_r80835	CYP2J2
http://identifiers.org/wikipathways/WP1000_r80835	CYP2C9
http://identifiers.org/wikipathways/WP1000_r80835	CYP2C19
http://identifiers.org/wikipathways/WP1000_r80835	CYP2C18
http://identifiers.org/wikipathways/WP1000_r80835	CYP2C8
http://identifiers.org/wikipathways/WP1000_r80835	CYP
http://identifiers.org/wikipathways/WP1099_r78444	CYP2E1
http://identifiers.org/wikipathways/WP1099_r78444	CYP2B6
http://identifiers.org/wikipathways/WP1099_r78444	CYP27B1
http://identifiers.org/wikipathways/WP1099_r78444	CYP24A1
http://identifiers.org/wikipathways/WP1099_r78444	CYP26A1
http://identifiers.org/wikipathways/WP1099_r78444	CYP7A1
http://identifiers.org/wikipathways/WP1099_r78444	CYP1A2
http://identifiers.org/wikipathways/WP1099_r78444	CYP4B1
http://identifiers.org/wikipathways/WP43_r84102	CYP19A1
http://identifiers.org/wikipathways/WP43_r84102	CYP11A1
http://identifiers.org/wikipathways/WP43_r84102	CYP17A1
http://identifiers.org/wikipathways/WP43_r84102	CYP11B2
http://identifiers.org/wikipathways/WP3633_r85154	CYP2A6
http://identifiers.org/wikipathways/WP43_r84102	CYP2A6
http://identifiers.org/wikipathways/WP2035_r86080	CYP19A1
http://identifiers.org/wikipathways/WP43_r84102	CYP3A43
http://identifiers.org/wikipathways/WP43_r84102	CYP2W1
http://identifiers.org/wikipathways/WP43_r84102	CYP2J2
http://identifiers.org/wikipathways/WP43_r84102	CYP4B1
http://identifiers.org/wikipathways/WP43_r84102	CYP4V2
http://identifiers.org/wikipathways/WP43_r84102	CYP2U1
http://identifiers.org/wikipathways/WP43_r84102	CYP3A7
http://identifiers.org/wikipathways/WP43_r84102	CYP4A22
http://identifiers.org/wikipathways/WP43_r84102	CYP2S1
http://identifiers.org/wikipathways/WP43_r84102	CYP4F11
http://identifiers.org/wikipathways/WP43_r84102	CYP4F22
http://identifiers.org/wikipathways/WP43_r84102	CYP4F2
http://identifiers.org/wikipathways/WP43_r84102	CYP4F12
http://identifiers.org/wikipathways/WP43_r84102	CYP4F8
http://identifiers.org/wikipathways/WP43_r84102	CYP4F3
http://identifiers.org/wikipathways/WP43_r84102	CYP26C1
http://identifiers.org/wikipathways/WP43_r84102	CYP2F1
http://identifiers.org/wikipathways/WP43_r84102	CYP2A7
http://identifiers.org/wikipathways/WP43_r84102	CYP26B1
http://identifiers.org/wikipathways/WP43_r84102	CYP46A1
http://identifiers.org/wikipathways/WP43_r84102	CYP26A1
http://identifiers.org/wikipathways/WP43_r84102	CYP2C18
http://identifiers.org/wikipathways/WP43_r84102	CYP2C9
http://identifiers.org/wikipathways/WP43_r84102	CYP2C8
http://identifiers.org/wikipathways/WP43_r84102	CYP39A1
http://identifiers.org/wikipathways/WP43_r84102	CYP7B1
http://identifiers.org/wikipathways/WP43_r84102	CYP8B1
http://identifiers.org/wikipathways/WP43_r84102	CYP2B6
http://identifiers.org/wikipathways/WP43_r84102	CYP
http://identifiers.org/wikipathways/WP236_r80209	CYP26A1
http://identifiers.org/wikipathways/WP236_r80209	CYP26B1
http://identifiers.org/wikipathways/WP43_r84102	CYP51A1
http://identifiers.org/wikipathways/WP43_r84102	CYP24A1
http://identifiers.org/wikipathways/WP43_r84102	CYP27B1
http://identifiers.org/wikipathways/WP43_r84102	CYP2E1
http://identifiers.org/wikipathways/WP43_r84102	CYP27A1
http://identifiers.org/wikipathways/WP43_r84102	CYP1B1
http://identifiers.org/wikipathways/WP43_r84102	CYP1A1
http://identifiers.org/wikipathways/WP43_r84102	CYP1A1 gene
http://identifiers.org/wikipathways/WP3633_r85154	CYP1A2
http://identifiers.org/wikipathways/WP43_r84102	CYP1A2
http://identifiers.org/wikipathways/WP43_r84102	CYP7A1
http://identifiers.org/wikipathways/WP43_r84102	CYP7A1 gene
http://identifiers.org/wikipathways/WP43_r84102	CYP2R1
http://identifiers.org/wikipathways/WP702_r73516	CYP2D6
http://identifiers.org/wikipathways/WP691_r85084	CYP2D6
http://identifiers.org/wikipathways/WP3298_r91533	CYP2D6
http://identifiers.org/wikipathways/WP702_r73516	CYP3A5
http://identifiers.org/wikipathways/WP691_r85084	CYP3A5
http://identifiers.org/wikipathways/WP699_r70509	CYP3A4
http://identifiers.org/wikipathways/WP702_r73516	CYP3A4
http://identifiers.org/wikipathways/WP697_r86903	CYP3A4
http://identifiers.org/wikipathways/WP691_r85084	CYP3A4
http://identifiers.org/wikipathways/WP2816_r88575	CYP3A4
http://identifiers.org/wikipathways/WP696_r89537	CYP3A4
http://identifiers.org/wikipathways/WP2646_r74430	CYP3A4
http://identifiers.org/wikipathways/WP3915_r90629	CYP3A4
http://identifiers.org/wikipathways/WP702_r73516	CYP11B1
http://identifiers.org/wikipathways/WP702_r73516	CYP2C19
http://identifiers.org/wikipathways/WP691_r85084	CYP2C19
http://identifiers.org/wikipathways/WP3298_r91533	CYP2C19
http://identifiers.org/wikipathways/WP2875_r89203	CYP4A11
http://identifiers.org/wikipathways/WP2875_r89203	CYP4A11 gene
http://identifiers.org/wikipathways/WP2878_r88342	CYP4A11
http://identifiers.org/wikipathways/WP2878_r88342	CYP4A11 gene
http://identifiers.org/wikipathways/WP2797_r88142	CYP4A11
http://identifiers.org/wikipathways/WP2797_r88142	CYP4A11 gene
http://identifiers.org/wikipathways/WP2884_r87956	CYP4A11
http://identifiers.org/wikipathways/WP2884_r87956	CYP4A11 gene
http://identifiers.org/wikipathways/WP3942_r91095	CYP4A11
http://identifiers.org/wikipathways/WP3942_r91095	CYP4A11 gene
http://identifiers.org/wikipathways/WP699_r70509	CYP2A13
http://identifiers.org/wikipathways/WP702_r73516	CYP2A13
http://identifiers.org/wikipathways/WP465_r85055	CYP2A13
http://identifiers.org/wikipathways/WP2875_r89203	CYP2C19
http://identifiers.org/wikipathways/WP1604_r89511	CYP2D6
http://identifiers.org/wikipathways/WP206_r90917	CYP2D6
http://identifiers.org/wikipathways/WP2289_r88593	CYP3A4
http://identifiers.org/wikipathways/WP2874_r88692	CYP3A4
http://identifiers.org/wikipathways/WP2875_r89203	CYP3A4
http://identifiers.org/wikipathways/WP2879_r88056	CYP3A4
http://identifiers.org/wikipathways/WP299_r89331	CYP3A4
http://identifiers.org/wikipathways/WP465_r85055	CYP3A4
http://identifiers.org/wikipathways/WP1604_r89511	CYP3A4
http://identifiers.org/wikipathways/WP206_r90917	CYP3A4
http://identifiers.org/wikipathways/WP2875_r89203	CYP3A5
http://identifiers.org/wikipathways/WP299_r89331	CYP4A11
http://identifiers.org/wikipathways/WP206_r90917	CYP4A11
http://identifiers.org/wikipathways/WP2355_r90017	CYP11B1
http://identifiers.org/wikipathways/WP2355_r90017	CYP17A1
http://identifiers.org/wikipathways/WP702_r73516	CYP20A1
http://identifiers.org/wikipathways/WP702_r73516	CYP4Z1
http://identifiers.org/wikipathways/WP702_r73516	CYP4X1
http://identifiers.org/wikipathways/WP702_r73516	CYP27C1
http://identifiers.org/wikipathways/WP3248_r85056	CYP1A2
http://identifiers.org/wikipathways/WP1053_r86855	CYP1A2
http://identifiers.org/wikipathways/WP3209_r80804	CYP1A2
http://identifiers.org/wikipathways/WP3226_r89410	CYP1A2
http://identifiers.org/wikipathways/WP993_r89457	CYP1A2
http://identifiers.org/wikipathways/WP1077_r80775	CYP1A2
http://identifiers.org/wikipathways/WP3163_r80733	CYP1A2
http://identifiers.org/wikipathways/WP3247_r80876	CYP1A2
http://identifiers.org/wikipathways/WP981_r80762	CYP1A2
http://identifiers.org/wikipathways/WP1006_r80841	CYP1A2
http://identifiers.org/wikipathways/WP3150_r87598	CYP1A2
http://identifiers.org/wikipathways/WP3254_r80892	CYP1A2
http://identifiers.org/wikipathways/WP3264_r80908	CYP1A2
http://identifiers.org/wikipathways/WP970_r80700	CYP1A2
http://identifiers.org/wikipathways/WP3205_r89412	CYP1A2
http://identifiers.org/wikipathways/WP3131_r89204	CYP4A11
http://identifiers.org/wikipathways/WP3131_r89204	CYP4A22
http://identifiers.org/wikipathways/WP1077_r80775	CYP4A11
http://identifiers.org/wikipathways/WP1077_r80775	CYP4A22
http://identifiers.org/wikipathways/WP981_r80762	CYP4A11
http://identifiers.org/wikipathways/WP981_r80762	CYP4A22
http://identifiers.org/wikipathways/WP3190_r87958	CYP4A11
http://identifiers.org/wikipathways/WP3190_r87958	CYP4A22
http://identifiers.org/wikipathways/WP3258_r88343	CYP4A11
http://identifiers.org/wikipathways/WP3258_r88343	CYP4A22
http://identifiers.org/wikipathways/WP970_r80700	CYP4A11
http://identifiers.org/wikipathways/WP970_r80700	CYP4A22
http://identifiers.org/wikipathways/WP3248_r85056	CYP1A1
http://identifiers.org/wikipathways/WP1053_r86855	CYP1A1
http://identifiers.org/wikipathways/WP3209_r80804	CYP1A1
http://identifiers.org/wikipathways/WP3226_r89410	CYP1A1
http://identifiers.org/wikipathways/WP1050_r80921	CYP1A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP1A1
http://identifiers.org/wikipathways/WP3163_r80733	CYP1A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP1A1
http://identifiers.org/wikipathways/WP3264_r80908	CYP1A1
http://identifiers.org/wikipathways/WP970_r80700	CYP1A1
http://identifiers.org/wikipathways/WP3205_r89412	CYP1A1
http://identifiers.org/wikipathways/WP3263_r89452	CYP1A1
http://identifiers.org/wikipathways/WP3248_r85056	CYP7B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP7B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP7B1
http://identifiers.org/wikipathways/WP3131_r89204	CYP2B6
http://identifiers.org/wikipathways/WP3188_r88693	CYP2B6
http://identifiers.org/wikipathways/WP1077_r80775	CYP2B6
http://identifiers.org/wikipathways/WP3152_r80717	CYP2B6
http://identifiers.org/wikipathways/WP981_r80762	CYP2B6
http://identifiers.org/wikipathways/WP1006_r80841	CYP2B6
http://identifiers.org/wikipathways/WP3185_r89936	CYP2B6
http://identifiers.org/wikipathways/WP3248_r85056	CYP1B1
http://identifiers.org/wikipathways/WP1053_r86855	CYP1B1
http://identifiers.org/wikipathways/WP3209_r80804	CYP1B1
http://identifiers.org/wikipathways/WP3226_r89410	CYP1B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP1B1
http://identifiers.org/wikipathways/WP3163_r80733	CYP1B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP1B1
http://identifiers.org/wikipathways/WP3150_r87598	CYP1B1
http://identifiers.org/wikipathways/WP3264_r80908	CYP1B1
http://identifiers.org/wikipathways/WP3205_r89412	CYP1B1
http://identifiers.org/wikipathways/WP3263_r89452	CYP1B1
http://identifiers.org/wikipathways/WP3248_r85056	CYP2J2
http://identifiers.org/wikipathways/WP1077_r80775	CYP2J2
http://identifiers.org/wikipathways/WP1006_r80841	CYP2J2
http://identifiers.org/wikipathways/WP3248_r85056	CYP19A1
http://identifiers.org/wikipathways/WP3116_r89541	CYP19A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP19A1
http://identifiers.org/wikipathways/WP3158_r80724	CYP19A1
http://identifiers.org/wikipathways/WP3260_r80901	CYP19A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP19A1
http://identifiers.org/wikipathways/WP3189_r80772	CYP2E1
http://identifiers.org/wikipathways/WP3248_r85056	CYP2E1
http://identifiers.org/wikipathways/WP3120_r87510	CYP2E1
http://identifiers.org/wikipathways/WP1077_r80775	CYP2E1
http://identifiers.org/wikipathways/WP981_r80762	CYP2E1
http://identifiers.org/wikipathways/WP1006_r80841	CYP2E1
http://identifiers.org/wikipathways/WP1038_r80754	CYP2E1
http://identifiers.org/wikipathways/WP3264_r80908	CYP2E1
http://identifiers.org/wikipathways/WP3843_r86817	CYP2E1
http://identifiers.org/wikipathways/WP970_r80700	CYP2E1
http://identifiers.org/wikipathways/WP3248_r85056	CYP2C9
http://identifiers.org/wikipathways/WP3248_r85056	CYP2C19
http://identifiers.org/wikipathways/WP3248_r85056	CYP2C18
http://identifiers.org/wikipathways/WP3248_r85056	CYP2C8
http://identifiers.org/wikipathways/WP3248_r85056	CYP
http://identifiers.org/wikipathways/WP3131_r89204	CYP2C9
http://identifiers.org/wikipathways/WP3131_r89204	CYP2C19
http://identifiers.org/wikipathways/WP3131_r89204	CYP2C18
http://identifiers.org/wikipathways/WP3131_r89204	CYP2C8
http://identifiers.org/wikipathways/WP3131_r89204	CYP
http://identifiers.org/wikipathways/WP1077_r80775	CYP2C9
http://identifiers.org/wikipathways/WP1077_r80775	CYP2C19
http://identifiers.org/wikipathways/WP1077_r80775	CYP2C18
http://identifiers.org/wikipathways/WP1077_r80775	CYP2C8
http://identifiers.org/wikipathways/WP1077_r80775	CYP
http://identifiers.org/wikipathways/WP3152_r80717	CYP2C9
http://identifiers.org/wikipathways/WP3152_r80717	CYP2C19
http://identifiers.org/wikipathways/WP3152_r80717	CYP2C18
http://identifiers.org/wikipathways/WP3152_r80717	CYP2C8
http://identifiers.org/wikipathways/WP3152_r80717	CYP
http://identifiers.org/wikipathways/WP981_r80762	CYP2C9
http://identifiers.org/wikipathways/WP981_r80762	CYP2C19
http://identifiers.org/wikipathways/WP981_r80762	CYP2C18
http://identifiers.org/wikipathways/WP981_r80762	CYP2C8
http://identifiers.org/wikipathways/WP981_r80762	CYP
http://identifiers.org/wikipathways/WP1006_r80841	CYP2C9
http://identifiers.org/wikipathways/WP1006_r80841	CYP2C19
http://identifiers.org/wikipathways/WP1006_r80841	CYP2C18
http://identifiers.org/wikipathways/WP1006_r80841	CYP2C8
http://identifiers.org/wikipathways/WP1006_r80841	CYP
http://identifiers.org/wikipathways/WP3264_r80908	CYP2C9
http://identifiers.org/wikipathways/WP3264_r80908	CYP2C19
http://identifiers.org/wikipathways/WP3264_r80908	CYP2C18
http://identifiers.org/wikipathways/WP3264_r80908	CYP2C8
http://identifiers.org/wikipathways/WP3264_r80908	CYP
http://identifiers.org/wikipathways/WP3248_r85056	CYP4F12
http://identifiers.org/wikipathways/WP3248_r85056	CYP4F11
http://identifiers.org/wikipathways/WP3248_r85056	CYP4F2
http://identifiers.org/wikipathways/WP3248_r85056	CYP4F3
http://identifiers.org/wikipathways/WP1077_r80775	CYP4F12
http://identifiers.org/wikipathways/WP1077_r80775	CYP4F11
http://identifiers.org/wikipathways/WP1077_r80775	CYP4F2
http://identifiers.org/wikipathways/WP1077_r80775	CYP4F3
http://identifiers.org/wikipathways/WP1006_r80841	CYP4F12
http://identifiers.org/wikipathways/WP1006_r80841	CYP4F11
http://identifiers.org/wikipathways/WP1006_r80841	CYP4F2
http://identifiers.org/wikipathways/WP1006_r80841	CYP4F3
http://identifiers.org/wikipathways/WP3248_r85056	CYP2F1
http://identifiers.org/wikipathways/WP1077_r80775	CYP2F1
http://identifiers.org/wikipathways/WP1006_r80841	CYP2F1
http://identifiers.org/wikipathways/WP3189_r80772	CYP3A4
http://identifiers.org/wikipathways/WP3189_r80772	CYP3A5
http://identifiers.org/wikipathways/WP3189_r80772	CYP3A43
http://identifiers.org/wikipathways/WP3189_r80772	CYP3A7
http://identifiers.org/wikipathways/WP3248_r85056	CYP3A4
http://identifiers.org/wikipathways/WP3248_r85056	CYP3A5
http://identifiers.org/wikipathways/WP3248_r85056	CYP3A43
http://identifiers.org/wikipathways/WP3248_r85056	CYP3A7
http://identifiers.org/wikipathways/WP1053_r86855	CYP3A4
http://identifiers.org/wikipathways/WP1053_r86855	CYP3A5
http://identifiers.org/wikipathways/WP1053_r86855	CYP3A43
http://identifiers.org/wikipathways/WP1053_r86855	CYP3A7
http://identifiers.org/wikipathways/WP3131_r89204	CYP3A4
http://identifiers.org/wikipathways/WP3131_r89204	CYP3A5
http://identifiers.org/wikipathways/WP3131_r89204	CYP3A43
http://identifiers.org/wikipathways/WP3131_r89204	CYP3A7
http://identifiers.org/wikipathways/WP3187_r80769	CYP3A4
http://identifiers.org/wikipathways/WP3187_r80769	CYP3A5
http://identifiers.org/wikipathways/WP3187_r80769	CYP3A43
http://identifiers.org/wikipathways/WP3187_r80769	CYP3A7
http://identifiers.org/wikipathways/WP3188_r88693	CYP3A4
http://identifiers.org/wikipathways/WP3188_r88693	CYP3A5
http://identifiers.org/wikipathways/WP3188_r88693	CYP3A43
http://identifiers.org/wikipathways/WP3188_r88693	CYP3A7
http://identifiers.org/wikipathways/WP3269_r88057	CYP3A4
http://identifiers.org/wikipathways/WP3269_r88057	CYP3A5
http://identifiers.org/wikipathways/WP3269_r88057	CYP3A43
http://identifiers.org/wikipathways/WP3269_r88057	CYP3A7
http://identifiers.org/wikipathways/WP1077_r80775	CYP3A4
http://identifiers.org/wikipathways/WP1077_r80775	CYP3A5
http://identifiers.org/wikipathways/WP1077_r80775	CYP3A43
http://identifiers.org/wikipathways/WP1077_r80775	CYP3A7
http://identifiers.org/wikipathways/WP1080_r80765	CYP3A4
http://identifiers.org/wikipathways/WP1080_r80765	CYP3A5
http://identifiers.org/wikipathways/WP1080_r80765	CYP3A43
http://identifiers.org/wikipathways/WP1080_r80765	CYP3A7
http://identifiers.org/wikipathways/WP3247_r80876	CYP3A4
http://identifiers.org/wikipathways/WP3247_r80876	CYP3A5
http://identifiers.org/wikipathways/WP3247_r80876	CYP3A43
http://identifiers.org/wikipathways/WP3247_r80876	CYP3A7
http://identifiers.org/wikipathways/WP981_r80762	CYP3A4
http://identifiers.org/wikipathways/WP981_r80762	CYP3A5
http://identifiers.org/wikipathways/WP981_r80762	CYP3A43
http://identifiers.org/wikipathways/WP981_r80762	CYP3A7
http://identifiers.org/wikipathways/WP1006_r80841	CYP3A4
http://identifiers.org/wikipathways/WP1006_r80841	CYP3A5
http://identifiers.org/wikipathways/WP1006_r80841	CYP3A43
http://identifiers.org/wikipathways/WP1006_r80841	CYP3A7
http://identifiers.org/wikipathways/WP3253_r87244	CYP3A4
http://identifiers.org/wikipathways/WP3253_r87244	CYP3A5
http://identifiers.org/wikipathways/WP3253_r87244	CYP3A43
http://identifiers.org/wikipathways/WP3253_r87244	CYP3A7
http://identifiers.org/wikipathways/WP3254_r80892	CYP3A4
http://identifiers.org/wikipathways/WP3254_r80892	CYP3A5
http://identifiers.org/wikipathways/WP3254_r80892	CYP3A43
http://identifiers.org/wikipathways/WP3254_r80892	CYP3A7
http://identifiers.org/wikipathways/WP3264_r80908	CYP3A4
http://identifiers.org/wikipathways/WP3264_r80908	CYP3A5
http://identifiers.org/wikipathways/WP3264_r80908	CYP3A43
http://identifiers.org/wikipathways/WP3264_r80908	CYP3A7
http://identifiers.org/wikipathways/WP970_r80700	CYP3A4
http://identifiers.org/wikipathways/WP970_r80700	CYP3A5
http://identifiers.org/wikipathways/WP970_r80700	CYP3A43
http://identifiers.org/wikipathways/WP970_r80700	CYP3A7
http://identifiers.org/wikipathways/WP3263_r89452	CYP3A4
http://identifiers.org/wikipathways/WP3263_r89452	CYP3A5
http://identifiers.org/wikipathways/WP3263_r89452	CYP3A43
http://identifiers.org/wikipathways/WP3263_r89452	CYP3A7
http://identifiers.org/wikipathways/WP3270_r89454	CYP3A4
http://identifiers.org/wikipathways/WP3270_r89454	CYP3A5
http://identifiers.org/wikipathways/WP3270_r89454	CYP3A43
http://identifiers.org/wikipathways/WP3270_r89454	CYP3A7
http://identifiers.org/wikipathways/WP3248_r85056	CYP2A13
http://identifiers.org/wikipathways/WP3248_r85056	CYP2A6
http://identifiers.org/wikipathways/WP3248_r85056	CYP2A7
http://identifiers.org/wikipathways/WP3131_r89204	CYP2A13
http://identifiers.org/wikipathways/WP3131_r89204	CYP2A6
http://identifiers.org/wikipathways/WP3131_r89204	CYP2A7
http://identifiers.org/wikipathways/WP1077_r80775	CYP2A13
http://identifiers.org/wikipathways/WP1077_r80775	CYP2A6
http://identifiers.org/wikipathways/WP1077_r80775	CYP2A7
http://identifiers.org/wikipathways/WP3247_r80876	CYP2A13
http://identifiers.org/wikipathways/WP3247_r80876	CYP2A6
http://identifiers.org/wikipathways/WP3247_r80876	CYP2A7
http://identifiers.org/wikipathways/WP1006_r80841	CYP2A13
http://identifiers.org/wikipathways/WP1006_r80841	CYP2A6
http://identifiers.org/wikipathways/WP1006_r80841	CYP2A7
http://identifiers.org/wikipathways/WP3167_r87627	CYP2A13
http://identifiers.org/wikipathways/WP3167_r87627	CYP2A6
http://identifiers.org/wikipathways/WP3167_r87627	CYP2A7
http://identifiers.org/wikipathways/WP3190_r87958	CYP2A13
http://identifiers.org/wikipathways/WP3190_r87958	CYP2A6
http://identifiers.org/wikipathways/WP3190_r87958	CYP2A7
http://identifiers.org/wikipathways/WP3264_r80908	CYP2A13
http://identifiers.org/wikipathways/WP3264_r80908	CYP2A6
http://identifiers.org/wikipathways/WP3264_r80908	CYP2A7
http://identifiers.org/wikipathways/WP3275_r80928	CYP2A13
http://identifiers.org/wikipathways/WP3275_r80928	CYP2A6
http://identifiers.org/wikipathways/WP3275_r80928	CYP2A7
http://identifiers.org/wikipathways/WP970_r80700	CYP2A13
http://identifiers.org/wikipathways/WP970_r80700	CYP2A6
http://identifiers.org/wikipathways/WP970_r80700	CYP2A7
http://identifiers.org/wikipathways/WP3185_r89936	CYP2A13
http://identifiers.org/wikipathways/WP3185_r89936	CYP2A6
http://identifiers.org/wikipathways/WP3185_r89936	CYP2A7
http://identifiers.org/wikipathways/WP1126_r85637	CYP1A1
http://identifiers.org/wikipathways/WP1126_r85637	CYP2C19
http://identifiers.org/wikipathways/WP1126_r85637	CYP2E1
http://identifiers.org/wikipathways/WP1126_r85637	CYP1B1
http://identifiers.org/wikipathways/WP1126_r85637	CYP2A13
http://identifiers.org/wikipathways/WP1105_r87031	CYP26A1
http://identifiers.org/wikipathways/WP1157_r82698	CYP7A1
http://identifiers.org/wikipathways/WP1126_r85637	CYP7B1
http://identifiers.org/wikipathways/WP1126_r85637	CYP19A1
http://identifiers.org/wikipathways/WP1126_r85637	CYP1A2
http://identifiers.org/wikipathways/WP1126_r85637	CYP2J2
http://identifiers.org/wikipathways/WP1984_r82941	CYP19A1
http://identifiers.org/wikipathways/WP702_r73516	CYP19A1
http://identifiers.org/wikipathways/WP702_r73516	CYP11A1
http://identifiers.org/wikipathways/WP702_r73516	CYP17A1
http://identifiers.org/wikipathways/WP702_r73516	CYP11B2
http://identifiers.org/wikipathways/WP691_r85084	CYP2A6
http://identifiers.org/wikipathways/WP3871_r88572	CYP2A6
http://identifiers.org/wikipathways/WP2435_r88907	CYP2A6
http://identifiers.org/wikipathways/WP2884_r87956	CYP2A6
http://identifiers.org/wikipathways/WP2875_r89203	CYP2A6
http://identifiers.org/wikipathways/WP1601_r84700	CYP2A6
http://identifiers.org/wikipathways/WP1600_r90593	CYP2A6
http://identifiers.org/wikipathways/WP206_r90917	CYP2A6
http://identifiers.org/wikipathways/WP237_r78497	CYP11A1
http://identifiers.org/wikipathways/WP2355_r90017	CYP11A1
http://identifiers.org/wikipathways/WP98_r88906	CYP11A1
http://identifiers.org/wikipathways/WP237_r78497	CYP11B2
http://identifiers.org/wikipathways/WP554_r84372	CYP11B2
http://identifiers.org/wikipathways/WP237_r78497	CYP17A1
http://identifiers.org/wikipathways/WP496_r69016	CYP17A1
http://identifiers.org/wikipathways/WP34_r88253	CYP19A1
http://identifiers.org/wikipathways/WP465_r85055	CYP19A1
http://identifiers.org/wikipathways/WP237_r78497	CYP21A2
http://identifiers.org/wikipathways/WP702_r73516	CYP21A2
http://identifiers.org/wikipathways/WP2355_r90017	CYP21A2
http://identifiers.org/wikipathways/WP702_r73516	CYP3A43
http://identifiers.org/wikipathways/WP702_r73516	CYP2W1
http://identifiers.org/wikipathways/WP702_r73516	CYP2J2
http://identifiers.org/wikipathways/WP678_r71506	CYP2J2
http://identifiers.org/wikipathways/WP702_r73516	CYP4B1
http://identifiers.org/wikipathways/WP702_r73516	CYP4V2
http://identifiers.org/wikipathways/WP702_r73516	CYP2U1
http://identifiers.org/wikipathways/WP702_r73516	CYP3A7
http://identifiers.org/wikipathways/WP702_r73516	CYP2S1
http://identifiers.org/wikipathways/WP702_r73516	CYP4F11
http://identifiers.org/wikipathways/WP702_r73516	CYP4F22
http://identifiers.org/wikipathways/WP702_r73516	CYP4F2
http://identifiers.org/wikipathways/WP702_r73516	CYP4F12
http://identifiers.org/wikipathways/WP702_r73516	CYP4F8
http://identifiers.org/wikipathways/WP702_r73516	CYP4F3
http://identifiers.org/wikipathways/WP702_r73516	CYP26C1
http://identifiers.org/wikipathways/WP702_r73516	CYP2F1
http://identifiers.org/wikipathways/WP702_r73516	CYP2A7
http://identifiers.org/wikipathways/WP465_r85055	CYP2F1
http://identifiers.org/wikipathways/WP465_r85055	CYP2J2
http://identifiers.org/wikipathways/WP299_r89331	CYP4B1
http://identifiers.org/wikipathways/WP465_r85055	CYP4F12
http://identifiers.org/wikipathways/WP702_r73516	CYP2A6
http://identifiers.org/wikipathways/WP852_r90919	CYP2D6
http://identifiers.org/wikipathways/WP1286_r69345	CYP1A2
http://identifiers.org/wikipathways/WP1300_r69326	CYP1A2
http://identifiers.org/wikipathways/WP1302_r88025	CYP1A2
http://identifiers.org/wikipathways/WP2541_r87596	CYP1A2
http://identifiers.org/wikipathways/WP1286_r69345	CYP1A1
http://identifiers.org/wikipathways/WP1302_r88025	CYP1A1
http://identifiers.org/wikipathways/WP2541_r87596	CYP1A1
http://identifiers.org/wikipathways/WP1286_r69345	CYP27B1
http://identifiers.org/wikipathways/WP139_r89871	CYP27B1
http://identifiers.org/wikipathways/WP1286_r69345	CYP11B2
http://identifiers.org/wikipathways/WP1286_r69345	CYP4X1
http://identifiers.org/wikipathways/WP1286_r69345	CYP11B1
http://identifiers.org/wikipathways/WP702_r73516	CYP26B1
http://identifiers.org/wikipathways/WP702_r73516	CYP46A1
http://identifiers.org/wikipathways/WP702_r73516	CYP26A1
http://identifiers.org/wikipathways/WP702_r73516	CYP2C18
http://identifiers.org/wikipathways/WP702_r73516	CYP2C9
http://identifiers.org/wikipathways/WP691_r85084	CYP2C9
http://identifiers.org/wikipathways/WP3871_r88572	CYP2C9
http://identifiers.org/wikipathways/WP702_r73516	CYP2C8
http://identifiers.org/wikipathways/WP691_r85084	CYP2C8
http://identifiers.org/wikipathways/WP702_r73516	CYP39A1
http://identifiers.org/wikipathways/WP702_r73516	CYP7B1
http://identifiers.org/wikipathways/WP702_r73516	CYP8B1
http://identifiers.org/wikipathways/WP2878_r88342	CYP8B1
http://identifiers.org/wikipathways/WP3942_r91095	CYP8B1
http://identifiers.org/wikipathways/WP702_r73516	CYP2B6
http://identifiers.org/wikipathways/WP3871_r88572	CYP2B6
http://identifiers.org/wikipathways/WP3915_r90629	CYP2B6
http://identifiers.org/wikipathways/WP2874_r88692	CYP2B6
http://identifiers.org/wikipathways/WP2875_r89203	CYP2B6
http://identifiers.org/wikipathways/WP299_r89331	CYP2B6
http://identifiers.org/wikipathways/WP1600_r90593	CYP2B6
http://identifiers.org/wikipathways/WP3888_r90000	CYP2C8
http://identifiers.org/wikipathways/WP678_r71506	CYP2C8
http://identifiers.org/wikipathways/WP2875_r89203	CYP2C9
http://identifiers.org/wikipathways/WP2875_r89203	CYP
http://identifiers.org/wikipathways/WP299_r89331	CYP2C9
http://identifiers.org/wikipathways/WP299_r89331	CYP
http://identifiers.org/wikipathways/WP678_r71506	CYP2C9
http://identifiers.org/wikipathways/WP678_r71506	CYP
http://identifiers.org/wikipathways/WP465_r85055	CYP2C18
http://identifiers.org/wikipathways/WP2879_r88056	CYP8B1
http://identifiers.org/wikipathways/WP299_r89331	CYP8B1
http://identifiers.org/wikipathways/WP299_r89331	CYP26A1
http://identifiers.org/wikipathways/WP716_r83589	CYP26A1
http://identifiers.org/wikipathways/WP716_r83589	CYP26B1
http://identifiers.org/wikipathways/WP465_r85055	CYP7B1
http://identifiers.org/wikipathways/WP863_r78374	CYP27B1
http://identifiers.org/wikipathways/WP885_r89872	CYP19A1
http://identifiers.org/wikipathways/WP952_r71666	CYP51A1
http://identifiers.org/wikipathways/WP852_r90919	CYP3A4
http://identifiers.org/wikipathways/WP863_r78374	CYP3A4
http://identifiers.org/wikipathways/WP961_r69250	CYP3A4
http://identifiers.org/wikipathways/WP863_r78374	CYP7A1
http://identifiers.org/wikipathways/WP921_r71660	CYP7A1
http://identifiers.org/wikipathways/WP961_r69250	CYP3A5
http://identifiers.org/wikipathways/WP2279_r81183	CYP76C6
http://identifiers.org/wikipathways/WP2279_r81183	CYP76C4
http://identifiers.org/wikipathways/WP2279_r81183	CYP76C1
http://identifiers.org/wikipathways/WP2279_r81183	CYP76C2
http://identifiers.org/wikipathways/WP2279_r81183	CYP76C3
http://identifiers.org/wikipathways/WP2279_r81183	CYP716A1
http://identifiers.org/wikipathways/WP2829_r89460	CYP-13
http://identifiers.org/wikipathways/WP1077_r80775	CYP20A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP20A1
http://identifiers.org/wikipathways/WP1070_r85039	CYP51A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP51A1
http://identifiers.org/wikipathways/WP3194_r80779	CYP51A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP51A1
http://identifiers.org/wikipathways/WP3162_r80731	CYP24A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP24A1
http://identifiers.org/wikipathways/WP981_r80762	CYP24A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP24A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP39A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP39A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP11B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP11B2
http://identifiers.org/wikipathways/WP1077_r80775	CYP17A1
http://identifiers.org/wikipathways/WP3175_r80752	CYP11B1
http://identifiers.org/wikipathways/WP3175_r80752	CYP11B2
http://identifiers.org/wikipathways/WP3175_r80752	CYP17A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP11B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP11B2
http://identifiers.org/wikipathways/WP1006_r80841	CYP17A1
http://identifiers.org/wikipathways/WP1033_r80846	CYP11B1
http://identifiers.org/wikipathways/WP1033_r80846	CYP11B2
http://identifiers.org/wikipathways/WP1033_r80846	CYP17A1
http://identifiers.org/wikipathways/WP3265_r90022	CYP11B1
http://identifiers.org/wikipathways/WP3265_r90022	CYP11B2
http://identifiers.org/wikipathways/WP3265_r90022	CYP17A1
http://identifiers.org/wikipathways/WP3188_r88693	CYP7A1
http://identifiers.org/wikipathways/WP3269_r88057	CYP7A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP7A1
http://identifiers.org/wikipathways/WP981_r80762	CYP7A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP7A1
http://identifiers.org/wikipathways/WP1041_r82697	CYP7A1
http://identifiers.org/wikipathways/WP3253_r87244	CYP7A1
http://identifiers.org/wikipathways/WP3258_r88343	CYP7A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP11A1
http://identifiers.org/wikipathways/WP3175_r80752	CYP11A1
http://identifiers.org/wikipathways/WP995_r80872	CYP11A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP11A1
http://identifiers.org/wikipathways/WP3265_r90022	CYP11A1
http://identifiers.org/wikipathways/WP3162_r80731	CYP2R1
http://identifiers.org/wikipathways/WP1077_r80775	CYP2R1
http://identifiers.org/wikipathways/WP1006_r80841	CYP2R1
http://identifiers.org/wikipathways/WP1077_r80775	CYP4B1
http://identifiers.org/wikipathways/WP981_r80762	CYP4B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP4B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP26B1
http://identifiers.org/wikipathways/WP987_r80782	CYP26B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP26B1
http://identifiers.org/wikipathways/WP1038_r80754	CYP26B1
http://identifiers.org/wikipathways/WP3843_r86817	CYP26B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP2U1
http://identifiers.org/wikipathways/WP1006_r80841	CYP2U1
http://identifiers.org/wikipathways/WP3162_r80731	CYP27A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP27A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP27A1
http://identifiers.org/wikipathways/WP1024_r80801	CYP17A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP4X1
http://identifiers.org/wikipathways/WP1006_r80841	CYP4X1
http://identifiers.org/wikipathways/WP3162_r80731	CYP27B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP27B1
http://identifiers.org/wikipathways/WP981_r80762	CYP27B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP27B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP2W1
http://identifiers.org/wikipathways/WP1006_r80841	CYP2W1
http://identifiers.org/wikipathways/WP1077_r80775	CYP2S1
http://identifiers.org/wikipathways/WP1006_r80841	CYP2S1
http://identifiers.org/wikipathways/WP1077_r80775	CYP26A1
http://identifiers.org/wikipathways/WP981_r80762	CYP26A1
http://identifiers.org/wikipathways/WP987_r80782	CYP26A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP26A1
http://identifiers.org/wikipathways/WP1038_r80754	CYP26A1
http://identifiers.org/wikipathways/WP3843_r86817	CYP26A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP4V2
http://identifiers.org/wikipathways/WP1006_r80841	CYP4V2
http://identifiers.org/wikipathways/WP3269_r88057	CYP8B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP8B1
http://identifiers.org/wikipathways/WP981_r80762	CYP8B1
http://identifiers.org/wikipathways/WP1006_r80841	CYP8B1
http://identifiers.org/wikipathways/WP3258_r88343	CYP8B1
http://identifiers.org/wikipathways/WP1077_r80775	CYP46A1
http://identifiers.org/wikipathways/WP1006_r80841	CYP46A1
http://identifiers.org/wikipathways/WP1077_r80775	CYP27C1
http://identifiers.org/wikipathways/WP1006_r80841	CYP27C1
http://identifiers.org/wikipathways/WP1077_r80775	CYP26C1
http://identifiers.org/wikipathways/WP1006_r80841	CYP26C1
http://identifiers.org/wikipathways/WP3175_r80752	CYP21A2
http://identifiers.org/wikipathways/WP1006_r80841	CYP21A2
http://identifiers.org/wikipathways/WP3265_r90022	CYP21A2
http://identifiers.org/wikipathways/WP1077_r80775	CYP4F22
http://identifiers.org/wikipathways/WP1006_r80841	CYP4F22
http://identifiers.org/wikipathways/WP2912_r87857	CYP4A11
http://identifiers.org/wikipathways/WP2912_r87857	CYP4A22
http://identifiers.org/wikipathways/WP1251_r69747	CYP11B1
http://identifiers.org/wikipathways/WP1274_r73502	CYP11B1
http://identifiers.org/wikipathways/WP1251_r69747	CYP11B2
http://identifiers.org/wikipathways/WP1274_r73502	CYP11B2
http://identifiers.org/wikipathways/WP495_r71740	CYP11B2
http://identifiers.org/wikipathways/WP702_r73516	CYP51A1
http://identifiers.org/wikipathways/WP1982_r90425	CYP51A1
http://identifiers.org/wikipathways/WP702_r73516	CYP24A1
http://identifiers.org/wikipathways/WP2706_r87078	CYP51A1 gene
http://identifiers.org/wikipathways/WP1471_r90258	CYP51A1 gene
http://identifiers.org/wikipathways/WP1982_r90425	CYP51A1 gene
http://identifiers.org/wikipathways/WP702_r73516	CYP27B1
http://identifiers.org/wikipathways/WP702_r73516	CYP2E1
http://identifiers.org/wikipathways/WP691_r85084	CYP2E1
http://identifiers.org/wikipathways/WP2816_r88575	CYP2E1
http://identifiers.org/wikipathways/WP3627_r90137	CYP2E1
http://identifiers.org/wikipathways/WP3891_r89359	CYP2E1
http://identifiers.org/wikipathways/WP702_r73516	CYP27A1
http://identifiers.org/wikipathways/WP3942_r91095	CYP27A1
http://identifiers.org/wikipathways/WP702_r73516	CYP1B1
http://identifiers.org/wikipathways/WP2873_r88902	CYP1B1
http://identifiers.org/wikipathways/WP697_r86903	CYP1B1
http://identifiers.org/wikipathways/WP691_r85084	CYP1B1
http://identifiers.org/wikipathways/WP3298_r91533	CYP1B1
http://identifiers.org/wikipathways/WP696_r89537	CYP1B1
http://identifiers.org/wikipathways/WP2542_r88583	CYP1B1
http://identifiers.org/wikipathways/WP2881_r88032	CYP1B1
http://identifiers.org/wikipathways/WP702_r73516	CYP1A1
http://identifiers.org/wikipathways/WP702_r73516	CYP1A1 gene
http://identifiers.org/wikipathways/WP2873_r88902	CYP1A1
http://identifiers.org/wikipathways/WP2873_r88902	CYP1A1 gene
http://identifiers.org/wikipathways/WP2797_r88142	CYP1A1
http://identifiers.org/wikipathways/WP2797_r88142	CYP1A1 gene
http://identifiers.org/wikipathways/WP697_r86903	CYP1A1
http://identifiers.org/wikipathways/WP697_r86903	CYP1A1 gene
http://identifiers.org/wikipathways/WP691_r85084	CYP1A1
http://identifiers.org/wikipathways/WP691_r85084	CYP1A1 gene
http://identifiers.org/wikipathways/WP3298_r91533	CYP1A1
http://identifiers.org/wikipathways/WP3298_r91533	CYP1A1 gene
http://identifiers.org/wikipathways/WP696_r89537	CYP1A1
http://identifiers.org/wikipathways/WP696_r89537	CYP1A1 gene
http://identifiers.org/wikipathways/WP2881_r88032	CYP1A1
http://identifiers.org/wikipathways/WP2881_r88032	CYP1A1 gene
http://identifiers.org/wikipathways/WP699_r70509	CYP1A2
http://identifiers.org/wikipathways/WP702_r73516	CYP1A2
http://identifiers.org/wikipathways/WP2873_r88902	CYP1A2
http://identifiers.org/wikipathways/WP697_r86903	CYP1A2
http://identifiers.org/wikipathways/WP691_r85084	CYP1A2
http://identifiers.org/wikipathways/WP3298_r91533	CYP1A2
http://identifiers.org/wikipathways/WP694_r89536	CYP1A2
http://identifiers.org/wikipathways/WP2646_r74430	CYP1A2
http://identifiers.org/wikipathways/WP2542_r88583	CYP1A2
http://identifiers.org/wikipathways/WP2881_r88032	CYP1A2
http://identifiers.org/wikipathways/WP702_r73516	CYP7A1
http://identifiers.org/wikipathways/WP702_r73516	CYP7A1 gene
http://identifiers.org/wikipathways/WP2878_r88342	CYP7A1
http://identifiers.org/wikipathways/WP2878_r88342	CYP7A1 gene
http://identifiers.org/wikipathways/WP2797_r88142	CYP7A1
http://identifiers.org/wikipathways/WP2797_r88142	CYP7A1 gene
http://identifiers.org/wikipathways/WP3942_r91095	CYP7A1
http://identifiers.org/wikipathways/WP3942_r91095	CYP7A1 gene
http://identifiers.org/wikipathways/WP3915_r90629	CYP7A1
http://identifiers.org/wikipathways/WP3915_r90629	CYP7A1 gene
http://identifiers.org/wikipathways/WP702_r73516	CYP2R1
http://identifiers.org/wikipathways/WP1531_r82221	CYP2R1
http://identifiers.org/wikipathways/WP408_r78546	CYP1A1
http://identifiers.org/wikipathways/WP465_r85055	CYP1A1
http://identifiers.org/wikipathways/WP206_r90917	CYP1A1
http://identifiers.org/wikipathways/WP2586_r89793	CYP1A1
http://identifiers.org/wikipathways/WP299_r89331	CYP1A2
http://identifiers.org/wikipathways/WP465_r85055	CYP1A2
http://identifiers.org/wikipathways/WP206_r90917	CYP1A2
http://identifiers.org/wikipathways/WP2586_r89793	CYP1A2
http://identifiers.org/wikipathways/WP465_r85055	CYP1B1
http://identifiers.org/wikipathways/WP2586_r89793	CYP1B1
http://identifiers.org/wikipathways/WP1589_r87508	CYP2E1
http://identifiers.org/wikipathways/WP299_r89331	CYP2E1
http://identifiers.org/wikipathways/WP716_r83589	CYP2E1
http://identifiers.org/wikipathways/WP465_r85055	CYP2E1
http://identifiers.org/wikipathways/WP206_r90917	CYP2E1
http://identifiers.org/wikipathways/WP2289_r88593	CYP7A1
http://identifiers.org/wikipathways/WP2874_r88692	CYP7A1
http://identifiers.org/wikipathways/WP2879_r88056	CYP7A1
http://identifiers.org/wikipathways/WP299_r89331	CYP7A1
http://identifiers.org/wikipathways/WP430_r90508	CYP7A1
http://identifiers.org/wikipathways/WP299_r89331	CYP24A1
http://identifiers.org/wikipathways/WP1531_r82221	CYP24A1
http://identifiers.org/wikipathways/WP1531_r82221	CYP27A1
http://identifiers.org/wikipathways/WP299_r89331	CYP27B1
http://identifiers.org/wikipathways/WP1531_r82221	CYP27B1
http://identifiers.org/wikipathways/WP197_r91292	CYP51A1
http://identifiers.org/wikipathways/WP1604_r89511	CYP2D7P1
http://identifiers.org/wikipathways/WP755_r89869	CYP24A1
http://identifiers.org/wikipathways/WP755_r89869	CYP26A1
http://identifiers.org/wikipathways/WP805_r81022	CYP26A1
http://identifiers.org/wikipathways/WP755_r89869	CYP7A1
http://identifiers.org/wikipathways/WP755_r89869	CYP1A2
http://identifiers.org/wikipathways/WP755_r89869	CYP3A80
http://identifiers.org/wikipathways/WP755_r89869	CYP4B1
http://identifiers.org/wikipathways/WP755_r89869	CYP8B
http://identifiers.org/wikipathways/WP805_r81022	CYP26B1

Exercice 4 : OPTIONAL

A partir de la requête précédente, lister les identifiants EntrezGene des gènes "CYP".


In [60]:
query = """
SELECT DISTINCT ?pathway str(?label) as ?geneProduct ?idEG
WHERE {
    ?geneProduct a wp:GeneProduct . 
    OPTIONAL{?geneProduct wp:bdbEntrezGene ?idEG .}
    ?geneProduct rdfs:label ?label .
    ?geneProduct dcterms:isPartOf ?pathway .
    ?pathway a wp:Pathway .
    
    FILTER regex(str(?label), "CYP"). 
}
"""

In [67]:
sparql.setQuery(prefix + query)
sparql.setReturnFormat(JSON)

In [68]:
results = sparql.query().convert()

In [70]:
# print results
for result in results["results"]["bindings"]:
    if (typeOf(result['idEG']['value'] != undefined)) :
        print result['pathway']['value'] + "\t" + result['geneProduct']['value'] + "\t" + result['idEG']['value']


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-70-52f600294a67> in <module>()
      1 # print results
----> 2 for result in results["results"]["bindings"]:
      3     if (typeOf(result['idEG']['value'] != undefined)) :
      4         print result['pathway']['value'] + "\t" + result['geneProduct']['value'] + "\t" + result['idEG']['value']

TypeError: string indices must be integers, not str

In [ ]: