A set of SPARQL examples that are used in different SIB resources
Retrieve all genes that are paralogous to ENSG00000244734 Ensembl gene (identifier).
PREFIX ensembl: <http://rdf.ebi.ac.uk/resource/ensembl/>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sio: <http://semanticscience.org/resource/>
SELECT ?protein2 ?OMA_LINK
WHERE {
# The three that contains paralogs. The leafs are proteins.
# This graph pattern defines the relationship protein1 is paralogous to protein2
?cluster a orth:ParalogsCluster ;
orth:hasHomologousMember ?node1 ;
orth:hasHomologousMember ?node2 .
?node2 orth:hasHomologousMember* ?protein2 .
?node1 orth:hasHomologousMember* ?protein1 .
# Specify the protein to look for its paralogs
?protein1 sio:SIO_010079/lscr:xrefEnsemblGene ensembl:ENSG00000244734 .
# The OMA link to the second protein
?protein2 rdfs:seeAlso ?OMA_LINK .
FILTER(?node1 != ?node2)
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?OMA_LINK"):::projected
v3("?cluster")
v1("?node1")
v2("?node2")
v5("?protein1")
v4("?protein2"):::projected
a1((" "))
c2(["orth:ParalogsCluster"]):::iri
c6(["ensembl:ENSG00000244734"]):::iri
f0[["?node1 != ?node2"]]
f0 --> v1
f0 --> v2
v3 --"a"--> c2
v3 --"orth:hasHomologousMember"--> v1
v3 --"orth:hasHomologousMember"--> v2
v2 --"orth:hasHomologousMember"--> v4
v1 --"orth:hasHomologousMember"--> v5
v5 --"sio:SIO_010079"--> a1
a1 --"lscr:xrefEnsemblGene"--> c6
v4 --"rdfs:seeAlso"--> v6