sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

1

Find all OrthoDB species with attached OrthoDB organisms containing "drosophila" in the beginning of the taxonomic name

Use at

PREFIX up: <http://purl.uniprot.org/core/>
PREFIX : <http://purl.orthodb.org/>

SELECT *
WHERE {
    ?tx a :Species; up:scientificName ?tax_name .
    ?org a ?tx; up:scientificName ?org_name.
    FILTER(strstarts (lcase(?tax_name ), "drosophila" ))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?org"):::projected 
  v4("?org_name"):::projected 
  v1("?tax_name"):::projected 
  v2("?tx"):::projected 
  c3([":Species"]):::iri 
  f0[["starts-with(lower-case(?tax_name),'drosophila')"]]
  f0 --> v1
  v2 --"a"-->  c3
  v2 --"up:scientificName"-->  v1
  v3 --"a"-->  v2
  v3 --"up:scientificName"-->  v4