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
import phylopandas as pd
import dendropy as d
import pyasr
# Use phylopandas to read a set of ancestor.s
df_seqs = pd.read_fasta('test.fasta')
# Use dendropy to read in tree.
tree = d.Tree.get(path='tree.newick', schema='newick')
# Reconstruct nodes in tree.
tree, df_seqs, df_anc = pyasr.reconstruct(df_seqs, tree, working_dir='test', alpha=1.235)
# Write out ancestor dataframe to a CSV file.
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:
pip install pyasr
To get the development version:
git clone
cd
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
Metadata
Release files for pyasr 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyasr-0.6.1.tar.gz | 31.8 kB | Without provenance | Details for pyasr-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyasr-0.6.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pyasr-0.6.1-py2.py3-none-any.whl |
Total release size: 67.3 kB
Release files / pyasr-0.6.1.tar.gz
| Download URL | pyasr-0.6.1.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d46b42ecfc1089b3f4ee06359fc0561f2b3ceed586c9748614d0ce40a68376c
|
|
BLAKE2b-256 checksum How to use checksums |
93845d58a2b5aa4ded6328e8143f03dd16df95cde9dfe2fbaf4c9c8e0aef2701
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pyasr-0.6.1-py2.py3-none-any.whl
| Download URL | pyasr-0.6.1-py2.py3-none-any.whl |
|---|---|
| Size | 35.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
bb4ca3b900abdd8d6d7af4a83bb2cd5ff99d52114f04f052c9cb99c222a54d33
|
|
BLAKE2b-256 checksum How to use checksums |
9bf87d58a42f4f5f6ab308368052607b409d14aff242bed2f35613c233343318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyasr 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.