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_00020

Proteins with at least 2 HPA antibodies whose genes are located on chromosome 21 and that are highly expressed according to IHC in heart

Use at

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

select ?entry WHERE {
 SELECT DISTINCT ?entry ?id WHERE {
 ?entry :gene / :chromosome "21"^^xsd:string .
 ?entry :isoform / :expressionProfile ?s1.
 ?s1 :term / :childOf nextprot_cv:TS-0445.
 ?s1 :evidence ?evi.
 ?evi :observedExpression :High.
 ?evi :evidenceCode nextprot_cv:ECO_0001055.
 ?entry :isoform / :antibodyMapping ?map.
	 ?map :evidence / :reference / :accession ?id .
 }
} group by ?entry having (count(?id)>=2)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v6("?_anon_524857e97b124dceaa8a4ecc8d1a18271749")
  v1("?entry"):::projected 
  v3("?evi")
  v5("?id")
  v4("?map")
  v2("?s1")
  a2((" "))
  a3((" "))
  a4((" "))
  a5((" "))
  a6((" "))
  a7((" "))
  a1((" "))
  c12([":High"]):::iri 
  c14([":terminology/ECO_0001055"]):::iri 
  c9([":terminology/TS-0445"]):::iri 
  c4(["21"]):::literal 
  f0[[" >= '2^^xsd:integer'"]]
  f0 --> a1
  v1 --":gene"-->  a2
  a2 --":chromosome"-->  c4
  v1 --":isoform"-->  a3
  a3 --":expressionProfile"-->  v2
  v2 --":term"-->  a4
  a4 --":childOf"-->  c9
  v2 --":evidence"-->  v3
  v3 --":observedExpression"-->  c12
  v3 --":evidenceCode"-->  c14
  v1 --":isoform"-->  a5
  a5 --":antibodyMapping"-->  v4
  v4 --":evidence"-->  a6
  a6 --":reference"-->  a7
  a7 --":accession"-->  v5
  bind2[/"count(?id)"/]
  v5 --o bind2
  bind2 --as--o v6