Gigabytes per second of DNA: using Rust for matching genomic motifs
summary
A Rust rewrite of a position specific scoring matrix motif scanner delivers a measured ~10× speedup over C/C++-backed Python packages and about ~100× when using SIMD, reaching 1.1 GB/s on benchmark genomes. Implementation uses compact enum alphabets, generic scoring matrices with the generic-array fallback, explicit AVX2 gather intrinsics and constant-dimension arrays; produces PyO3 bindings for Python. Validated on Escherichia coli, the pipeline scans gigabases and reduces runtime from days to hours.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:17Proteins in transcription factors
- 1:52The problem with transcription factors
- 2:43Positionspecific scoring matrix
- 4:13Benchmark
- 6:08Implementation
- 7:04Biological alphabet representation
- 9:24Rust benchmark
- 10:02Gather instructions
- 11:58Constant dimension matrix
- 13:25Comparison with Singi
- 14:27Comparison with C
- 15:47Conclusion
- 17:00Questions
related talks
30mUnder a Microscope: Exploring Fast and Safe Rust for Biology
23mWhat if the way you code could change the planet?
40mNine Rules for Writing Python Extensions in Rust
31mBenchmarking and Optimization of Rust Libraries
01h 00mRust for good: systems programming in Science and Public Health
36mPumping up Python modules using Rust
56mReady for Rust
31mWhen Safe Code is Fast - Scientific Computing in Rust
