-
Notifications
You must be signed in to change notification settings - Fork 80
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
[WIP] add signatures() method to both LCA and SBT indices #796
Conversation
tests/test_sbt.py
Outdated
sig47 = load_one_signature(utils.get_test_data('47.fa.sig')) | ||
sig63 = load_one_signature(utils.get_test_data('63.fa.sig')) | ||
|
||
tree.insert(SigLeaf('47', sig47)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the rust side it's taking a signature (sig47
, in this case) and building the SigLeaf
internally. (This is the code that does the conversion).
Issue: with this design you can't set metadata
(I'm setting it to empty). We don't use metadata that much, but might be good to clarify what is the intended use for it (only internal properties for SBT operations? user-provided metadata?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all signature metadata should be in SourmashSignature
. Maybe we can allow insert
to take hints or something? Dunno. But for now is it OK if I change tree.insert
to take SourmashSignature
objects?
Co-Authored-By: Luiz Irber <luizirber@users.noreply.github.com>
Yup, taking a SourmashSignature is the way to go |
alas, it is not as easy as that! 'insert' is currently used to add
bloom filter nodes too.
What do you think about de-deprecating add_node, and having insert
construct a SigLeaf and then use add_node underneath? Then add_node
would be used for bloom filter nodes.
On Fri, Dec 13, 2019 at 05:14:22PM -0800, Luiz Irber wrote:
Yup, taking a SourmashSignature is the way to go
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#796 (comment)
--
C. Titus Brown, ctbrown@ucdavis.edu
|
…into refactor/index_cleanup
I think that's fair. In this case we would have the The deprecation warning was for pointing to libraries using the SBT directly that they should think about using |
tests/test_sbt.py
Outdated
sig = next(load_signatures(utils.get_test_data(f))) | ||
leaf = SigLeaf(f, sig) | ||
tree.add_node(leaf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe do
sig = load_one_signature(utils.get_test_data(f))
tree.insert(sig)
here?
NOTE: this is a PR into #556.
Some quick notes for @luizirber -
insert
already defined but it takes different arguments thanIndex.insert
.