treemachine-LITE is a pared-down version of the original treemachine which was used to generate synthetic phylogenetic trees for the Open Tree of Life project. Synthetic analyses are now performed by other tools. The role of treemachine-LITE is simply to construct a neo4j database and serve such trees.
treemachine-LITE is managed by Maven v.3 (including the dependencies). In order to compile and build treemachine-LITE, it is easiest to let Maven v.3 do the hard work.
maven On Linux you can install Maven v.3 with:
sudo apt-get install maven
On Mac OS, Maven v.3 can be installed with Homebrew:
brew install maven
jade and ot-base Once Maven v.3 is installed, the treemachine-LITE dependencies themselves can be installed with:
The DB constructed by treemachine-lite is meant to be served by neo4j. We are currently using
neo4j-community-v1.9.5. To obtain and decompress neo4j:
$ curl http://files.opentreeoflife.org/neo4j/neo4j-community-1.9.5-unix.tar.gz > neo4j-community-1.9.5.tar.gz $ tar xzf neo4j-community-1.9.5.tar.gz
Alternately, there is a
make target for neo4j:
You can move the neo4j directory wherever you like.
NOTE: The script for compiling the server plugins will delete any command-line jar in the target directory (and the opposite is true - compiling the command-line jar will delete the server plugins from the target directory). You can rebuild either just by running those scripts again.
To compile the command-line version (which you can then use to build a database):
treemachine-0.0.1-SNAPSHOT-jar-with-dependencies.jar in the
target directory (and deletes the server plugin jar if it existed).
To compile the server plugins for interacting with the graph over REST calls:
treemachine-neo4j-plugins-0.0.1-SNAPSHOT.jar in the target
directory (and deletes the command-line jar if it existed). Then, copy the .jar
file into the neo4j plugins directory:
cp -p target/treemachine-neo4j-plugins-0.0.1-SNAPSHOT.jar $(NEO4J_HOME)/plugins
Constructing a DB
First, compile the command-line version (see above). Then, to build the DB:
java -jar target/treemachine-0.0.1-SNAPSHOT-jar-with-dependencies.jar ingestsynth newick_tree json_annotations tsv_taxonomy DB_name
labelled_supetree/labelled_supertree.trefrom the synthesis procedure
annotated_supertree/annotations.jsonfrom the supertree procedure
taxonomy.tsvfile from the Open Tree of Life Taxonomy (OTT)
DB_nameis the name for the directory that will hold the generated DB (you choose)
Serving a DB with Neo4j
Compile the server plugins (see 'Server plugins, above). Before starting neo4j,
you will need to modify file
the full path of the DB directory constructed by treemachine-LITE as the value
After you have loaded content into your db, you can run the neo4j http server with the command :
If you add the neo4j-community-1.9.5/bin directory to your path, you can just say
Running the tests
To make sure everything is running ok, run the web service tests:
cd ws-tests ./run_tests.sh host:apihost=http://localhost:7474 host:translate=true