From 0e5e4eff5ea2f084fb843c1988a09163b6b4558e Mon Sep 17 00:00:00 2001 From: shenwei356 Date: Thu, 17 Nov 2016 14:09:57 +0800 Subject: [PATCH] v0.1.4 --- doc/docs/download.md | 33 +++++----- doc/docs/usage.md | 23 ++++--- doc/site | 2 +- taxonkit/cmd/helper.go | 14 ++++- taxonkit/cmd/reformat.go | 126 ++++++++++++++++++++++++++++++++++++--- 5 files changed, 164 insertions(+), 34 deletions(-) diff --git a/doc/docs/download.md b/doc/docs/download.md index 46f5e58..d750aac 100644 --- a/doc/docs/download.md +++ b/doc/docs/download.md @@ -6,29 +6,29 @@ ## Current Version -[TaxonKit v0.1.3](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.3) -[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/taxonkit/v0.1.3/total.svg)](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.3) +[TaxonKit v0.1.4](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.4) +[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/taxonkit/v0.1.4/total.svg)](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.4) -- add command of `taxonkit reformat` which reformats full lineage to custom format +- add flag `--fill` for `taxonkit reformat`, which estimates and fills missing rank with original lineage information Links: - **Linux** - - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_linux_386.tar.gz) - [taxonkit_linux_386.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_linux_386.tar.gz) - - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_linux_amd64.tar.gz) - [taxonkit_linux_amd64.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_linux_amd64.tar.gz) + - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_linux_386.tar.gz) + [taxonkit_linux_386.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_linux_386.tar.gz) + - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_linux_amd64.tar.gz) + [taxonkit_linux_amd64.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_linux_amd64.tar.gz) - **Mac OS X** - - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_darwin_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_darwin_386.tar.gz) - [taxonkit_darwin_386.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_darwin_386.tar.gz) - - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_darwin_amd64.tar.gz) - [taxonkit_darwin_amd64.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_darwin_amd64.tar.gz) + - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_darwin_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_darwin_386.tar.gz) + [taxonkit_darwin_386.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_darwin_386.tar.gz) + - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_darwin_amd64.tar.gz) + [taxonkit_darwin_amd64.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_darwin_amd64.tar.gz) - **Windows** - - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_windows_386.exe.tar.gz) - [taxonkit_windows_386.exe.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_windows_386.exe.tar.gz) - - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_windows_amd64.exe.tar.gz) - [taxonkit_windows_amd64.exe.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.3/taxonkit_windows_amd64.exe.tar.gz) + - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_windows_386.exe.tar.gz) + [taxonkit_windows_386.exe.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_windows_386.exe.tar.gz) + - [![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/taxonkit/latest/taxonkit_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_windows_amd64.exe.tar.gz) + [taxonkit_windows_amd64.exe.tar.gz](https://github.com/shenwei356/taxonkit/releases/download/v0.1.4/taxonkit_windows_amd64.exe.tar.gz) ## Installation @@ -62,6 +62,9 @@ For Go developer, just one command: ## Previous Versions +- [TaxonKit v0.1.3](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.3) +[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/taxonkit/v0.1.3/total.svg)](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.3) + - add command of `taxonkit reformat` which reformats full lineage to custom format - [TaxonKit v0.1.2](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.2) [![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/taxonkit/v0.1.2/total.svg)](https://github.com/shenwei356/taxonkit/releases/tag/v0.1.2) - add command of `taxonkit lineage`, users can query lineage of given taxon IDs from file diff --git a/doc/docs/usage.md b/doc/docs/usage.md index 1c65d9c..c56140b 100644 --- a/doc/docs/usage.md +++ b/doc/docs/usage.md @@ -246,8 +246,9 @@ Usage: taxonkit reformat [flags] Flags: - -b, --blank string blank string for missing level (default "__") + --blank string blank string for missing rank, if given "", "unclassified xxx" will used -d, --delimiter string field delimiter in input lineage (default ";") + --fill estimate and fill missing rank with original lineage information (recommended) -f, --format string output format, placeholder of is need (default "{k};{p};{c};{o};{f};{g};{s}") --names string names.dmp file (default "names.dmp") --nodes string nodes.dmp file (default "nodes.dmp") @@ -267,19 +268,27 @@ Example lineage list: 1. Default output format ("{k};{p};{c};{o};{f};{g};{s}") $ taxonkit reformat lineage.txt | cut -f 2 + Bacteria;unclassified phylum;unclassified class;unclassified order;unclassified family;unclassified genus;uncultured murine large bowel bacterium BAC 54B + Bacteria;Verrucomicrobia;Verrucomicrobiae;Verrucomicrobiales;Akkermansiaceae;Akkermansia;Akkermansia muciniphila + Viruses;unclassified phylum;unclassified class;Caudovirales;Siphoviridae;unclassified genus;Croceibacter phage P2559Y + Viruses;unclassified phylum;unclassified class;unclassified order;Retroviridae;Intracisternal A-particles;Mouse Intracisternal A-particle + +1. Use custom strings for unclassfied ranks + + $ ./taxonkit reformat lineage.txt --blank "__" | cut -f 2 Bacteria;__;__;__;__;__;uncultured murine large bowel bacterium BAC 54B Bacteria;Verrucomicrobia;Verrucomicrobiae;Verrucomicrobiales;Akkermansiaceae;Akkermansia;Akkermansia muciniphila Viruses;__;__;Caudovirales;Siphoviridae;__;Croceibacter phage P2559Y Viruses;__;__;__;Retroviridae;Intracisternal A-particles;Mouse Intracisternal A-particle -2. Extracting species - $ taxonkit reformat lineage.txt -f "{s}" | cut -f 2 - uncultured murine large bowel bacterium BAC 54B - Akkermansia muciniphila - Croceibacter phage P2559Y - Mouse Intracisternal A-particle +1. Estimate and fill missing rank with original lineage information (**recommended**) + $ ./taxonkit reformat lineage.txt --fill | cut -f 2 + Bacteria;environmental samples ;unclassified Bacteria class;unclassified Bacteria order;unclassified Bacteria family;unclassified Bacteria genus;uncultured murine large bowel bacterium BAC 54B + Bacteria;Verrucomicrobia;Verrucomicrobiae;Verrucomicrobiales;Akkermansiaceae;Akkermansia;Akkermansia muciniphila + Viruses;dsDNA viruses, no RNA stage;unclassified Viruses class;Caudovirales;Siphoviridae;unclassified Siphoviridae;Croceibacter phage P2559Y + Viruses;Retro-transcribing viruses;unclassified Viruses class;unclassified Viruses order;Retroviridae;Intracisternal A-particles;Mouse Intracisternal A-particle