A set of SPARQL examples that are used in different SIB resources
Glycan to ID
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX glystreem: <https://glyconnect.expasy.org/rdf/structures#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?glycanid ?p ?glytoucanID
WHERE {
?glycan a glystreem:Glycan ;
glystreem:id ?glycanid ;
glystreem:glytoucan_id|glystreem:composition_glytoucan_id ?glytoucanID .
?glycan ?p ?glytoucanID .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?glycan")
v2("?glycanid"):::projected
v3("?glytoucanID"):::projected
v4("?p"):::projected
c2([https://glyconnect.expasy.org/rdf/structures#Glycan]):::iri
v1 --"a"--> c2
v1 --https://glyconnect.expasy.org/rdf/structures#id--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --https://glyconnect.expasy.org/rdf/structures#composition_glytoucan_id--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --https://glyconnect.expasy.org/rdf/structures#glytoucan_id--> v3
end
union0r <== or ==> union0l
end
v1 -->v4--> v3