A set of SPARQL examples that are used in LOTUS
Biological activities of compounds found in Araneae (Q1357) or children taxa.
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#title: Biological activities of compounds found in Araneae (Q1357) or children taxa.
SELECT DISTINCT ?compound ?compound_inchikey (GROUP_CONCAT(DISTINCT ?meshLabel; SEPARATOR = "|") AS ?bioactivities) WHERE {
VALUES ?taxon {
wd:Q1357
}
?compound wdt:P235 ?compound_inchikey;
wdt:P703/(wdt:P171*) ?taxon;
(wdt:P2868/wdt:P486) ?meshId.
?mesh wdt:P486 ?meshId;
rdfs:label ?meshLabel.
FILTER(LANG(?meshLabel) = "en")
}
GROUP BY ?compound ?compound_inchikey
LIMIT 100
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?bioactivities")
v3("?compound"):::projected
v4("?compound_inchikey"):::projected
v6("?mesh")
v5("?meshId")
v1("?meshLabel"):::projected
v2("?taxon")
a1((" "))
a2((" "))
f0[["?meshLabel = 'en'"]]
f0 --> v1
bind1[/VALUES ?taxon/]
bind1-->v2
bind10(["wd:Q1357"])
bind10 --> bind1
v3 --"wdt:P235"--> v4
v3 --"wdt:P703"--> a1
a1 --"wdt:P171"--> v2
v3 --"wdt:P2868"--> a2
a2 --"wdt:P486"--> v5
v6 --"wdt:P486"--> v5
v6 --"rdfs:label"--> v1
bind3[/"?meshLabel"/]
v1 --o bind3
bind3 --as--o v7