sparql-examples

A set of SPARQL examples that are used in different SIB resources

View the Project on GitHub sib-swiss/sparql-examples

neXtProt/NXQ_00209

Glycosylation sites and cross links positions on SwissProt canonical isoforms

Use at

PREFIX : <http://nextprot.org/rdf/>

SELECT DISTINCT ?entry ?iso ?ptmtype ?pos ?modres WHERE {
?entry :isoform ?iso.
?iso :swissprotDisplayed true .
?iso :sequence / :chain ?seq .
?iso :ptm ?ptm.
?ptm :term ?modterm.
?ptm :start ?pos.
bind (substr(?seq,?pos,1) as ?modres)	.
{
?ptm a :GlycosylationSite .
bind("glyco" as ?ptmtype)
}
union
{
?ptm a :CrossLink .
bind("cross-link" as ?ptmtype)
}
}
order by ?iso
#limit 100
Union
:isoform
:swissprotDisplayed
:sequence
:chain
:ptm
:term
:start
as
a
as
a
as
or
:GlycosylationSite
'glyco'
:CrossLink
?ptm
'cross-link'
?ptmtype
?entry
?iso
?modres
?modterm
?pos
?seq
true^^xsd:boolean
substring(?seq,?pos,'1^^xsd:integer')