Skip to content

How to use RapGreen to reconcile phylogenetic trees

Jean-François edited this page Aug 13, 2021 · 9 revisions

RapGreen is a very versatile Java package, to manipulate et annotate phylogenetic trees.

The main usage of this package remains to reconcile phylogenetic trees with the corresponding species tree. The tree reconciliation algorithm implemented in RapGreen is a simple reimplementation of the former version implemented in RAP. It is based on a parsimony method : it predicts duplications minimizing their number, allowing badly supported branches to be collapsed in the phylogenetic trees and in the species tree. Tree reconciliation also allows the tree rooting minimizing the number of predicted duplications and losses.

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

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

Step 1: compile the RapGreen reconciliation facilities

In order to get correct executable file(s), you must:

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

cd rap-green

javac rapgreen/*.java

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

Step 2: format your input files

  • Your gene tree can be a standard newick tree you can obtain using a software like PhyML or RaxML. Just be sure to add the species code of each sequence at the end of the label, separated with a _ character.

  • Your species tree must be a simple newick tree, with species codes as leaf labels.

Example files are available: example_files/example_unreconciled_tree.nwk for the gene tree, and example_files/species_tree_example.nwk for the species tree.

Step 3: execute the RapGreen software on your data

  • If you compiled your own version, use this command line:

    java -cp /[...]/rap-green rapgreen/RapGreen -g example_unreconciled_tree.nwk -s species_tree_example.nwk -nhx annotated_output_genetree.nwk

  • And if you use the .jar provided file:

    nohup java -jar /[...]/RapGreen.jar -g example_unreconciled_tree.nwk -s species_tree_example.nwk -nhx annotated_output_genetree.nwk

    Please replace the [...] by the corresponding path, depending your working directories. Several other options are available here.