The following query works at Pathway Commons SPARQL endpoint and returns all proteins that form complexes controlling Wnt signaling pathways:

PREFIX rdf: <>
PREFIX owl: <>
PREFIX rdfs: <>
PREFIX xsd: <>
PREFIX bp: <>
PREFIX up: <>
SELECT ?pathway ?protein ?eref 
# define all objects (nodes)
?protein rdf:type bp:Protein. # identify all proteins
?protein bp:entityReference ?eref . # the protein has an entity reference eref, this can be unitprot, etc
?eref bp:xref ?reference . # entity referece eref corresponds to external reference ?reference

# define all object property assertions (edges)
?assembly bp:left ?protein. # proteins are reaction input
?pathway bp:pathwayComponent ?assembly . # complex assembly is a component of a pathway
?pathway rdf:type bp:Pathway ;
                 bp:displayName ?dname .

#    {?eref a up:Protein .}

FILTER regex(?dname, "^Wnt")

Now I need to get info from UniProt about these proteins. If I un-comment the following lines from the above query I get an error:

   {?eref a up:Protein .}


Virtuoso RDFZZ Error
DB.DBA.SPARQL_REXEC('', ...) has
received result with unexpected variable name 'stubvar10'

Source link