A set of SPARQL examples that are used in different SIB resources
Glycosylation sites annotated by GlyConnect from a list of publications (PMIDs)
PREFIX : <http://nextprot.org/rdf/>
PREFIX cv: <http://nextprot.org/rdf/terminology/>
PREFIX faldo:<http://biohackathon.org/resource/faldo#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX glycan:<http://purl.jp/bio/12/glyco/glycan#>
PREFIX glyco:<http://purl.jp/bio/12/glyco/conjugate#>
select distinct ?entry ?isoNP ?position where {
values ?pmid {"24884609" "10441114"} # pubmed ids, space- or linebreak-separated
bind(IRI(concat("http://www.ncbi.nlm.nih.gov/pubmed/",?pmid)) as ?pubIRI)
SERVICE <https://glyconnect.expasy.org/sparql> {
?ref_conjugate glyco:has_protein_part ?glycoprotein .
?glycoprotein glyco:glycosylated_at / faldo:location ?glycosite .
?glycosite faldo:reference ?isoform ; faldo:position ?position .
?ref_conjugate glycan:published_in / foaf:primaryTopicOf ?pubIRI .
}
BIND(IRI(replace(str(?isoform),"http://purl.uniprot.org/isoforms/","http://nextprot.org/rdf/isoform/NX_")) AS ?isoNP) .
?entry :isoform ?isoNP .
} order by ?entry ?position
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?entry"):::projected
v6("?glycoprotein")
v7("?glycosite")
v9("?isoNP"):::projected
v8("?isoform")
v3("?pmid")
v2("?position"):::projected
v4("?pubIRI")
v5("?ref_conjugate")
a1((" "))
a2((" "))
bind0[/VALUES ?pmid/]
bind0-->v3
bind00(["24884609"])
bind00 --> bind0
bind01(["10441114"])
bind01 --> bind0
bind1[/"concat('http://www.ncbi.nlm.nih.gov/pubmed/',?pmid)"/]
v3 --o bind1
bind1 --as--o v4
subgraph s1["https://glyconnect.expasy.org/sparql"]
style s1 stroke-width:4px;
v5 --http://purl.jp/bio/12/glyco/conjugate#has_protein_part--> v6
v6 --http://purl.jp/bio/12/glyco/conjugate#glycosylated_at--> a1
a1 --"faldo:location"--> v7
v7 --"faldo:reference"--> v8
v7 --"faldo:position"--> v2
v5 --"glycan:published_in"--> a2
a2 --"foaf:primaryTopicOf"--> v4
end
bind2[/"replace(str(?isoform),'http://purl.uniprot.org/isoforms/','http://nextprot.org/rdf/isoform/NX_')"/]
v8 --o bind2
bind2 --as--o v9
v1 --":isoform"--> v9