Skip to content

Examples

BenoitMorel edited this page Apr 7, 2021 · 5 revisions

THIS PAGE IS UNDER CONSTRUCTION (I still need to comment the examples)

The GeneRax repository contains several examples that illustrate different use cases. This page describes the examples provided in the GeneRax repository. Each example runs different parts of the pipeline and corresponds to a specific use case.

To run the examples, you need to get GeneRax from github, compile it, and run the examples from the root directory of the repository.

Gene tree correction and reconciliation

Run with: ./examples/gene_tree_correction/run_plants.sh

The script will call GeneRax as follow (paths are shortened): mpiexec -np 2 generax --families families_plants.txt --species-tree speciesTree.newick --rec-model UndatedDL --per-family-rates --prefix output --max-spr-radius 3

The family file must contain at least the alignments and substitution models for each family. In this case, we already have gene trees inferred with raxml-ng, so we can add them to the family file (if they are not given by the user, the starting gene trees will be inferred from the alignments). In this example the gene-species mapping files are also required because GeneRax cannot infer the mappings from the gene names.

mpiexec -np 2 parallelizes with two cores. UndatedDL is used because we do not expect any horizontal gene transfers in this plant dataset. --per-family-rates indicates that each gene family will have its own DTL rates. --max-spr-radius 3 reduces the search space (the default radius is 5) to make the example faster (not recommended for real analyses!).

To visualize the inferred gene tree reconciled with the input species tree (for family Phy003AED5_CUCME), copy paste the content of the output file examples/gene_tree_correction/output/reconciliations/Phy003AED5_CUCME_reconciliated.xml into this online viewer. Note that this viewer is not developed by our lab.

Species tree inference with SpeciesRax

Run with: ./examples/species_tree_inference/run_speciesrax.sh

Comparing two (or more) candidate species trees

With the alignments

Run with: ./examples/compare_two_species_trees/compare_joint_likelihood.sh

Without the alignments

Run with: ./examples/compare_two_species_trees/compare_speciesrax.sh

Clone this wiki locally