WilCrofter / BuzzHash

A Julia package based on S. Dasgupta, C. F. Stevens, and S. Navlakha (2017). A neural algorithm for a fundamental computing problem. Science, 358, 6364:793-796.
Other
5 stars 3 forks source link

Could this be(come) a rolling hash? #4

Open bdklahn opened 1 year ago

bdklahn commented 1 year ago

I'm so glad this was done in Julia. I have significant experience writing Python, C++, etc. ,etc. but think it makes sense to transition to Julia for almost all of those use cases.

I'm just learning about rolling hashes and, as I understand, the benefit there is that you can re-use the already-calculated values between the ends, for the next window slide step. But maybe that savings is moot in cases like this, where a matrix multiplication on a precalculated binary lookup table is so cheap. IAW, it might be at least as fast as subtracting the last and adding the next step ends. IDK.

I just think the fly neural processing is cool and elegant, in and of itself, anyway. But I've been wondering if this has/can been/be adapted to genome mapping (aka alignment) to a reference. I wonder if it would be any faster (or more amenable to long nucleotide chains with 4 character alphabets) than minimap2 (GitHub repo)

"buzzmap", anyone? (taken) "buzzgenmap"??

WilCrofter commented 1 year ago

@bdklahn Thanks for your kind email. I've not looked at Buzzhash for several years and wonder if it still works in Julia 1.9.2. I'll check and bring it up to date if necessary.

Possible application to genome alignment is a good question and food for thought. I understand why it might but beyond that I have to admit I'm out of my wheelhouse. I see there is a talk at the upcoming JuliaCon2023, Unlocking the power of genomic analysis in Jula which promises to cover relevant libraries etc. I assume it will be on YouTube at some point as in previous years.

I've been working in Julia for ten years or more at this point, first in medical research, lately in climate modeling. I'm a big fan.

WilCrofter commented 1 year ago

@bdklahn I've partially updated BuzzHash to Julia 1.9.2. The two notebooks will need work since MNIST has changed, but the source should instantiate and precompile successfully. I've tested it lightly.

Thanks for your interest.

bdklahn commented 1 year ago

@bdklahn I've partially updated BuzzHash to Julia 1.9.2. The two notebooks will need work since MNIST has changed, but the source should instantiate and precompile successfully. I've tested it lightly.

Thanks for your interest.

Awesome! Thanks!