Closed ctb closed 1 week ago
Interestingly we apparently figured this out before, because @bluegenes noted it in a test 😆
Tracking it down a bit more, it looks like maybe this is intentional - Collection::select
delegates to Manifest::select
which merely selects rows with compatible scaled values, but does not actually set the scaled value in the Record
.
The contortions I'm going through over in https://github.com/sourmash-bio/sourmash_plugin_branchwater/pull/504/ make me think that we definitely want to provide a way to request downsampling on sig_from_record
😆
It felt related to https://github.com/sourmash-bio/sourmash_plugin_branchwater/issues/501 to me, too, but after rereading everything I'm not sure. Sigh. Complexities.
per slack, luiz speaketh:
I think this is a straight bug, should be setting scaled and num too!
(later conversation: we're not sure about num ;))
Fixed by #3387.
In
selection.rs
,Selection::from_record
does not pull thescaled
value in from theRecord
:https://github.com/sourmash-bio/sourmash/blob/e86c8a87b7984229f98037a9b0124baaebf608d8/src/core/src/selection.rs#L122-L131
Among perhaps other side effects, this means that
Collection::sig_from_record
does not return an appropriately downsampled signature.This confusion was the source of a bug in branchwater - https://github.com/sourmash-bio/sourmash_plugin_branchwater/issues/505.