A set of SPARQL examples that are used in different SIB resources
Genes expressed in the human's brain during the infant stage and their UniProt disease annotations.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX genex: <http://purl.org/genex#>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX orth: <http://purl.org/net/orth#>
SELECT DISTINCT ?geneEns ?uniprot ?annotation {
{
SELECT ?geneEns {
?geneB genex:isExpressedIn ?cond ;
lscr:xrefEnsemblGene ?geneEns .
?cond genex:hasDevelopmentalStage ?st .
?cond genex:hasAnatomicalEntity ?anat .
?st rdfs:label 'infant stage' .
?anat rdfs:label 'brain' .
?geneB orth:organism ?o .
?o obo:RO_0002162 ?taxon2 .
?taxon2 up:commonName 'human' .
}
LIMIT 10
}
SERVICE <https://sparql.uniprot.org/sparql> {
?uniprot up:transcribedFrom ?geneEns .
?uniprot up:annotation ?annotation .
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?anat")
v9("?annotation"):::projected
v2("?cond")
v1("?geneB")
v3("?geneEns"):::projected
v6("?o")
v4("?st")
v7("?taxon2")
v8("?uniprot"):::projected
c6(["infant stage"]):::literal
c7(["brain"]):::literal
c11(["human"]):::literal
v1 --"genex:isExpressedIn"--> v2
v1 --"lscr:xrefEnsemblGene"--> v3
v2 --"genex:hasDevelopmentalStage"--> v4
v2 --"genex:hasAnatomicalEntity"--> v5
v4 --"rdfs:label"--> c6
v5 --"rdfs:label"--> c7
v1 --"orth:organism"--> v6
v6 --"obo:RO_0002162"--> v7
v7 --"up:commonName"--> c11
subgraph s1["https://sparql.uniprot.org/sparql"]
style s1 stroke-width:4px;
v8 --"up:transcribedFrom"--> v3
v8 --"up:annotation"--> v9
end