Closed standage closed 3 years ago
You have to leave the default value in the black list. I should have maken it clear.
cat taxids2.txt | taxonkit filter -B Family -B "no rank,clade"
2
74201
203494
48461
1647988
239934
239935
349741
For now, the Python bindings add "no rank" and "clade" to the blacklist automatically, and it works ok.
But if it is required to leave the default values in the blacklist, maybe the --black-list
flag should append to the default list instead of replace it?
I read the code again, and fix the logic.
"no rank" and "clade" are already defined as ranks with no order in the ranks.txt, and they can be optional removed via -N--discard-noranks
, -B/--blast-list
can be used for adding more ranks to delete, it can also include "no rank".
-B, --black-list strings black list of ranks to discard, e.g., '"no rank", "clade"'
-N, --discard-noranks discard ranks without order, type "taxonkit filter --help" for details
The above command should be:
cat taxids2.txt | taxonkit filter -N -B Family
1. Flag -L/--lower-than and -H/--higher-than are exclusive, and can be
used along with -E/--equal-to which values can be different.
2. A list of pre-ordered ranks is in ~/.taxonkit/ranks.txt, you can use
your list by -r/--rank-file, the format specification is below.
3. All ranks in taxonomy database should be defined in rank file.
4. TaxIDs with no rank can be optionally discarded by -N/--discard-noranks.
5. Futher ranks can be removed with black list via -B/--black-list.
Oh, ok. So if I want to specify -B family
then the -N
flag is required?
not required, it's optional. -N is just for removing "no rank", "clade".
If it's optional, why did my original command fail?
Oh ok. 🤓
I will test with the latest binary you posted.
Is it easy for you to create a Darwin AMD binary? Don't worry if it's inconvenient.
Oh, I wrongly uploaded arm64 binaries...
Ok, I understand now. And I confirmed that my original command works. Thank you!
When user specifies a rank or a (comma separated?) list of ranks for
--black-list
, these should be excluded from the output, correct? I have tried the following example several times with different ranks, and I get the same error message every time.Is this a bug, or am I misunderstanding this flag?
Prerequisites
taxonkit version
Describe your issue