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_00237

Transmembrane proteins with the number of transmembrane domains in the canonical isoform by decreasing order

Use at

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

select ?entry (count(distinct(?statement)) as ?tmcnt) WHERE {
 ?entry :isoform ?iso.
 ?iso :swissprotDisplayed true .
 ?iso :topology ?statement.
 ?statement a :TransmembraneRegion.
}
group by ?entry
order by desc(?tmcnt)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v2("?entry"):::projected 
  v3("?iso")
  v4("?statement"):::projected 
  v5("?tmcnt")
  c3(["true^^xsd:boolean"]):::literal 
  c6([":TransmembraneRegion"]):::iri 
  v2 --":isoform"-->  v3
  v3 --":swissprotDisplayed"-->  c3
  v3 --":topology"-->  v4
  v4 --"a"-->  c6
  bind1[/"count(?statement)"/]
  v4 --o bind1
  bind1 --as--o v5