A set of SPARQL examples that are used in different SIB resources
Find Drosophila enzymes, that depend on more than one transcript (requires cross-references to Ensembl family of resources).
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?protein
WHERE {
?protein up:organism taxon:7227 ;
a up:Protein ;
up:reviewed true ;
rdfs:seeAlso ?transcript .
{
?protein up:annotation/a up:Catalytic_Activity_Annotation ;
} UNION {
?protein up:enzyme ?enzyme .
}
?transcript a up:Transcript_Resource .
} GROUP BY ?protein HAVING(COUNT(?transcript) >= 2)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?_anon_524857e97b124dceaa8a4ecc8d1a18276528")
v3("?enzyme")
v1("?protein"):::projected
v2("?transcript")
a2((" "))
a1((" "))
c3(["taxon:7227"]):::iri
c12(["up:Transcript_Resource"]):::iri
c7(["true^^xsd:boolean"]):::literal
c10(["up:Catalytic_Activity_Annotation"]):::iri
c5(["up:Protein"]):::iri
f0[[" >= '2^^xsd:integer'"]]
f0 --> a1
v1 --"up:organism"--> c3
v1 --"a"--> c5
v1 --"up:reviewed"--> c7
v1 --"rdfs:seeAlso"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"up:enzyme"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"up:annotation"--> a2
a2 --"a"--> c10
end
union0r <== or ==> union0l
end
v2 --"a"--> c12
bind2[/"count(?transcript)"/]
v2 --o bind2
bind2 --as--o v4