Skip to main content

Interactive Phylogenetic trees in Vega from Python.

Project description

PhyloVega

Visualize phylogenetic trees in Vega from Python.

Declarative tree visualizations in Python powered by Vega.

Declarative Grammar

from phylovega import TreeChart

# Construct Vega Specification
chart = TreeChart.read_newick(
    'tree.newick',
    height_scale=200,

    # Node attributes
    node_size=200,
    node_color="#ccc",

    # Leaf attributes
    leaf_labels="id",

    # Edge attributes
    edge_width=2,
    edge_color="#000",
)

Interactive trees

Use Vega grammar

How does it work?

PhyloVega defines a Vega grammar (specifically, a set of transforms) to draw phylogenetic trees.

Why?

Python is due for a simple, interactive phylogenetic tree viewer. Vega has done most of the heavy lifting here. PhyloVega simply leverages Vega transform specifications for building interactive visualizations.

In the works

Here is a list of features that will eventually make it into PhyloVega.

  • More Interactivity
  • Collapible Clades.
  • Circular trees
  • ... (feel free to add to this list).

Install

Get the latest release with pip:

pip install phylovega

Install the development version by cloning this repo and calling:

pip install -e .

Dependencies

PhyloVega uses the Vega4 specification. It works out-of-the-box with JupyterLab.

Project details


Download files

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

Source Distribution

phylovega-0.2.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

phylovega-0.2-py2.py3-none-any.whl (10.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file phylovega-0.2.tar.gz.

File metadata

  • Download URL: phylovega-0.2.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for phylovega-0.2.tar.gz
Algorithm Hash digest
SHA256 13867827aa987986a02c85623379a88f7a25a8fbf95ac6ef5d8ceb6d80e17e3a
MD5 41e03249113b896dec884f40d24670ae
BLAKE2b-256 8383c9ca0754d5d0947bcc42342afade29d0291a7da2d17d389cb94f8ff06b7f

See more details on using hashes here.

File details

Details for the file phylovega-0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: phylovega-0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for phylovega-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea90186b46a69c4f1189c6055451b700a22db43801a411834f0deb15965ccf34
MD5 98ec04e990db0222c02ff48a6aac04be
BLAKE2b-256 c8c9c2accd1cc404334583e2177698a222ada47b34fe80f9cc2762b4407e4a96

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page