Skip to main content

Lightweight package for analyzing, manipulating and visualizing annotated phylogenetic trees

Project description

Build Status downloads

baltic

baltic is a Python library for parsing phylogenetic trees. It takes newick, Nexus or nextstrain JSON trees and allows you to manipulate, explore and visualise them. baltic stands for Backronymed Adaptable Lightweight Tree Import Code if you like that sort of thing.


Installation

Use package manager pip to install baltic:

pip install baltic

Usage

import baltic as bt

# When called with a tree string the `make_tree()` function return a baltic tree object:

treeString='((A:1.0,B:2.0):1.0,C:3.0);'
myTree = bt.make_tree(treeString)

# Otherwise you can import trees from newick, nexus or nextstrain JSON files

newickPath='/Users/myUsername/tree.newick'
myTree = bt.loadNewick(newickPath)

nexusPath='/Users/myUsername/tree.nex'
myTree = bt.loadNexus(nexusPath, absoluteTime = False)

nextstrainPath='https://nextstrain.org/charon/getDataset?prefix=/dengue/denv1'
myTree, myMeta = bt.loadJSON(nextstrainPath)

Copyright 2016 Gytis Dudas. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

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

baltic-0.3.0.tar.gz (262.2 kB view details)

Uploaded Source

Built Distribution

baltic-0.3.0-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file baltic-0.3.0.tar.gz.

File metadata

  • Download URL: baltic-0.3.0.tar.gz
  • Upload date:
  • Size: 262.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for baltic-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d7fd92d0a40840f15826416e5aaaa3b9e40db07df99f9d4add2eeaf683ae385d
MD5 fa2d3f58eaffea78412189a4fa1d4b60
BLAKE2b-256 8ec685e19acf2039a5da1df9d2db88fa739743c346426a2e9853eea721dab728

See more details on using hashes here.

File details

Details for the file baltic-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: baltic-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for baltic-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 590650e3734a80387b269737070647605a24f103572c7c82838346a70778b7a0
MD5 ae5bf63c53bb60e35ebb0a376627bca0
BLAKE2b-256 30db7a9ae52b5e2fe451690736eac43616117ee38bad8861682772c63bd5fb2d

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