Skip to content

kfuku52/nwkit

Repository files navigation

Run Tests GitHub release Bioconda Python Platforms Downloads License

Overview

NWKIT (/njuːkit/) is a toolkit for manipulating phylogenetic trees in the Newick format.

Installation

The latest version of NWKIT is available from Bioconda. For users requiring a conda installation, please refer to Miniforge for a lightweight conda environment.

Install from Bioconda

conda install bioconda::nwkit

Verify the installation by displaying the available options

nwkit -h

(For advanced users) Install the development version from GitHub

pip install git+https://github.com/kfuku52/nwkit

Subcommands

See Wiki for usage.

  • constrain: Generating a species-tree-like Newick file for topological constraint
  • dist: Calculating topological distance between two trees
  • drop: Removing node and branch information
  • info: Printing tree information
  • intersection: Dropping non-overlapping leaves/sequences between two trees or between a tree and an alignment
  • label: Adding unique node labels
  • mark: Adding texts to node labels by identifying the targets with a leaf name regex
  • mcmctree: Introducing divergence time constraints for PAML's mcmctree
  • nhx2nwk: Generating Newick from NHX
  • printlabel: Searching and printing node labels
  • prune: Pruning leaves
  • rescale: Rescale branch length with a given factor
  • root: Placing or transferring the tree root
  • sanitize: Eliminating non-standard Newick flavors
  • shuffle: Shuffling branches and/or labels
  • skim: Sampling leaves from clades with shared traits
  • subtree: Generating a subtree Newick file
  • transfer: Transferring information between trees

Citation

There is no published paper on NWKIT itself, but we used and cited NWKIT in several papers including Fukushima & Pollock (2023, Nat Ecol Evol 7: 155-170).

The --method mad option in nwkit root uses MAD by Tria, Landan & Dagan. If you use this option, please cite: Tria et al. (2017, Nat Ecol Evol 1: 0193).

Licensing

This program is BSD-licensed (3 clause). See LICENSE for details.

About

Newick tree processing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages