Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Practical and Efficient NCBI Taxonomy Toolkit, also supports creating NCBI-style taxdump files for custom taxonomies like GTDB/ICTV

License

NotificationsYou must be signed in to change notification settings

shenwei356/taxonkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Related projects:

  • Taxid-Changelog: Tracking all changes of TaxIds, including deletion, new adding, merge, reuse, and rank/name changes.
  • GTDB taxdump: GTDB taxonomy taxdump files with trackable TaxIds.
  • ICTV taxdump: NCBI-style taxdump files for International Committee on Taxonomy of Viruses (ICTV)

Table of Contents

Features

Subcommands

SubcommandFunction
listList taxonomic subtrees (TaxIds) bellow given TaxIds
lineageQuery taxonomic lineage of given TaxIds
reformatReformat lineage in canonical ranks
reformat2*Reformat lineage in chosen ranks, allowing more ranks than 'reformat'
name2taxidConvert taxon names to TaxIds
filterFilter TaxIds by taxonomic rank range
lcaCompute lowest common ancestor (LCA) for TaxIds
taxid-changelogCreate TaxId changelog from dump archives
profile2cami*Convert metagenomic profile table to CAMI format
cami-filter*Remove taxa of given TaxIds and their descendants in CAMI metagenomic profile
create-taxdump*Create NCBI-style taxdump files for custom taxonomy, e.g., GTDB and ICTV

Note:*New commands since the publication.

taxonkit

Benchmark

  1. 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

  1. Download and uncompresstaxdump.tar.gz:https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
  2. Copynames.dmp,nodes.dmp,delnodes.dmp andmerged.dmp to data directory:$HOME/.taxonkit,e.g.,/home/shenwei/.taxonkit ,
  3. Optionally copy to some other directories, and later you can refer to using flag--data-dir,or environment variableTAXONKIT_DB.

All-in-one command:

wget -c https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz tar -zxvf taxdump.tar.gzmkdir -p $HOME/.taxonkitcp names.dmp nodes.dmp delnodes.dmp merged.dmp $HOME/.taxonkit

Update dataset: Simply re-download the taxdump files, uncompress and override old ones.

Installation

Go toDownload Page for more download options and changelogs.

TaxonKit is implemented inGo programming language,executable binary filesfor most popular operating systems are freely availableinrelease page.

Method 1: Download binaries (latest stable/dev version)

Justdownload compressedexecutable file of your operating system,and uncompress it withtar -zxvf *.tar.gz command or other tools.And then:

  1. For Linux-like systems

    1. If you have root privilege simply copy it to/usr/local/bin:

       sudo cp taxonkit /usr/local/bin/
    2. Or copy to anywhere in the environment variablePATH:

       mkdir -p $HOME/bin/; cp taxonkit $HOME/bin/
  2. For Windows, just copytaxonkit.exe toC:\WINDOWS\system32.

Method 2: Install via conda (latest stable version)Install-with-condaAnaconda Clouddownloads

conda install -c bioconda taxonkit

Method 3: Install via homebrew (out of date)

brew install brewsci/bio/taxonkit

Method 4: Compile from source (latest stable/dev version)

  1. Install go

     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
  2. 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 shelltaxonkit 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_completionecho "source ~/.bash_completion" >> ~/.bashrc

Zsh:

# generate completion shelltaxonkit genautocomplete --shell zsh --file ~/.zfunc/_taxonkit# configure if never didecho 'fpath=( ~/.zfunc "${fpath[@]}" )' >> ~/.zshrcecho "autoload -U compinit; compinit" >> ~/.zshrc

fish:

taxonkit genautocomplete --shell fish --file ~/.config/fish/completions/taxonkit.fish

Citation

If you use TaxonKit in your work, please cite:

Shen, W., Ren, H., TaxonKit: a practical and efficient NCBI Taxonomy toolkit,Journal of Genetics and Genomics,https://doi.org/10.1016/j.jgg.2021.03.006Citation Badge

Contact

Create an issue to report bugs,propose new functions or ask for help.

License

MIT License

Starchart

Stargazers over time


[8]ページ先頭

©2009-2025 Movatter.jp