Skip to content

Cypher language extension

Jeremy edited this page Nov 16, 2016 · 2 revisions

SciGraph has some extensions to the Cypher query language.

Curie shorthand

In a Cypher query, instead of using the full IRI to describe a node or a relationship type, curies can be used as a shorthand. To do the curie to iri expansion, SciGraph uses the mapping defined in the yaml configuration file.

For example MATCH (n)-[:RO:0002200]->(m) becomes MATCH (n)-[:`http://purl.obolibrary.org/obo/RO_0002200`]->(m).

Exclamation mark

When traversing with a specific relationship type, one would be likely interested in the sub and equivalent properties of this relationship type. Instead of enumerating all those relationship types manually, SciGraph provides the short hand ! to add those additional relationship types.

For example MATCH (n)-[:RO:0002200!]->(m) becomes MATCH (n)-[:`http://purl.obolibrary.org/obo/GENO_0000743`|`http://purl.obolibrary.org/obo/GENO_0000740`|`http://purl.obolibrary.org/obo/RO_0002452`|`http://purl.obolibrary.org/obo/RO_0002200`]->(m) RETURN n.

Clone this wiki locally