Repository navigation
Sketching api for sequence data passed via an iterator - #76
Conversation
|
@vrbouza any initial thoughts on the WASM implications (if any) here? |
|
Hi Tommy, all looks nice from the wasm dimension, except from one subtlety: with these changes, should fix the compilation! (I know this cfg gate is different from the others, but in my dev. branch I am already working with this to support wasm64 compilation, so better if you could use directly target_family hehe). You can test with |
|
fixed, compiles to wasm32-unknown-unknown now |
|
Thanks Tommi, this looks good! Would you mind adding your example API use case above to the docstring above I can fix the codecov CI after merging |
|
done! |
as discussed in #75
This breaks backwards compatibility for code that relies on the NtHashIterator::new or AaHashIterator::new constructor, let me know if this is a problem as it's possible to implement the PR with the old, now unused, constructors intact.
I didn't end up doing the PathBuf rewrite as strings are used everywhere else in the code to point to files so thought it'd be better to keep everything consistent.
btw needletail >=0.6 compiles for wasm32 if you only enable the flate2 compression, I think this would allow merging some of the wasm32 and non-wasm32 code if you want to simplify things at some point.
Changes
Adds the following non-wasm32 code:
(Vec<u8>, Option<Vec<u8>>)instead of file paths.sketch_datafunction that does not rely on file paths.sketch_filesuse sketch_data after reading the required data.SketchingOptsstruct that stores the parameters needed to sketch a (single) sample.from_sketchesconstructor for MultiSketch that assigns indexes to each sketch and populates sketch_bins so that the constructed MultiSketch can be used with the other functions.Example usage for sketch_data