RQL for BioPAX

Here is a collection of RQL (RDF Query Language) queries for BioPAX. These queries operate on the RDF graph and do not do anything as far OWL inferencing goes. They were written mainly for the purpose of querying BioPAX instances in order to get statistics such as the number of pathways, searching the pathways that an enzyme participates etc. Also below are queries that are used to integrate RDF graphs from BioPAX instances based on attributes the user chooses to (EC-numbers, gene ids etc), in order to find conserved modules in the metabolic networks of two organisms.

These RQL queries where tested on BioPAX instances of the AraCyc, EcoCyc and HumanCyc (see Cyc collection of databases), aggregated within a Sesame RDF triplestore. Sesame implements most of W3C's specification for RQL, with a few extra useful twists, see the Sesame documentation for details.

For questions / more info / comments on the queries, feel free to write to agbiotec@yahoo.com

 Finds pathways with the same name between 2 organisms 

select distinct EcolipathwayName

from

{Ecolipathway} rdf:type {bp:pathway}; bp:NAME {EcolipathwayName}, {Ecolipathway} bp:DATA-SOURCE {} bp:NAME {EcolidataSourceName},

{Humanpathway} rdf:type {bp:pathway}; bp:NAME {HumanpathwayName}, {Humanpathway} bp:DATA-SOURCE {} bp:NAME {HumandataSourceName}

where

EcolidataSourceName like "Eco*" and HumandataSourceName like "Human*"

and EcolipathwayName = HumanpathwayName

using namespace bp = 

 Returns enzymes in adjacent biochemicalReaction(s) as protein-protein interactions 

select distinct

ArabDBId1, ArabDBId2, ArabpathwayName

from

{Arabpathway} rdf:type {bp:pathway}; bp:NAME {ArabpathwayName},

{Arabpathway} bp:PATHWAY-COMPONENTS {ArabpathwayStep1} bp:STEP-INTERACTIONS {Arabinteraction1} rdf:type {bp:biochemicalReaction},

{ArabpathwayStep1} bp:NEXT-STEP {ArabpathwayStep2},

{ArabpathwayStep2} bp:STEP-INTERACTIONS {Arabinteraction2} rdf:type {bp:biochemicalReaction},

{ArabCatalysis1} bp:CONTROLLER {} bp:PHYSICAL-ENTITY {ArabEnzyme1} bp:XREF {ArabXref1} bp:DB {EnzymeDBName1},

{ArabCatalysis2} bp:CONTROLLER {} bp:PHYSICAL-ENTITY {ArabEnzyme2} bp:XREF {ArabXref2} bp:DB {EnzymeDBName2},

{ArabXref1} bp:ID {ArabDBId1}, {ArabXref2} bp:ID {ArabDBId2},

{ArabCatalysis1} bp:CONTROLLED {Arabinteraction1}; rdf:type {bp:catalysis}, {ArabCatalysis2} bp:CONTROLLED {Arabinteraction2}; rdf:type {bp:catalysis}

where

EnzymeDBName1 like "AraCyc" and EnzymeDBName2 like "AraCyc"

using namespace

bp = 