mafft-io
FASTA, Clustal, PHYLIP, hat2, and localhom I/O for rust-MAFFT.
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.
Reads sequences and their associated constraint / distance data from
disk (or any BufRead), and writes alignment results back out. Reuses
noodles-fasta under the
hood for the FASTA parser. Reproduces C MAFFT's read path so the engine
sees byte-for-byte the same input as the C reference: type detection
(N counts as nucleotide), the residue filter and case convention
(lowercase nucleotide, uppercase protein; --anysymbol keeps the input
case), * → -, and the seqcheck illegal-residue test
(find_illegal_residue, using the alphabets from mafft-scoring).
normalize_residues applies the same rules to sequences that never
went through a file.
Install
Most callers want the top-level mafft
crate, which re-exports the public surface here.
Examples
use ;
// From a path
let input = read_fasta?;
// From any BufRead (stdin, a Vec<u8>, an HTTP body, ...)
let cursor = new;
let input = read_fasta_from_reader?;
Documentation
API reference: docs.rs/mafft-io
Project documentation: luksgrin.github.io/rust-MAFFT
License
MIT for the Rust port; the upstream MAFFT I/O conventions this crate
mirrors are BSD-3-Clause. See LICENSE-MIT and LICENSE-BSD in the
workspace root.