-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MRG: core: add scaled selection to manifest; add helper functions for…
… collection and sig/sketch usage (#2948) This PR adds: ## New functions: - `Collection::sig_from_record` > when we iterate through the sketches, we have both `idx` and `record` available. I thought it would make sense to just use record directly, rather than re-getting record from index. - `Signature::minhash` > if there is one minhash sketch available within the sig that matches selection params, return it - `Signature::get_sketch` > if there is one sketch (of any type) available within the sig that matches selection params, return it. Note that since this returns the sketch enum, it still requires checking MinHash type afterwards. @luizirber is there a way to return any of the sketches directly from the same function (like minhash function, above, but more flexible?). - `Manifest::From<&PathBuf>` > build a `manifest` directly from a pathlist file. Added and tested, but lmk if you think we should just build a list of paths separately. I wanted this for branchwater, but am not actually using it since neither the paths or PathBuf loading code allow missing/failed paths. ## New selection functionality - added `scaled` and `num` selection to manifest. For scaled, if sketch is compatible (equal scaled or can be downsampled), keep it during manifest selection. Otherwise, discard. Tests added for each new function/added code. Co-authored-by: Luiz Irber <[email protected]>
- Loading branch information
Showing
3 changed files
with
465 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.