A set of SPARQL examples that are used in different SIB resources
Find longest comment text associated with a UniProtKB natural variant annotation
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX up: <http://purl.uniprot.org/core/>
SELECT
?annotation ?comment
WHERE {
?annotation a up:Natural_Variant_Annotation ;
rdfs:comment ?comment .
}
ORDER BY DESC(STRLEN(?comment))
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?annotation"):::projected
v1("?comment"):::projected
c2(["up:Natural_Variant_Annotation"]):::iri
v2 --"a"--> c2
v2 --"rdfs:comment"--> v1