Aligner#
- class pyfamsa.Aligner#
A single FAMSA aligner.
- scoring_matrix#
The scoring matrix used for scoring alignments.
- Type:
New in version 0.4.0: The
scoring_matrixattribute.- __init__(*, threads=0, guide_tree='sl', tree_heuristic=None, medoid_threshold=0, n_refinements=100, keep_duplicates=False, refine=None, scoring_matrix=None)#
Create a new aligner with the given configuration.
- Keyword Arguments:
threads (
int) – The number of threads to use for parallel computations. If 0 given (the default), useos.cpu_countto spawn one thread per CPU on the host machine.guide_tree (
str) – The method for building the guide tree. Supported values are:slfor MST+Prim single linkage,slinkfor SLINK single linkage,upgmafor UPGMA,njfor neighbour joining.tree_heuristic (
strorNone) – The heuristic to use for constructing the tree. Supported values are:medoidfor medoid trees,partfor part trees, orNoneto disable heuristics.medoid_threshold (
int) – The minimum number of sequences a set must contain for medoid trees to be used, if enabled withtree_heuristic.n_refinements (
int) – The number of refinement iterations to run.keep_duplicates (
bool) – Set toTrueto avoid discarding duplicate sequences before building trees or alignments.refine (
boolorNone) – Set toTrueto force refinement,Falseto disable refinement, or leave asNoneto disable refinement automatically for sets of more than 1000 sequences.scoring_matrix (
ScoringMatrixorstr) – The scoring matrix to use for scoring alignments. By default, the MIQS matrix by Yamada & Tomii (2014) is used like in the original FAMSA implementation.
New in version 0.4.0: The
scoring_matrixargument.
- align(sequences)#
Align sequences together.
- align_profiles(profile1, profile2)#
Align two profiles together.
Profile-profile alignment computes a new alignment using sequences from the two input alignments while preserving the columns of each profile.
- Parameters:
- Returns:
Alignment– The resulting profile-profile alignment.
New in version 0.5.0.