-
Notifications
You must be signed in to change notification settings - Fork 2
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
index:: do not write output if no signatures to write? #207
Comments
In #197, I introduced a bool param for each function, Where this fix does not solve indexing woes, is when all signatures load correctly, but do not match desired parameters. This yields an empty collection (still a valid collection), which is then passed to in
This means we actually would need to check for empty collection within each function, as I've proposed in #267 for index. Also, it's actually a bit confusing, because we write I'm thinking I should perhaps return an error from We would need to handle this differently if we allow reading multiple collections in -- we would only want to exit if we have 0 signatures to use. |
hah! we confronted a similar challenge a few years back in sourmash - sourmash-bio/sourmash#1426. At least this reminded me of that. |
so do you have a vote on erroring out when we have 0 sigs to search?
|
I'm a fan of erroring out if there are 0 sketches to use in any situation. |
Error out when 0 signatures are loaded from a collection. Since we currently only load a single collection as our query or database, 0 sigs in either means that no useful results would be obtained. - Fixes #207
As of #134, we write empty index files in cases where there were no signatures to load. This matches sourmash underlying sourmash index functionality, do we want to keep it, or write no file?
As of #197, I raise an error for this situation. Other than indexing, I standardized most code to exit gracefully when no signatures are loaded from either query or search files.
The text was updated successfully, but these errors were encountered: