sparql-examples

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

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

neXtProt/NXQ_00291

UniPathway and related GO

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX source: <http://nextprot.org/rdf/source/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

select distinct (str(?plab) as ?uniplab) (str(?golab) as ?GOlab) where
{
?entry :isoform / :pathway ?p.
?p :evidence / :assignedBy source:Uniprot .
?p rdfs:comment ?plab.
?p :term / :related ?gorel .
filter(contains(str(?gorel),"GO_"))
 ?gorel rdfs:label ?golab .
}
order by ?plab
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v7("?GOlab")
  v3("?entry")
  v5("?golab"):::projected 
  v2("?gorel")
  v4("?p")
  v1("?plab"):::projected 
  v6("?uniplab")
  a1((" "))
  a2((" "))
  a3((" "))
  c6([":source/Uniprot"]):::iri 
  f0[["contains(str(?gorel),'GO_')"]]
  f0 --> v2
  v3 --":isoform"-->  a1
  a1 --":pathway"-->  v4
  v4 --":evidence"-->  a2
  a2 --":assignedBy"-->  c6
  v4 --"rdfs:comment"-->  v1
  v4 --":term"-->  a3
  a3 --":related"-->  v2
  v2 --"rdfs:label"-->  v5
  bind1[/"str(?plab)"/]
  v1 --o bind1
  bind1 --as--o v6
  bind2[/"str(?golab)"/]
  v5 --o bind2
  bind2 --as--o v7