sourmash-bio / sourmash

Quickly search, compare, and analyze genomic and metagenomic data sets.
http://sourmash.readthedocs.io/en/latest/
Other
476 stars 79 forks source link

MRG: change `sig_from_record` to use scaled from `Record` to downsample #3387

Closed ctb closed 1 week ago

ctb commented 1 week ago

Fixes https://github.com/sourmash-bio/sourmash/issues/3384.

This PR changes Manifest::select so that if scaled is set in the selection, all matching Records have their scaled value updated. It also updates Selection::from_record to set scaled to match the Record scaled value. In turn, this allows Collection::sig_from_record to respect the specified scaled value when loading Signature.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.47%. Comparing base (c6cadb4) to head (978ae43). Report is 1 commits behind head on latest.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## latest #3387 +/- ## ======================================= Coverage 86.46% 86.47% ======================================= Files 137 137 Lines 16092 16095 +3 Branches 2219 2219 ======================================= + Hits 13914 13918 +4 + Misses 1871 1870 -1 Partials 307 307 ``` | [Flag](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3387/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | Coverage Δ | | |---|---|---| | [hypothesis-py](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3387/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | `25.43% <ø> (ø)` | | | [python](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3387/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | `92.40% <ø> (ø)` | | | [rust](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3387/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | `62.30% <100.00%> (+0.06%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ctb commented 1 week ago

Ready for review and merge @luizirber !

ctb commented 1 week ago

aaaand as I should have expected: in the branchwater plugin, I get breakages around md5sum tests as well as discovering a few bugs/unhandled situations! Which is good. Just, you know, more work :)