sparql-examples

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

View the Project on GitHub ytirlet/sparql-examples

M74_module

rq turtle/ttl

Taxon, his Scientific name and super Class

Use at

PREFIX up: <http://purl.uniprot.org/core/>
  PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?taxon ?superTaxon ?name ?rank
WHERE {
        ?taxon rdf:type up:Taxon.
        ?taxon up:scientificName ?name.
        ?taxon rdfs:subClassOf ?superTaxon.
        ?taxon up:rank ?rank.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?name"):::projected 
  v4("?rank"):::projected 
  v3("?superTaxon"):::projected 
  v1("?taxon"):::projected 
  c2(["up:Taxon"]):::iri 
  v1 --"a"-->  c2
  v1 --"up:scientificName"-->  v2
  v1 --"rdfs:subClassOf"-->  v3
  v1 --"up:rank"-->  v4