Embeds phylogenetic tree distances and produce representations
Project description
Phylogeny Embedding &
Approximate Representation
Goldman Group - European Bioinformatics Institute ![](https://pypi-camo.freetls.fastly.net/572de403ca0a3c54a51fab04164b5b5dfc1dbc3b/6c6f676f732f676f6c646d616e5f6c6f676f2e706e67)
PEAR can:
- Compute the distance matrix given a set of phylogenetic trees;
- Embed and represent the distance matrix in 2D or 3D.
PEAR usage
Pear is both a python software and library. It can be installed with python -m pip install pear_ebi
or downloaded from Github. Pear is currently compatible with Linux and Mac OSs.
PEAR as a python library
Once installed, Pear can be used to upload newick trees in python and represent them in embedded spaces. We recommend to use it on either jupyter notebook or lab, as these tools allow for more interaction with the graphs. On these platforms, the user is allowed to interact with widgets that allows to modify several parameteres of the plots. For specific uses and applications, see the examples.
PEAR as a program
Run python3 PEAR.py --help
to see the complete list of arguments and flags.
Simple usage
python3 PEAR.py examples_trees_sets/beast_trees/beast_run1.trees -hashrf -pca 3 -plot 2
this script calculates the unweighted Robison Foulds distances between the trees in the file "beast_run1.trees", which contains 1001 phylogenetic trees.
The flag "-hashrf" defines the use of HasRF algorithm to perform this task.
The flag "-pca 3" indicates to the program to perform a Principal Coordinate Analysis to embed the distance matrix in 3 dimensions, returning the final coordinates in the lower-dimensional space and plotting them 3D thanks to "-plot 2".
Config file
A standard config toml file can be used for specific emebddings of multiple sets of trees. Instances of toml files are reported in ##EXAMPLE FOLDER##....
Interactive mode
python3 PEAR.py examples_trees_sets/beast_trees/beast_run1.trees --i
this script launches the program in interactive mode. Once the program starts, it is going to guide you through its usage thanks to an intuitive interface.
Licensing
This project is released under the terms of the MIT Open Source License. View LICENSE.txt for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.