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_00046

Proteins with a gene alternative name starting with IL27

Use at

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

SELECT DISTINCT ?entry ?recname ?altname WHERE {
 ?entry :gene ?gn.
 ?gn :recommendedName / rdfs:label ?recname.
 ?gn :alternativeName / rdfs:label ?altname.
 filter (regex(?altname, "^IL27"))
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?altname"):::projected 
  v2("?entry"):::projected 
  v3("?gn")
  v4("?recname"):::projected 
  a1((" "))
  a2((" "))
  f0[["regex(?altname,'^IL27')"]]
  f0 --> v1
  v2 --":gene"-->  v3
  v3 --":recommendedName"-->  a1
  a1 --"rdfs:label"-->  v4
  v3 --":alternativeName"-->  a2
  a2 --"rdfs:label"-->  v1