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_00104

Proteins whose gene is on chromosome 21 with at least one disease annotation from Orphanet

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX source: <http://nextprot.org/rdf/source/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?entry (str(?disname) as ?disease) WHERE {
 ?entry :isoform ?iso; :gene / :chromosome "21"^^xsd:string .
 ?iso :disease ?medannot .
 ?medannot rdfs:comment ?disname; :evidence / :assignedBy source:Orphanet.
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v5("?disease")
  v4("?disname"):::projected 
  v1("?entry"):::projected 
  v2("?iso")
  v3("?medannot")
  a1((" "))
  a2((" "))
  c9([":source/Orphanet"]):::iri 
  c4(["21"]):::literal 
  v1 --":isoform"-->  v2
  v1 --":gene"-->  a1
  a1 --":chromosome"-->  c4
  v2 --":disease"-->  v3
  v3 --"rdfs:comment"-->  v4
  v3 --":evidence"-->  a2
  a2 --":assignedBy"-->  c9
  bind0[/"str(?disname)"/]
  v4 --o bind0
  bind0 --as--o v5