A set of SPARQL examples that are used in different SIB resources
Proteins with at least one somatic variant
PREFIX : <http://nextprot.org/rdf/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX source: <http://nextprot.org/rdf/source/>
SELECT DISTINCT ?entry WHERE {
?entry :isoform ?iso.
?iso :variant ?var.
{
?var rdfs:comment ?comment.
filter (contains (?comment,'somatic'))
}
union
{
?var :evidence ?ev.
?ev :assignedBy source:Cosmic.
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?comment")
v1("?entry"):::projected
v5("?ev")
v2("?iso")
v3("?var")
c7([":source/Cosmic"]):::iri
v1 --":isoform"--> v2
v2 --":variant"--> v3
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --":evidence"--> v5
v5 --":assignedBy"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f0[["contains(?comment,'somatic')"]]
f0 --> v4
v3 --"rdfs:comment"--> v4
end
union0r <== or ==> union0l
end