Skip to content

How to install a phylogenetic tree pattern matching service

Jean-François edited this page Aug 28, 2020 · 31 revisions

First of all, download the whole package in your working directory:

git clone https://github.com/SouthGreenPlatform/rap-green.git

Step 1: java pattern matching daemon installation and configuration

The pattern matching daemon is a Java process that load the phylogenetic tree collection in the RAM, and interact with the tree pattern editor using a client-server protocol, taking in charge the combinatory part of the method. So, the daemon should be installed in a server with enough RAM (count 3-5 Go for 1,000,000 terminal genes). The daemon server should be visible from the web server that will host the www facilites, and a logical port should be opened.

  • Compile the RapGreen java package (mostly tested in Java 1.8, but compatible with newer of older versions):

cd rap-green

javac rapgreen/*.java

Note that you can choose to directly use the bin/RecDaemon.jar executable archive file if you have the same JDK version used to compile this available version, which is JDK8.

  • Prepare your files, one must contain the phylogenetic tree collection, and one must contain the species tree labeled with internal and terminal taxa.

    • The phylogenetic tree collection contains one tree per line, composed with the family identifier (any unique label) and the tree in NHX format. NHX zone must hold a :S= for the species at the leaves, and a D=Y/N for duplication/speciation nodes (duplication, yes or no). An example is provided in: rap-green/example_files/phylo_tree_collection_example.nwk
    • The species tree is a simple Newick file, containing species names as labels. An example is provided in: rap-green/example_files/species_tree_example.nwk
  • Then, you can start the daemon. If you compiled your own version, use this command line:

    nohup java -cp /[...]/rap-green rapgreen/ReconciliationDatabaseDaemon -standard myDatabase my_species_tree.nwk my_phylo_tree_collection.nwk &

    And if you use the .jar provided file:

    nohup java -jar /[...]/RecDaemon.jar -standard myDatabase my_species_tree.nwk my_phylo_tree_collection.nwk &

    Please replace the [...] by the corresponding path, depending your working directories. The option -xmxXXXXm should be added with "XXXX" replaced by a nimber of MO for the RAM. If your tree collection is big (several ten of thousands), 8000MO or 16000MO could be required.

Step 2: installation of the tree pattern editor

  • From your GitHub instance, copy the whole www/treepattern/ directory on your webserver, in a web accessible location.

  • Create the configuration file with the command: cp config_draft.php config.php Then, edit the file, at least giving the server address where the daemon is running. It could be set to localhost or to a distant computing infrastructure IP address. The port should correspond to the daemon running parameter (1666 by default).

Step : installation of the tree visualisator

  • From your GitHub instance, copy the whole www/treedisplay/ directory on your webserver, in a web accessible location.

  • Create the configuration file with the command: cp config_draft.php config.php You could then edit several parameters (for example the address linked to the leaves), but it is not mandatory.

  • Edit again the

  • Create the configuration file with the command: config.php file in the treepattern directory, and set the $treedisplayaddress to the http.s address you installed the treedisplay interface.