Closed standage closed 3 years ago
missing -F
:)
I improve the flag checking.
if `{t}/{S}/{T}` found in `--format` {
if `-S/--pseudo-strain` is on, but `-F/--fill-miss-rank` not given {
log.info()
turn on `-F`
}
} else if `-S/--pseudo-strain` is on {
log.warning()
}
Example:
$ echo 36827 \
| taxonkit lineage \
| taxonkit reformat --add-prefix --format '{g};{s};{t}' --pseudo-strain --fill-miss-rank \
| cut -f 1,3
36827 g__Clostridium;s__Clostridium botulinum;t__Clostridium botulinum B
$ echo 36827 \
| taxonkit lineage \
| taxonkit reformat --add-prefix --format '{g};{s};{t}' --pseudo-strain \
| cut -f 1,3
08:36:01.750 [INFO] -F/--fill-miss-rank is switched on when giving flag -S/--pseudo-strain
36827 g__Clostridium;s__Clostridium botulinum;t__Clostridium botulinum B
$ echo 36827 \
| taxonkit lineage \
| taxonkit reformat --add-prefix --format '{g};{s}' --pseudo-strain \
| cut -f 1,3
08:35:01.515 [WARN] flag -S/--pseudo-strain will not work because none of "{t}", "{S}", "{T}" is found in -f/--format
36827 g__Clostridium;s__Clostridium botulinum
Thanks.
Consider the following two commands.
The lowest taxon in this lineage is below species and has no rank, so I expected the
--pseudo-strain
to report the name of this taxon as the strain. It doesn't work with{T}
or{t}
. Am I doing something wrong?Prerequisites
taxonkit version
Describe your issue