Skip to content

BioForge v6.1.0 — Columnar map_batch (multi-core on par with minimap2)

Choose a tag to compare

@erlanders177 erlanders177 released this 09 Jul 21:12
· 94 commits to main since this release

The Python serial tail that rebuilt Mapping objects is gone, so multi-core
scaling is no longer capped. On 4 cores, BioForge is now on par with minimap2
on the reference benchmark (within run-to-run noise, sometimes ahead).

── Install ──────────────────────────────────────────────────
pip install bioforge

Requirements

  • Python >= 3.10
  • NumPy >= 1.24 (the only runtime dependency — no Biopython, no heavy deps)
  • The C engine ships PRE-COMPILED inside native wheels for Windows, Linux and
    macOS — no compiler needed. On any other platform it falls back to the pure
    NumPy path automatically (same results, slower).
  • Building from source on an unsupported platform needs GCC:
    python bioforge/engine/build.py

Quick check
python -c "import bioforge; print(bioforge.version)"

── What changed ─────────────────────────────────────────────
Changed

  • bio_map_batch now writes into a NumPy structured array (same layout as the C
    MapOut struct, verified offset by offset) instead of a ctypes array. The
    Python cover builds Mapping objects by reading each field as a column
    (.tolist(), C-level) — no per-field ctypes access, no intermediate dicts.
    Results are identical (guaranteed by test_cmap_parity).

Benchmark (WSL, 4.8 Mb genome, 6000 reads, 5% error, minimap2 -a)

  • 4 cores: minimap2 ~4.0-5.7 vs BioForge ~4.2-4.7 Mb/s -> on par (the pure C
    engine already did 4.85; the serial tail dropped it to ~3.8, now ~4.4-4.7).
  • 1 thread: still ~1.2-1.3x behind (minimap2 ~2.2 vs BioForge ~1.8 Mb/s).
  • Both map all 6000. At E. coli scale; minimap2 may pull ahead at larger scale.

Tests

  • 361 tests; map_batch identical across 1/2/3/4/all threads and equal to
    sequential map().