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
Usage
use ;
let input = read_fasta.unwrap;
let engine = new;
let msa = engine.align;
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 |
The command line's flag layer (cli feature)
--auto chooses the mode from the input; --adjustdirection flips strands
before aligning; --nuc / --amino force the type and the case fold. To
get exactly that behaviour in-process instead of re-deriving it, enable the
cli feature and use mafft::cli, which re-exports the
mafft-rs library:
= { = "0.1", = ["cli"] }
use ;
use ;
let input = read_fasta.unwrap;
let msa = run_from_seqs.unwrap;
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
License
MIT AND BSD-3-Clause (the upstream MAFFT C source is BSD-licensed).