BioForge v6.3.0 — Multiple sequence alignment (MSA)
A new tool in the box, and the foundation of the evolution front (strain
prediction needs sequences aligned by position; so do phylogeny and selection).
── 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. Falls back to the pure-NumPy path elsewhere.
Added
- bioforge.msa.align_multiple(sequences) -> MSAResult — multiple sequence
alignment via the center-star heuristic: align every sequence to a central one
(using the C aligner), then merge by propagating gaps. Ideal for sets of
similar sequences (e.g. the same gene across strains over time).
MSAResult.consensus() gives the majority consensus. - Public API: from bioforge import align_multiple, MSAResult
Honest scope
- Center-star is the simple, correct starting point, best for SIMILAR sequences.
Serious aligners (Clustal Omega, MAFFT, MUSCLE) use progressive alignment +
iterative refinement, better for divergent sets — a planned future upgrade.
Usage
from bioforge import align_multiple
msa = align_multiple(["ATGGCCTTAGGCTA", "ATGGCGTTAGGCTA", "ATGGCCTTAGCTA"])
for row in msa.aligned: print(row)
print(msa.consensus())
Tests
- 14 tests, incl. the key property: removing gaps from any row reproduces the
original sequence exactly (no data loss). 375 tests total.