Closed Krasnopeev closed 1 year ago
Thanks for using TaxonKit. Now it outputs the same format for TaxIds not found in the database, and the missing default values can also be set with -r
and R
.
-r, --miss-rank-repl string replacement string for missing rank
-R, --miss-taxid-repl string replacement string for missing taxid
Examples:
$ echo -ne "562\n0" \
| taxonkit reformat -I 1 -f '{p}\t{s}' \
| csvtk pretty -Ht
15:47:49.478 [WARN] taxid 0 not found
562 Proteobacteria Escherichia coli
0
$ echo -ne "562\n0" \
| taxonkit reformat -I 1 -f '{p}\t{s}' -t -r / -R 0 \
| csvtk pretty -Ht
15:48:39.860 [WARN] taxid 0 not found
562 Proteobacteria Escherichia coli 1224 562
0 / / 0 0
It works! Thanks a lot!
Hi there!
I try to classify my ASV after 16S/18S gene sequncing with kraken and get lineage for each taxid.
here is my pipe:
kraken2_console_out.tsv
looks like:after this line
| taxonkit reformat -I 2 -f '{k}\t{p}\t{c}\t{o}\t{f}\t{g}\t{s}\t{t}' -r "Unclassified" \
I recive in console:Ok, but when I try to add header with
| csvtk add-header -t -n seq,taxid,kindom,phylum,class,order,family,genus,species,strain > kraken2_console_out_taxonomy.tsv
I recive
Ez way is to skip all lines with
taxid 0
but I need to keep them for downstream analysis. That is a problem.How can I do that?
Thanks!