mafft 0.1.2

MAFFT multiple sequence alignment — high-level Rust API (re-exports mafft-core, mafft-types, mafft-io)
Documentation

mafft

MAFFT multiple sequence alignment — high-level Rust API.

This is the ergonomic entry point to the rust-MAFFT workspace. It re-exports the alignment engine, sequence types, and I/O helpers so most callers can use mafft::* and skip the sub-crate imports.

Acknowledgment. rust-MAFFT is a port of MAFFT by Kazutaka Katoh and colleagues (CBRC). The science is theirs. If you use this crate in published work, please cite Katoh & Standley 2013; full guidance at the project citation page.

Install

cargo add mafft

Usage

use mafft::{MafftEngine, AlignmentMode, read_fasta};

let input = read_fasta("input.fasta").unwrap();
let engine = MafftEngine::new(AlignmentMode::FftNs2);
let msa = engine.align(&input);

Available strategies

Mode Use case
AlignmentMode::FftNs2 Default — fast progressive alignment
AlignmentMode::FftNsi Iterative refinement
AlignmentMode::LInsi Most accurate for < 200 sequences
AlignmentMode::GInsi Globally alignable sequences
AlignmentMode::EInsi Sequences with large gaps

When to depend on a sub-crate instead

Use the underlying crates directly only when you need finer control:

  • mafft-core — engine + modes (skip the I/O layer)
  • mafft-align, mafft-tree, mafft-scoring, mafft-fft — internals

Related

  • mafft-rs — standalone CLI: cargo install mafft-rs
  • pymafft — Python bindings: pip install pymafft

License

MIT AND BSD-3-Clause (the upstream MAFFT C source is BSD-licensed).