Skip to content
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

MRG: refactor calculate_gather_stats to disallow repeated downsampling #3352

Merged
merged 29 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d9eeafd
implement downsample_max_hash in terms of downsample_scaled
ctb Oct 5, 2024
4ab87e4
adjust references & use clone too much
ctb Oct 6, 2024
ffa9683
switch to using scaled; avoid unnecessary clones?
ctb Oct 6, 2024
5f70fcc
update to fix? scaled=0 situation
ctb Oct 11, 2024
17f56a6
error on upsampling
ctb Oct 11, 2024
b60fbb0
Merge branch 'latest' of github.com:sourmash-bio/sourmash into refact…
ctb Oct 11, 2024
ffd8ffe
define new error
ctb Oct 11, 2024
b67fc04
bump sourmash core to 0.16.0 b/c of API change
ctb Oct 11, 2024
9b9fc5a
update include/sourmash.h
ctb Oct 11, 2024
a0b93eb
add some downsampling-focused tests
ctb Oct 11, 2024
79e7b7d
rename error type; test specific error type
ctb Oct 11, 2024
b118779
cargo fmt
ctb Oct 11, 2024
464ec60
fix by doing too much downsampling
ctb Oct 11, 2024
641d9fc
upd
ctb Oct 11, 2024
a9b91c9
upd
ctb Oct 11, 2024
79afb85
simplify
ctb Oct 11, 2024
ddcb049
upd again
ctb Oct 11, 2024
6eb86a3
simplify
ctb Oct 12, 2024
b47a6c4
comment
ctb Oct 12, 2024
62f03eb
add KmerMinHashBTree test
ctb Oct 12, 2024
ff4eeda
feat: Implement TryInto to convert Signature and SigStore into KmerMi…
luizirber Oct 13, 2024
e4e5555
update include/sourmash.h
ctb Oct 13, 2024
ceaea39
fix two rs errors
ctb Oct 13, 2024
0eeca48
refactor calculate_gather_stats to take ds query & return isect
ctb Oct 14, 2024
cd0a209
fix format
ctb Oct 14, 2024
2da0084
fix name of query to remaining_query
ctb Oct 14, 2024
405c518
Merge branch 'latest' of github.com:sourmash-bio/sourmash into gather…
ctb Oct 14, 2024
03102a5
Merge branch 'latest' of github.com:sourmash-bio/sourmash into gather…
ctb Oct 15, 2024
72d2044
fix merge mistakes
ctb Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix two rs errors
  • Loading branch information
ctb committed Oct 13, 2024
commit ceaea393d95b3b85575b51c20784d3b9442da149
2 changes: 2 additions & 0 deletions src/core/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ mod test {
use crate::prelude::Select;
use crate::selection::Selection;
use crate::signature::Signature;
#[cfg(all(feature = "branchwater", not(target_arch = "wasm32")))]
use crate::Result;

#[test]
fn sigstore_selection_with_downsample() {
Expand Down
2 changes: 1 addition & 1 deletion src/core/src/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,21 +890,21 @@
impl TryInto<KmerMinHash> for Signature {
type Error = Error;

fn try_into(self) -> Result<KmerMinHash, Error> {
match self.signatures.len() {
1 => self

Check warning on line 895 in src/core/src/signature.rs

View check run for this annotation

Codecov / codecov/patch

src/core/src/signature.rs#L893-L895

Added lines #L893 - L895 were not covered by tests
.signatures
.into_iter()
.find_map(|sk| {
if let Sketch::MinHash(mh) = sk {

Check warning on line 899 in src/core/src/signature.rs

View check run for this annotation

Codecov / codecov/patch

src/core/src/signature.rs#L898-L899

Added lines #L898 - L899 were not covered by tests
Some(mh)
} else {
None

Check warning on line 902 in src/core/src/signature.rs

View check run for this annotation

Codecov / codecov/patch

src/core/src/signature.rs#L902

Added line #L902 was not covered by tests
}
})
.ok_or_else(|| Error::NoMinHashFound),
0 => Err(Error::EmptySignature),
2.. => Err(Error::MultipleSketchesFound),
_ => Err(Error::MultipleSketchesFound),

Check warning on line 907 in src/core/src/signature.rs

View check run for this annotation

Codecov / codecov/patch

src/core/src/signature.rs#L905-L907

Added lines #L905 - L907 were not covered by tests
}
}
}
Expand Down
Loading