项目作者: Zsailer

项目描述 :
Ancestral Sequence Reconstruction in Python
高级语言: Python
项目地址: git://github.com/Zsailer/pyasr.git
创建时间: 2017-10-26T15:59:03Z
项目社区:https://github.com/Zsailer/pyasr

开源协议:BSD 3-Clause "New" or "Revised" License

下载


PyASR

Ancestral Sequence Reconstruction in Python

PyASR offers a modern Python interface to PAML (“Phylogenetic Analysis by Maximum Likelihood”)—tuned specifically for reconstruction
ancestral protein/DNA sequences.

NOTE: PyASR currently only supports protein reconstructions. This is a work in progress.

Basic Usage

  1. import phylopandas as pd
  2. import dendropy as d
  3. import pyasr
  4. # Use phylopandas to read a set of ancestor.s
  5. df_seqs = pd.read_fasta('test.fasta')
  6. # Use dendropy to read in tree.
  7. tree = d.Tree.get(path='tree.newick', schema='newick')
  8. # Reconstruct nodes in tree.
  9. tree, df_seqs, df_anc = pyasr.reconstruct(df_seqs, tree, working_dir='test', alpha=1.235)
  10. # Write out ancestor dataframe to a CSV file.
  11. df_anc.to_csv('ancestors.csv')

We can visualize the ancestors side-by-side with the tree using inside of JupyterLab
thanks to the ToyTree library.

Install

This package is released on PyPi. You can install using pip:

  1. pip install pyasr

To get the development version:

  1. git clone
  2. cd
  3. pip install -e .

Dependencies

The actual reconstruction calculation are done using PAML. This requires PAML to be
installed and the codeml/baseml executables exported to your $PATH environment variable. Directions for installing PAML can be found on the PAML website.

The following Python dependencies are required for PyASR to work.

  • Pandas
  • Biopython
  • PhyloPandas
  • DendroPy