A set of SPARQL examples that are used in LOTUS
Taxa containing compounds corresponding to chemical formula.
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title: Taxa containing compounds corresponding to chemical formula.
SELECT DISTINCT ?compound ?smiles_canonical ?formula ?taxon ?taxon_name WHERE {
{
VALUES ?formula {
"C₉H₁₁Cl₂FN₂O₂S₂" # Use lower case digits ₁₂₃₄₅₆₇₈₉₀
"C₂₂H₂₂O₉"
}
?compound wdt:P274 ?formula;
wdt:P233 ?smiles_canonical;
wdt:P703 ?taxon.
?taxon wdt:P225 ?taxon_name.}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?compound"):::projected
v1("?formula"):::projected
v3("?smiles_canonical"):::projected
v4("?taxon"):::projected
v5("?taxon_name"):::projected
bind0[/VALUES ?formula/]
bind0-->v1
bind00(["C₉H₁₁Cl₂FN₂O₂S₂"])
bind00 --> bind0
bind01(["C₂₂H₂₂O₉"])
bind01 --> bind0
v2 --"wdt:P274"--> v1
v2 --"wdt:P233"--> v3
v2 --"wdt:P703"--> v4
v4 --"wdt:P225"--> v5