Code Monkey home page Code Monkey logo

taxonkit's Introduction

TaxonKit - A Practical and Efficient NCBI Taxonomy Toolkit

taxonkit

Table of Contents

Features

Subcommands

Subcommand Function
list List taxonomic subtrees (TaxIds) bellow given TaxIds
lineage Query taxonomic lineage of given TaxIds
reformat Reformat lineage in canonical ranks
name2taxid Convert scientific names to TaxIds
filter Filter TaxIds by taxonomic rank range
lca Compute lowest common ancestor (LCA) for TaxIds
taxid-changelog Create TaxId changelog from dump archives
version Print version information and check for update
genautocomplete Generate shell autocompletion script

Benchmark

  1. Getting complete lineage for given TaxIds

Dataset

  1. Download and uncompress taxdump.tar.gz: ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
  2. Copy names.dmp, nodes.dmp, delnodes.dmp and merged.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 variable TAXONKIT_DB.

All-in-one command:

wget -c ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz 
tar -zxvf taxdump.tar.gz

mkdir -p $HOME/.taxonkit
cp 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 to Download Page for more download options and changelogs.

TaxonKit is 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.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 variable PATH:

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

Method 2: Install via conda (latest stable version) Install-with-conda Anaconda Cloud downloads

conda install -c bioconda taxonkit

Method 3: Install via homebrew (latest stable version)

brew install brewsci/bio/taxonkit

Method 4: For Go developer (latest stable/dev version)

go get -u github.com/shenwei356/taxonkit/taxonkit

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

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

Contact

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

License

MIT License

Starchart

Stargazers over time

taxonkit's People

Contributors

shenwei356 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.