-
Notifications
You must be signed in to change notification settings - Fork 295
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
n_unique_kmers() returns 0 upon save/reload #1781
Comments
Thanks for finding this. Which version of ng3 = khmer.Nodegraph.load(temp_file) |
I think you want to use |
It looks like I'm using 2.1.1 (which is what |
This is an oversight, @betatim! @dkoslicki, the HyperLogLog stuff (in unique-kmers.py and elsewhere) is probably the best way to go for estimating k-mer counts, if that's feasible. @luizirber may have some other thoughts as I know he is working on similar stuff for sourmash. Also, #1248 needs to be linked in... |
Thanks @ctb; I am already forming the |
I noticed that using the Nodegraph method
n_unique_kmers()
returns 0 whenever a Nodegraph is saved and then reloaded. Minimum working example:Same thing happens on realistic data.
Oddly enough, the method
n_occupied()
doesn't seem to have this issue:As an aside: it isn't clear to me (from the documentation) that one should use
n_unique_kmers()
orn_occupied()
if one wants to estimate the number of (distinct) k-mers that are present in a Nodegraph().The text was updated successfully, but these errors were encountered: