Index.select(...)
currently allows incorrect moltypes
#1547
Labels
good next issue
An issue that should be ready to resolve.
This should raise an error, but does not:
Currently, the only valid moltypes are 'DNA', 'protein', 'dayhoff', and 'hp'.
Your mission, should you choose to accept it, is to make sure that this is generally true.
I think the function to modify is
src/sourmash/index.py:select_signature(...)
, and it should raise aValueError
for invalid moltypes. This function is used by all of theIndex
subclasses inindex.py
and so fixing it should be enough.Please also add a test or three in
tests/test_index.py
.The other major
Index
subclasses, SBT and LCA databases, should be fine, but maybe worth a quick check.see also #1427 -> more tests needed for
Index.select
The text was updated successfully, but these errors were encountered: