Treemachine is what I have been calling the backend tools for manipulating and adding to the OpenTreeOfLife. It is hosted on github and currently has some tools for installing taxonomies and the start of some synthesis and adding of phylogenies. For details on the architecture check out the discussions on this google doc. The general structure that was planned is below.
This is likely to change, but should give an idea of why I talk about taxonomies separate from the graph of the phylogenies. We are allowing multiple conflicting taxonomies to live in the same graph so that we can synthesize (and add taxa from other taxonomies).
So, to use treemachine to import a taxonomy here are the steps.
- First, make sure that git is installed on your machine.
- in the terminal run git clone git://github.com/OpenTreeOfLife/opentree-treemachine.git
- make sure that you have mvn installed. It is easy on linux and I suspect it is already on macs, but please comment and let me know if you have trouble.
- go inside the opentree-treemachine directory in the terminal and type mvn_cmdline.sh. This is installing the neo4j libraries if you don’t have them and compiling treemachine
Within the target directory is now a .jar file that is the treemachine. You can run it by doing java -jar treemachine-0.0.1-SNAPSHOT-jar-with-dependencies.jar. This gives some basic output on some of the commands.
To load a taxonomy the command is basically (if you are in the opentree-treemachine directory)
java -jar target/treemachine-0.0.1-SNAPSHOT-jar-with-dependencies.jar inittax filename nameforsource whereyouwantthedatabase
so for example, if we had a taxonomy in a file called ncbi.txt and this was the ncbi taxonomy and we wanted the graph folder to be called graph.db we would do
java -jar target/treemachine-0.0.1-SNAPSHOT-jar-with-dependencies.jar inittax ncbi.txt ncbi graph.db
Then if we wanted to look at it in our server (see this post), we just need to turn off the server (inside the neo4j directory, bin/neo4j stop), delete the graph.db in the data directory (rm -r data/graph.db) and replace it with the one you just made (cp -r graph.db neo4jfolder/data/), then restart your server (bin/neo4j start) and go to http://localhost:7474/webadmin/ . You have your taxonomy up now and you can go to the Data Browser tab and search by name by looking search node:index:taxNamedNodes:name:THENAMEYOUWANTTOSEARCH. That will give you a list. If you click the graph like thing on the right you will get a graph that you can click. You can also change the look of the nodes by clicking styles and new style and change {id} to {name} to show names instead of id numbers.
Hope this helps some and please post questions in the comments here!
This is very experimental code and is constantly updating, so be warned! When major updates occur with new functionality, they will be explained and posted here. You can get the most up to date code by going into the opentree-treemachine directory and running git pull. Then sh mvn_cmdline.sh.
