query-e690374386d8cc0926e1d0a7bbac8559
Propertiescanonical SMILES (P233)isomeric SMILES (P2017)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT DISTINCT ?sourceWD ?sourceWDLabel ?sourceSMILES ?targetWD ?targetWDLabel ?targetSMILES WHERE {
{
SELECT ?sourceWD ?targetWD WHERE {
SERVICE <http://sparql.wikipathways.org/sparql> {
?pathway a wp:Pathway .
?interaction dcterms:isPartOf ?pathway .
?interaction a wp:Interaction, wp:Conversion .
?interaction wp:source ?source . ?source a wp:Metabolite; wp:bdbWikidata ?sourceWD .
?interaction wp:target ?target . ?target a wp:Metabolite; wp:bdbWikidata ?targetWD .
}
}
} OPTIONAL { ?sourceWD wdt:P233 ?sourceSMILEScan }
OPTIONAL { ?sourceWD wdt:P2017 ?sourceSMILESiso }
BIND (COALESCE(?sourceSMILESiso, ?sourceSMILEScan) AS ?sourceSMILES)
OPTIONAL { ?targetWD wdt:P233 ?targetSMILEScan }
OPTIONAL { ?targetWD wdt:P2017 ?targetSMILESiso }
BIND (COALESCE(?targetSMILESiso, ?targetSMILEScan) AS ?targetSMILES)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?interaction")
v1("?pathway")
v3("?source")
v9("?sourceSMILES"):::projected
v7("?sourceSMILEScan")
v8("?sourceSMILESiso")
v4("?sourceWD"):::projected
v5("?target")
v12("?targetSMILES"):::projected
v10("?targetSMILEScan")
v11("?targetSMILESiso")
v6("?targetWD"):::projected
c5([http://vocabularies.wikipathways.org/wp#Interaction]):::iri
c3([http://vocabularies.wikipathways.org/wp#Pathway]):::iri
c8([http://vocabularies.wikipathways.org/wp#Metabolite]):::iri
c14(["bd:serviceParam"]):::iri
c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c6([http://vocabularies.wikipathways.org/wp#Conversion]):::iri
subgraph s1["http://sparql.wikipathways.org/sparql"]
style s1 stroke-width:4px;
v1 --"a"--> c3
v2 --http://purl.org/dc/terms/isPartOf--> v1
v2 --"a"--> c5
v2 --"a"--> c6
v2 --http://vocabularies.wikipathways.org/wp#source--> v3
v3 --"a"--> c8
v3 --http://vocabularies.wikipathways.org/wp#bdbWikidata--> v4
v2 --http://vocabularies.wikipathways.org/wp#target--> v5
v5 --"a"--> c8
v5 --http://vocabularies.wikipathways.org/wp#bdbWikidata--> v6
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P233".-> v7
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P2017".-> v8
end
bind0[/"?sourceSMILESiso?sourceSMILEScan"/]
v8 --o bind0
v7 --o bind0
bind0 --as--o v9
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v6 -."wdt:P233".-> v10
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v6 -."wdt:P2017".-> v11
end
bind1[/"?targetSMILESiso?targetSMILEScan"/]
v11 --o bind1
v10 --o bind1
bind1 --as--o v12
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c14 --"wikibase:language"--> c16
end