Closed shenwei356 closed 1 year ago
Hi @shenwei356 and thanks for your comments! This was a known issue with the early versions of ntHash (see this issue and also ntHash2's paper). We've fixed the periodicity problem in ntHash2. The Golang implementation probably contains the old bug that causes your issue.
Unfortunately, we don't have a Golang implementation for ntHash2. That said, ntHash2 can be used in Python with btllib.
Thanks @shenwei356 for reporting this! We'll try to sync up with @will-rowe and @luizirber to have new releases for Golang and Rust implementation.
I see, thank you all! Currently, I'll limit the k-mer size below 64 for my projects.
Apparently, SWIG (the tool used in btllib to generate Python wrappers) also supports Go. I'll try it out on ntHash and post any updates here.
Hi, thanks for inventing this great algorithm! And glad to see ntHash2 is also published.
I've used ntHash in several projects of mine, specifically, using a Golang implementation (by @will-rowe) of ntHash v1.0.4. It's really fast!
I just find that the hash values are unstable for k > 64. I guess it's related to the algorithm itself, cause it happens to be 64, not another number. I am not familiar with C/C++, so I can't check the original implementation. Here are steps with tools using the Golang implementation to reproduce the issue.
While for k=64, it's stable (
7718595180140858881
):