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_00224

Transmembrane proteins with at least 100 consecutive aa located in the EXTRACELLULAR OR LUMENAL compartment.

Use at

PREFIX : <http://nextprot.org/rdf/>
PREFIX nextprot_cv: <http://nextprot.org/rdf/terminology/>

SELECT DISTINCT ?entry WHERE {
 ?entry :isoform ?iso.
 ?iso :topologicalDomain ?topdom .
 ?topdom :term ?topterm .
 filter (?topterm in (nextprot_cv:CVTO_0002, nextprot_cv:CVTO_0003, nextprot_cv:CVTO_0007)) # extracellular, exoplasmic loop, lumenal
 ?topdom :start ?domstart; :end ?domend .
 filter ((?domend - ?domstart) >= 100)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?domend")
  v2("?domstart")
  v4("?entry"):::projected 
  v5("?iso")
  v6("?topdom")
  v3("?topterm")
  f0[["?domend - ?domstart >= '100^^xsd:integer'"]]
  f0 --> v1
  f0 --> v2
  list0c1([":terminology/CVTO_0002"]):::iri 
  list0c3([":terminology/CVTO_0007"]):::iri 
  list0c2([":terminology/CVTO_0003"]):::iri 
  list0c1 --o f1
  list0c2 --o f1
  list0c3 --o f1
  f1[[" in "]]
  f1 --> v3
  v4 --":isoform"-->  v5
  v5 --":topologicalDomain"-->  v6
  v6 --":term"-->  v3
  v6 --":start"-->  v2
  v6 --":end"-->  v1