Merge network by taxonomy
The command below merges networks by taxonomic level. For example, by merging to genus, both nodes assigned to Escherichia are merged into a single node, and by merging to order, the Halaerobiales nodes are merged as well. All lower taxonomic levels are also merged by running this command. Simply specify the taxonomic level after the agglom
command.
mako metastats -fp . -cf -agglom order
If you access the Neo4j Browser (http://localhost:7475/browser/) and run the following query, you should be able to access two of the agglommerated networks:
MATCH p=(n:Network {name: 'Genus_demo_1'})--(:Edge)--(:Taxon) RETURN p LIMIT 50
MATCH p=(n:Network {name: 'Order_demo_1'})--(:Edge)--(:Taxon) RETURN p LIMIT 50
The query
returns 50 patterns consisting of Edge nodes connected to the Genus_demo_1 node. This network node contains an agglomerated network, meaning that taxa with the same genus identifier were merged. The numbered Taxon node at the bottom right is a merged Escherichia node, with the edges between the two taxa converted to a self-loop (Figure 5).MATCH p=(n:Network {name: 'Genus_demo_1'})--(:Edge)--(:Taxon) RETURN p LIMIT 50