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] Fix sourmash prefetch to work when db scaled is larger than query scaled #1870

Merged
merged 12 commits into from
Mar 7, 2022

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Mar 7, 2022

This PR fixes a problem where sourmash prefetch fails to properly downsample the query sketch as needed.

TODO:

  • do we need to check against other database types?
  • fix assert in re threshold calculation; allow skip? maybe test this more.
  • notify user of scaled value for final summary sketches
  • make sure that output sketches are at appropriate scaled

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #1870 (f3b1a7a) into latest (234df70) will increase coverage by 7.98%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1870      +/-   ##
==========================================
+ Coverage   82.37%   90.35%   +7.98%     
==========================================
  Files         119       89      -30     
  Lines       12935     8742    -4193     
  Branches     1727     1729       +2     
==========================================
- Hits        10655     7899    -2756     
+ Misses       2016      579    -1437     
  Partials      264      264              
Flag Coverage Δ
python 90.35% <100.00%> (+<0.01%) ⬆️
rust ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sourmash/commands.py 88.43% <100.00%> (+0.09%) ⬆️
src/sourmash/search.py 97.00% <100.00%> (+0.02%) ⬆️
src/core/tests/minhash.rs
src/core/src/sketch/minhash.rs
src/core/src/ffi/mod.rs
src/core/src/sketch/hyperloglog/estimators.rs
src/core/src/ffi/cmd/compute.rs
src/core/src/index/search.rs
src/core/src/ffi/nodegraph.rs
src/core/src/index/mod.rs
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 234df70...f3b1a7a. Read the comment docs.

@ctb ctb changed the base branch from latest to fix/prefetch_ksize March 7, 2022 15:43
@ctb ctb changed the title [WIP] Fix sourmash prefetch to work when db scaled is larger than query scaled [MRG] Fix sourmash prefetch to work when db scaled is larger than query scaled Mar 7, 2022
Base automatically changed from fix/prefetch_ksize to latest March 7, 2022 22:10
Copy link
Contributor

@bluegenes bluegenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple minor things, otherwise lgtm!

src/sourmash/commands.py Outdated Show resolved Hide resolved
tests/test_prefetch.py Outdated Show resolved Hide resolved
tests/test_prefetch.py Outdated Show resolved Hide resolved
@ctb ctb merged commit cccd06c into latest Mar 7, 2022
@ctb ctb deleted the fix/prefetch_scaled_db branch March 7, 2022 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants