Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python API for managing a phylogenetics project

Project Description

# Python API for managing a phylogenetics project

[![Documentation Status](http://readthedocs.org/projects/phylogenetics/badge/?version=latest)](http://phylogenetics.readthedocs.io/en/latest/?badge=latest)


Phylogenetics is a minimal Python API for doing phylogenetics. It manages the annoying aspects of phylogenetics (i.e. file conversion) for you and lets you focus on exploring and interpreting the data.

**Note** The `phylogenetics` package has been completely rewritten between v0.3 and v0.4. v0.3 is now deprecated and no longer maintained. v0.4 has significantly simplified the API. I hope you enjoy it.

## Basic Example

The main object in phylogenetics is the `TreeProject`. Start by initializing the `TreeProject`
object, pointing to a directory where you'd like to store all the phylogenetic data/output.

```python
# Imports
from phylogenetics import TreeProject

# Initialize a project class
project = TreeProject(project_dir='project')
```

Then, add an alignment (using any file schema you'd like). These sequences will be the
tips of your tree. You can now begin building trees and reconstructing ancestral sequences.

```python
project.read_data(dtype='tips', path='alignment.fasta', schema='fasta')

# Run PhyML to construct a phylogenetic
# tree by maximum likelihood.
project.run_tree()

# Reconstruct ancestral sequences using default settings.
project.run_reconstruction()
```

`phylogenetics` imports the `toytree` library to quickly plot trees in Jupyter Notebooks.
You can quickly view your tree anytime using the `draw_tree` method.
```python
project.draw_tree(width=700,
tip_labels='id',
tip_labels_align=True,
use_edge_lengths=True,
node_labels='id')
```

<img src="docs/_images/jlab.png" align="middle">

## Installation

Install from PyPi:
```
pip install phylogenetics
```

To install a development version:
```
git clone https://github.com/Zsailer/phylogenetics
cd phylogenetics
pip install -e .
```

## Dependencies

`phylogenetics` manages phylogenetics data. Currently, it doesn't do any of the phylogenetic calculations itself. For this, use external tools like:

3. [PhyML](http://www.atgc-montpellier.fr/phyml/) - building maximum likelihood trees.
4. [PAML](http://abacus.gene.ucl.ac.uk/software/paml.html) - reconstructing ancestors.

`phylogenetics` is built on top of following python stack:

1. Pandas
2. Biopython
3. DendroPy
4. ToyTree
5. PhyloPandas
6. PyASR


Release History

Release History

This version
History Node

0.4.1

History Node

0.4

History Node

0.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0a2

History Node

0.2.0a1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
phylogenetics-0.4.1-py2.py3-none-any.whl (40.0 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Nov 8, 2017
phylogenetics-0.4.1.tar.gz (32.1 kB) Copy SHA256 Checksum SHA256 Source Nov 8, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting