sparql-examples

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

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

sparql-examples4

Select all glycosylations (glycan, protein, position) with their associated disease where the name start with 'cancer'

Use at

PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX glycan: <http://purl.jp/bio/12/glyco/glycan#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sio: <http://semanticscience.org/resource/>

SELECT distinct ?glycoprotein ?isoform ?position ?structure ?disease ?diseasename
where {
?glycosite faldo:reference ?isoform .
?glycosite faldo:position ?position .
?specificglycosite faldo:location ?glycosite .
?glycoprotein glycan:glycosylated_at ?specificglycosite .
?structure glycan:glycosylates_at ?specificglycosite .
?refconjugate glycan:has_protein_part ?glycoprotein .
?refconjugate glycan:has_association ?refconjugatedisease .
?refconjugatedisease sio:SIO_000628 ?disease .
?disease rdfs:label ?diseasename .
FILTER regex(?diseasename, "^cancer", "i") .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v10("?disease"):::projected 
  v1("?diseasename"):::projected 
  v6("?glycoprotein"):::projected 
  v2("?glycosite")
  v3("?isoform"):::projected 
  v4("?position"):::projected 
  v8("?refconjugate")
  v9("?refconjugatedisease")
  v5("?specificglycosite")
  v7("?structure"):::projected 
  f0[["regex(?diseasename,'^cancer','i')"]]
  f0 --> v1
  v2 --"faldo:reference"-->  v3
  v2 --"faldo:position"-->  v4
  v5 --"faldo:location"-->  v2
  v6 --"glycan:glycosylated_at"-->  v5
  v7 --"glycan:glycosylates_at"-->  v5
  v8 --"glycan:has_protein_part"-->  v6
  v8 --"glycan:has_association"-->  v9
  v9 --"sio:SIO_000628"-->  v10
  v10 --"rdfs:label"-->  v1