An extensible and performant aligner and read mapper
A pure-Rust extensible sequence aligner and mapper mirroring the interface and producing identical output to minimap2.
Supports all minimap2 presets (map-ont, map-hifi, sr, splice, asm, ava) with full CIGAR, CS/MD tags, SAM, and PAF output. SIMD-optimized DP kernels (NEON, SSE2, SSE4.1, AVX2, AVX512BW, WASM v128) with scalar memory safe fallback.
cargo build --release
./target/release/rammap -x map-ont -c reference.fa reads.fq > alignments.paf
./target/release/rammap -x sr -a reference.fa reads_R1.fq reads_R2.fq > alignments.sam| Preset | Data type |
|---|---|
map-ont |
Oxford Nanopore reads |
map-pb |
PacBio CLR reads (HPC seeds) |
map-hifi |
PacBio HiFi reads |
map-iclr |
Illumina Complete Long Reads |
lr:hq |
Accurate long reads |
lr:hqae |
HQ long-read assembly eval |
sr |
Short reads (Illumina) |
splice |
Long-read RNA-seq |
splice:hq |
High-quality RNA-seq |
splice:sr |
Spliced short RNA-seq |
cdna |
cDNA / splice alias |
asm5 / asm10 / asm20 |
Assembly-to-reference (~0.1% / 1% / 5% divergence) |
ava-ont / ava-pb |
All-vs-all overlap |
Run rammap -x --help for the full list of accepted preset names and aliases.
rammap can be used as a Rust library for programmatic alignment, with an API compatible with minimap2-rs.
[dependencies]
# The library is published as `rammap-core` but imported in code as `rammap`
# (e.g. `use rammap::api::Aligner;`).
rammap-core = { version = "1.1.3", default-features = false, features = ["parallel"] }Library features (on rammap-core): parallel (rayon-based threading), wasm-threads
(browser-side rayon for WASM builds). The CLI is a separate crate (rammap, which
depends on rammap-core) and provides the binary plus the jemalloc / mimalloc
opt-in global allocators (off by default).
…Aligner…MapResult / Mapping…Aligner is Send + Sync. For multi-threaded use:
use std::sync::Arc;
let aligner = Arc::new(Aligner::from_index("ref.mmi", Preset::MapOnt)?);
// Each thread gets a clone of the Arc
let aligner_clone = aligner.clone();
std::thread::spawn(move || {
let result = aligner_clone.map_seq("read", seq);
});The SIMD-optimized DP engine can be used directly for pairwise sequence alignment, without the full mapping pipeline:
…The DP engine automatically selects the best SIMD backend (AVX512 > AVX2 > SSE4.1 > SSE2 > NEON > WASM > scalar).
# Full build (CLI + library) — builds both workspace crates
cargo build --release
# Library only (no CLI dependencies)
cargo build -p rammap-core --release --no-default-features --features parallel
# Run tests
cargo test
# Run integration tests (requires test data)
bash tests/integration_test.shSee docs/architecture.md for a detailed guide to the codebase.
See docs/extensibility.md for documentation on building and replacing
modular components (seeding, chaining, alignment, etc).
See docs/performance.md for detailed benchmarks against minimap2.
See docs/wasm.md for WASM build instructions, web demo, and benchmarks.
rammappy is an externally maintained module that provides Python bindings directly to the rammap-core API via PyO3.
MIT
No open issues yet, or sync has not completed.