Skip to content

baltic - backronymed adaptable lightweight tree import code for molecular phylogeny manipulation, analysis and visualisation. Development is back on the evogytis/baltic branch (i.e. here).

License

Notifications You must be signed in to change notification settings

evogytis/baltic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

35ada75 · Feb 27, 2025
Nov 17, 2020
Feb 27, 2025
Feb 27, 2021
Mar 30, 2021
Sep 26, 2017
Oct 12, 2022
Dec 18, 2019
Aug 10, 2020
Dec 19, 2019
Aug 14, 2020
Jul 26, 2023
Nov 17, 2020
Sep 27, 2024

Repository files navigation

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.

About

baltic - backronymed adaptable lightweight tree import code for molecular phylogeny manipulation, analysis and visualisation. Development is back on the evogytis/baltic branch (i.e. here).

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages