wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz
tar -zxf go1.24.1.linux-amd64.tar.gz -C $HOME/
# or
# echo "export PATH=$PATH:$HOME/go/bin" >> ~/.bashrc
# source ~/.bashrc
export PATH=$PATH:$HOME/go/bin
Compile TaxonKit
# ------------- the latest stable version -------------
go get -v -u github.com/shenwei356/taxonkit/taxonkit
# The executable binary file is located in:
# ~/go/bin/taxonkit
# You can also move it to anywhere in the $PATH
mkdir -p $HOME/bin
cp ~/go/bin/taxonkit $HOME/bin/
# --------------- the development version --------------
git clone https://github.com/shenwei356/taxonkit
cd taxonkit/taxonkit/
go build
# The executable binary file is located in:
# ./taxonkit
# You can also move it to anywhere in the $PATH
mkdir -p $HOME/bin
cp ./taxonkit $HOME/bin/
Bash-completion
Supported shell: bash|zsh|fish|powershell
Bash:
# generate completion shell
taxonkit genautocomplete --shell bash
# configure if never did.
# install bash-completion if the "complete" command is not found.
echo "for bcfile in ~/.bash_completion.d/* ; do source \$bcfile; done" >> ~/.bash_completion
echo "source ~/.bash_completion" >> ~/.bashrc
Zsh:
# generate completion shell
taxonkit genautocomplete --shell zsh --file ~/.zfunc/_taxonkit
# configure if never did
echo 'fpath=( ~/.zfunc "${fpath[@]}" )' >> ~/.zshrc
echo "autoload -U compinit; compinit" >> ~/.zshrc
fish:
taxonkit genautocomplete --shell fish --file ~/.config/fish/completions/taxonkit.fish
TaxonKit - A Practical and Efficient NCBI Taxonomy Toolkit
Related projects:
Table of Contents
Features
$HOME/.taxonkitSubcommands
listlineagereformatreformat2*name2taxidfilterlcataxid-changelogprofile2cami*cami-filter*create-taxdump*Note: *New commands since the publication.
Benchmark
Getting complete lineage for given TaxIds (this plot is very old).
Versions: ETE=3.1.2, taxopy=0.5.0 (faster since 0.6.0), TaxonKit=0.7.2.
Dataset
taxdump.tar.gz: https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gznames.dmp,nodes.dmp,delnodes.dmpandmerged.dmpto data directory:$HOME/.taxonkit, e.g.,/home/shenwei/.taxonkit,--data-dir, or environment variableTAXONKIT_DB.All-in-one command:
Update dataset: Simply re-download the taxdump files, uncompress and override old ones.
Installation
Go to Download Page for more download options and changelogs.
TaxonKitis implemented in Go programming language, executable binary files for most popular operating systems are freely available in release page.Method 1: Download binaries (latest stable/dev version)
Just download compressed executable file of your operating system, and uncompress it with
tar -zxvf *.tar.gzcommand or other tools. And then:For Linux-like systems
If you have root privilege simply copy it to
/usr/local/bin:Or copy to anywhere in the environment variable
PATH:For Windows, just copy
taxonkit.exetoC:\WINDOWS\system32.Method 2: Install via conda (latest stable version)

Method 3: Install via homebrew (out of date)
Method 4: Compile from source (latest stable/dev version)
Install go
Compile TaxonKit
Bash-completion
Supported shell: bash|zsh|fish|powershell
Bash:
Zsh:
fish:
Citation
If you use TaxonKit in your work, please cite:
Contact
Create an issue to report bugs, propose new functions or ask for help.
License
MIT License
Starchart