A set of SPARQL examples that are used in LOTUS
Siderophores found in taxa (limited to 1000 results).
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: Siderophores found in taxa (limited to 1000 results).
SELECT DISTINCT ?compound ?compound_smiles ?compound_inchikey ?taxon ?taxon_name ?reference ?reference_doi WHERE {
VALUES ?siderophores {
wd:Q424747 # siderophores
wd:Q50349216 # iron chelating agent
wd:Q71429918 # iron ionophore
}
?compound wdt:P235 ?compound_inchikey; # get the inchikey
wdt:P233 ?compound_smiles; # get the smiles
wdt:P2868 ?siderophores;
p:P703[ # statement found in taxon
ps:P703 ?taxon; # get the taxon
(prov:wasDerivedFrom/pr:P248) ?reference ]. # get the reference
?taxon wdt:P225 ?taxon_name. # get the taxon scientific name
?reference wdt:P356 ?reference_doi. # get the reference DOI
}
LIMIT 1000
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?compound"):::projected
v3("?compound_inchikey"):::projected
v4("?compound_smiles"):::projected
v6("?reference"):::projected
v8("?reference_doi"):::projected
v1("?siderophores")
v5("?taxon"):::projected
v7("?taxon_name"):::projected
a1((" "))
a2((" "))
bind0[/VALUES ?siderophores/]
bind0-->v1
bind00(["wd:Q424747"])
bind00 --> bind0
bind01(["wd:Q50349216"])
bind01 --> bind0
bind02(["wd:Q71429918"])
bind02 --> bind0
v2 --"p:direct/P235"--> v3
v2 --"p:direct/P233"--> v4
v2 --"p:direct/P2868"--> v1
a1 --"p:statement/P703"--> v5
a1 --"prov:wasDerivedFrom"--> a2
a2 --"p:reference/P248"--> v6
v2 --"p:P703"--> a1
v5 --"p:direct/P225"--> v7
v6 --"p:direct/P356"--> v8