Post

Looking for people to test the latest version of simd-sketch. It's now 2x as fast at sketching, and supports skipping over kmers containing N and other ambiguous bases (which is only ~35% slower). 'cargo install simd-sketch' is right there under your fingertips ;) github.com/RagnarGrootK...

github.comGitHub - RagnarGrootKoerkamp/simd-sketch: Compute bottom-s sketches and s-buckets sketches, using simd-minimizers crate.Compute bottom-s sketches and s-buckets sketches, using simd-minimizers crate. - RagnarGrootKoerkamp/simd-sketch

4 reposts12 likes

With default params (bucket sketch with 10k buckets), it can sketch 900MB/s of input data per thread, and then can do 1 million pairwise distance comparisons per second per thread. So a full triangle of 1000 2Mbp bacterial genomes is 2.3s + 0.5s.

or with 6 threads, only 0.7s. That's with bucket size b=8. Sketching is >50x faster than BinDash[-rs], which takes at least 110s. For b=8 as above, computing distances is ~2x faster than BinDash, but for b=1, SimdSketch is again 10x faster. curiouscoding.nl/posts/simd-s...

curiouscoding.nlSimdSketch: a fast bucket sketchTable of Contents 1 Jaccard similarity 2 Hash schemes 2.1 MinHash 2.2 $s$-mins sketch 2.3 Bottom-\(s\) sketch 2.4 FracMinHash 2.5 Bucket sketch 2.6 Mod-bucket hash (new?) 2.7 Variants 3 Compressing sk...

Also note: for comparison speed, 1-bit hashes beat everything else (top-right red line here). Because each bit is an independent sample, the entropy is very high. (Whereas comparing 8-bit sketches loses some information, because if two 8-bit values differ in the first bit, the other 7 are unused.)

Compared to `mash triangle` for 208 bgzipp'd cattle genomes on 4 threads, it only took 65 min vs 230 min. Used slightly more RAM (8.2 GB vs 3.3 GB), but easily worth the speedup! Mash defaults are also k=21 and 1k sketches, so not a fair comparison to k=31 and 10k (not sure about sketches v buckets)

Simd-sketch perf should be independent of k. 10k 8-bit buckets is mostly equivalent to a 10k bottom-sketch, so you're getting some more accuracy here. But since you only have 208 genomes, the 200^2 comparisons will take less than a second anyway.

I wonder how much time is spent on decompresion here; that might well be the bottleneck. I get nearly 1GB/s sketching locally, so that's 3s/genome or 200*3s=600s=10min total on a single thread, or only 2.5min on 4 threads.