plot-phylo

Python package to plot a phylogenetic tree on an existing matplotlib axis.

https://github.com/katybrown/plot_phylo

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Python package to plot a phylogenetic tree on an existing matplotlib axis.

Basic Info
Statistics
  • Stars: 23
  • Watchers: 1
  • Forks: 1
  • Open Issues: 6
  • Releases: 10
Created about 2 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

Tests Passing
Documentation Status
Project Status: Active – The project has reached a stable, usable state and is being actively developed.
Python Version from PEP 621 TOML
DOI
pyOpenSci Peer-Reviewed

plot_phylo

Illustration

This module allows the user to plot a phylogenetic tree on an existing matplotlib axis.

This means that: * Phylogenies can be incorporated into existing plots. * Annotations can be added using standard matplotlib functionality. * Plots can be output in png, pdf, svg or tiff formats. * Automatically generated and updated figures can include phylogenies

Full documentation is available via ReadTheDocs.

The module depends on the ETE Toolkit, an excellent existing Python framework for analysing and visualising phylogenetic trees, plus the matplotlib visualisation library. It is designed to make generating complex figures incorporating phylogenies easier, as matplotlib plotting functions can be used on top of the basic tree.

Installation

Requirements

  • python >= 3.6
  • matplotlib >= 2.1.1
  • ete3 >= 3.1.0

The module can be installed using pip

pip install plot_phylo

You can also download the latest release here

Or clone the GitHub repository directly.

git clone git@github.com:KatyBrown/plot_phylo.git

Quick Start

For detailed usage instructions, visit our ReadTheDocs page.

To draw a phylogeny under the default settings onto a blank figure.

``` import matplotlib.pyplot as plt import plot_phylo

Create an empty plot, 8in (width) by 10in (height) - matplotlib

f = plt.figure(figsize=(8, 10))

Add an axis - matplotlib

ax = plt.subplot()

Plot the tree on this axis, using the default settings - plot_phylo

results = plotphylo.plotphylo("examples/primates.nw", ax)

Save the tree - matplotlib

plt.savefig("examples/basicplot.png", bboxinches='tight') ```

Cite

If you use this repository in your work, please cite:

Brown, K (2024) plotphylo. https://github.com/KatyBrown/plotphylo

Continuous Integration

I use GitHub Actions for continuous integration to ensure code quality. You can view the configuration here.

Owner

  • Name: Katy Brown
  • Login: KatyBrown
  • Kind: user
  • Location: University of Cambridge

Citation (citation.cff)

cff-version: 1.2.0
message: "If you use this repository in your work, please cite:"
authors:
  - family-names: Brown
    given-names: Katy
    orcid: 0000-0002-8400-6922
title: "plot_phylo"
version: v0.0.11
identifiers:
  - type: doi
    value: https://doi.org/10.5281/zenodo.13871592
date-released: 2024-10-01
url: "https://github.com/KatyBrown/plot_phylo"

GitHub Events

Total
  • Create event: 2
  • Issues event: 2
  • Release event: 2
  • Watch event: 8
  • Push event: 24
  • Pull request event: 3
  • Fork event: 1
Last Year
  • Create event: 2
  • Issues event: 2
  • Release event: 2
  • Watch event: 8
  • Push event: 24
  • Pull request event: 3
  • Fork event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 90 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
  • Total maintainers: 1
pypi.org: plot-phylo

This module allows the user to plot a phylogenetic tree on an existing matplotlib axis.

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 90 Last month
Rankings
Dependent packages count: 10.0%
Average: 38.1%
Dependent repos count: 66.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

pyproject.toml pypi
setup.py pypi
  • ete3 *
  • matplotlib *
.github/workflows/main.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite