Skip to main content

Crate mafft_core

Crate mafft_core 

Source
Expand description

Core MAFFT alignment engine.

Orchestrates the full alignment pipeline:

  1. Progressive alignment following a guide tree.
  2. Iterative refinement with score-based acceptance.
  3. Adding sequences to existing alignments.

Ports the C TreeDependentIteration() from tditeration.c, progressive alignment from disttbfast.c/tbfast.c, and addonetip() from addfunctions.c.

Re-exports§

pub use progressive::progressive_align;
pub use progressive::progressive_align_partial;
pub use progressive::progressive_align_unweighted;
pub use progressive::progressive_align_with_weights_override;
pub use progressive::MultipleAlignment;
pub use progressive::StepTrace;

Modules§

adjust_direction
Port of C MAFFT’s --adjustdirection strand-detection preprocessing.
external
progressive

Structs§

MafftEngine
The main MAFFT alignment engine.
RefinementParams
Parameters controlling iterative refinement.

Enums§

AlignmentMode
Alignment mode (strategy).

Functions§

add_sequences
Add new sequences to an existing alignment.
add_sequences_keeplength
Add sequences while preserving the existing alignment’s column structure (--add --keeplength). After running the standard add_sequences, deletes any columns that exist only because of new-sequence insertions, restoring the existing alignment to its original width. Columns where ANY new sequence had a residue but ALL existing sequences had gaps get the new-sequence residue dropped (truncated at that position).
add_sequences_keeplength_with_map
Like add_sequences_keeplength but also returns the per-added- sequence list of dropped insertion runs ((start_in_addbk_0based, run_length) pairs). Used by --mapout / --compactmapout.
dndpre_offset_shift
Matrix shift applied when rebuilding the refinement-tree distances the way C’s dndpre does, for the modes that have no pairlocalalign step (FFT-NS-i and friends).
iterative_refine
Iteratively refine a multiple alignment.
pair_penalty_scales
Scale factors turning the pair-phase ppenalty-style integers (lgop * 1000, …) into DP units: (gap_scale, offset_scale).