Constructing queries

CardioSHARE is a unique query system. Rather than merely searching through the contents of a local database, CardioSHARE uses the criteria specified in a SPARQL query to gather data dynamically from web services. This functionality enables multiple distributed datasets and programs to be queried using a single interface.

For this demo, a number of BioMoby services have been annotated with predicates that connect UniProt proteins to related data. The relationships between these predicates are shown in the diagram below (the full URIs for the predicates are available here).

A representation of the CardioSHARE virtual graph

A representation of the CardioSHARE virtual graph

The arrows in the digram above indicate the direction from service input to service output. Circles represent BioMoby object types and rectangules represent simple strings. In order to create a successful query, you must choose a path through the diagram that follows these arrows. Start by specifying a URI for the starting node (e.g.: <http://biomoby.org/PMID/14633995>, the URI for PubMed article 14633995). From there, choose a path through the virtual graph that follows the arrows in the diagram above. One example path and its associated query appear below. More examples are available here.

Diagram of example query

The query corresponding to the highlighted path through the CardioSHARE virtual graph above asks, "What proteins are the subject of PubMed article 14633995 and what organisms do these proteins belong to?"

The equivalent SPARQL query is:

PREFIX up: <http://uniprot/> SELECT ?protein ?organism { <http://biomoby.org/PMID/14633995> up:isPaperAboutProtein ?protein . ?protein up:belongsToOrganism ?organism . }