A set of SPARQL examples that are used in different SIB resources
Find in any organsim under Gammaproteobacteria all genes containing word "protease", case-insensitive, anywhere in description
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX : <http://purl.orthodb.org/>
SELECT *
WHERE {
?tx rdfs:subClassOf+/up:scientificName "Gammaproteobacteria".
?gene a :Gene; up:organism/a ?tx; :description ?description.
FILTER(contains (lcase(?description), "protease" ))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?description"):::projected
v3("?gene"):::projected
v2("?tx"):::projected
a1((" "))
a2((" "))
c6([":Gene"]):::iri
c4(["Gammaproteobacteria"]):::literal
f0[["contains(lower-case(?description),'protease')"]]
f0 --> v1
v2 --"rdfs:subClassOf"--> a1
a1 --"up:scientificName"--> c4
v3 --"a"--> c6
v3 --"up:organism"--> a2
a2 --"a"--> v2
v3 --":description"--> v1