Simple queries
The following simple queries are able to access microbiome data written to a Neo4j database by mako.
MATCH (:Genus {name: ‘g__Escherichia’})–(:Taxon)–(:Edge)–(n:Taxon) RETURN n
This query returns all taxa that have an association with a taxon belonging to the genus Escherichia.
MATCH p=(a:Edge)–(:Taxon)–(b:Edge) WHERE a.name <> b.name RETURN p
This query returns all patterns containing a taxon with two unique edges.
MATCH p=(:Order {name: ‘o__Bacillales’})–(:Taxon)–(b:Edge)–(:Taxon)–(:Order {name: ‘o__Clostridiales’}) RETURN p
This query returns all pattern containing edges between taxa belonging to Bacillales and Clostridiales.
MATCH p=(:Taxon)–(a:Edge) WHERE a.weight > 0 RETURN p
This query returns all patterns with edges with a weight larger than 0.
MATCH p=(a:Taxon)–(:Edge)–(:Taxon)–(:Edge)–(:Taxon)–(:Edge)–(a) RETURN p
This query returns a 3-node clique, where the first Taxon
node is also the last node completing the clique.