Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taxonkit reformat 如何显示kingdom 信息 #64

Closed
1 task
zhaolei6116 opened this issue Aug 24, 2022 · 4 comments
Closed
1 task

taxonkit reformat 如何显示kingdom 信息 #64

zhaolei6116 opened this issue Aug 24, 2022 · 4 comments

Comments

@zhaolei6116
Copy link

reformat 格式选择如下

Output format can be formated by flag --format, available placeholders:

{k}: superkingdom
{p}: phylum
{c}: class
{o}: order
{f}: family
{g}: genus
{s}: species
{t}: subspecies/strain

{S}: subspecies
{T}: strain
  • {k}:superkingdom 如何改为 {k}: kingdom? 我希望结果是 kingdom 而不是 superlingdom 如何做呢
@shenwei356
Copy link
Owner

shenwei356 commented Aug 24, 2022

先说答案:(目前)不支持。

NCBI taxonomy 似乎只有一些病毒和真核里面有kingdom,都不包含细菌。

$ taxonkit list -I "" --ids 1 \
    | taxonkit lineage -n -r \
    | csvtk grep -Ht -f 4 -p kingdom -l \
    | csvtk pretty -Ht
2732396   Viruses;Riboviria;Orthornavirae                     Orthornavirae    kingdom
2732397   Viruses;Riboviria;Pararnavirae                      Pararnavirae     kingdom
2731360   Viruses;Duplodnaviria;Heunggongvirae                Heunggongvirae   kingdom
2732090   Viruses;Monodnaviria;Loebvirae                      Loebvirae        kingdom
2732091   Viruses;Monodnaviria;Sangervirae                    Sangervirae      kingdom
2732092   Viruses;Monodnaviria;Shotokuvirae                   Shotokuvirae     kingdom
2732093   Viruses;Monodnaviria;Trapavirae                     Trapavirae       kingdom
2732005   Viruses;Varidnaviria;Bamfordvirae                   Bamfordvirae     kingdom
2732006   Viruses;Varidnaviria;Helvetiavirae                  Helvetiavirae    kingdom
2840023   Viruses;Adnaviria;Zilligvirae                       Zilligvirae      kingdom
33090     cellular organisms;Eukaryota;Viridiplantae          Viridiplantae    kingdom
4751      cellular organisms;Eukaryota;Opisthokonta;Fungi     Fungi            kingdom
33208     cellular organisms;Eukaryota;Opisthokonta;Metazoa   Metazoa          kingdom

我们一般都是看superkingdom,对应平常说的“界门纲目科属种”的“界”。

$ taxonkit list -I "" --ids 1 \
    | taxonkit lineage -n -r \
    | csvtk grep -Ht -f 4 -p superkingdom -l \
    | csvtk pretty -Ht
10239   Viruses                        Viruses     superkingdom
2       cellular organisms;Bacteria    Bacteria    superkingdom
2157    cellular organisms;Archaea     Archaea     superkingdom
2759    cellular organisms;Eukaryota   Eukaryota   superkingdom

@zhaolei6116
Copy link
Author

OK thank you
我研究真菌, Fungi 正好对应的是kingdom。

@shenwei356
Copy link
Owner

Just added it ({K})

    {k}: superkingdom
    {K}: kingdom
    {p}: phylum
$ echo 5207 | ./taxonkit reformat -I 1 -f "{k};{K};{p};{c};{o};{f};{g};{s}" 
5207    Eukaryota;Fungi;Basidiomycota;Tremellomycetes;Tremellales;Cryptococcaceae;Cryptococcus;Cryptococcus neoformans

@zhaolei6116
Copy link
Author

Wow 👍👍👍, thank you, It's been an amazing journey, 这是一段神奇的经历,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants