_images/banner.png

Bringing the Pandas DataFrame to phylogenetics.

PhyloPandas provides a Pandas-like interface for reading various sequence formats into DataFrames. This enables easy manipulation of phylogenetic data using familiar Python/Pandas functions. Finally, phylogenetics for humans!

_images/jlab.png

How does it work?

Don’t worry, we didn’t reinvent the wheel. PhyloPandas is simply a DataFrame (great for human-accessible data storage) interface on top of Biopython (great for parsing/writing sequence data).

Basic Usage

Read sequence file into DataFrame.

import phylopandas as ph

df1 = ph.read_fasta('sequences.fasta')

Write phylopandas.DataFrame data to sequence file.

df1.to_clustal('sequences.clustal')

Convert between two sequence formats.

# Read from fasta.
df = phypd.read_fasta('sequences.fasta')

# Write to phylip.
df.to_phylip('sequences.phy')

See the Cookbook page for more things you can do.

Contributing

It’s easy to create new read/write functions and methods for PhyloPandas. If you have a format you’d like to add, please submit PRs! There are many more formats in Biopython that I haven’t had the time to add myself, so please don’t be afraid to add then yourself! I thank you ahead of time!

Indices and tables