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_00086

Proteins whose genes are located in chromosome 2 region from 2p12 to 2p24.2

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT DISTINCT ?entry WHERE {
 ?entry :gene ?gene .
 ?gene :chromosome "2"^^xsd:string .
 ?gene :band ?band.
 filter (?band >= "p12"@en && ?band <= "p24.2"@en )
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?band")
  v2("?entry"):::projected 
  v3("?gene")
  c5(["2"]):::literal 
  f0[["?band >= sp12^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>'?band <= sp24.2^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>'"]]
  f0 --> v1
  v2 --":gene"-->  v3
  v3 --":chromosome"-->  c5
  v3 --":band"-->  v1