A set of SPARQL examples that are used in LOTUS
Compounds found in (children) taxa of ott_id.
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
#title: Compounds found in (children) taxa of ott_id.
SELECT DISTINCT ?compound ?compoundLabel ?compound_inchikey ?childrenLabel WHERE {
VALUES ?ott_id {
"332362"
"1000758"
}
?taxon wdt:P9157 ?ott_id.
?children (wdt:P171*) ?taxon.
?compound wdt:P235 ?compound_inchikey;
wdt:P703 ?children.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}
LIMIT 10000
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?children")
v4("?compound"):::projected
v5("?compound_inchikey"):::projected
v1("?ott_id")
v2("?taxon")
c6([http://www.bigdata.com/rdf#serviceParam]):::iri
c8(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal
bind0[/VALUES ?ott_id/]
bind0-->v1
bind00(["332362"])
bind00 --> bind0
bind01(["1000758"])
bind01 --> bind0
v2 --"wdt:P9157"--> v1
v3 --"wdt:P171"--> v2
v4 --"wdt:P235"--> v5
v4 --"wdt:P703"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end