solver
directory contains implementations of various phylogenetic tree reconstruction algorithms used in the Cassiopeia framework. It includes different solver classes that employ diverse strategies for inferring evolutionary relationships between samples based on their mutation profiles.
solve
method implemented by each solver class. This method takes a CassiopeiaTree
object containing the character matrix and other relevant data, and populates it with the reconstructed tree.
The __init__.py
file serves as the main interface for importing the various solver classes and utility functions.
CassiopeiaSolver.py
: Defines the abstract base class for all solvers.DistanceSolver.py
: Implements the base class for distance-based solvers.GreedySolver.py
: Provides the framework for greedy top-down solvers.HybridSolver.py
: Implements a hybrid approach combining top-down and bottom-up strategies.ILPSolver.py
: Implements the Integer Linear Programming-based solver.NeighborJoiningSolver.py
and UPGMASolver.py
: Implement specific distance-based algorithms.SpectralSolver.py
and related files: Implement spectral methods for tree reconstruction.VanillaGreedySolver.py
and MaxCutGreedySolver.py
: Implement specific greedy algorithms.dissimilarity_functions.py
: Provides various functions for calculating dissimilarity between samples.graph_utilities.py
: Offers utility functions for graph construction and manipulation used in some solvers.solver_utilities.py
: Contains general utility functions used across different solvers.ILPSolver
and fast implementations of distance-based solvers, may require additional configuration:
ILPSolver
uses Gurobi, which requires a separate license and installation.config.ini
file, which is read by the relevant solver classes.
The solvers also support various parameters for customization, such as dissimilarity functions, prior transformations, and algorithm-specific thresholds. These can be set when initializing the solver objects.
In summary, the solver
directory provides a comprehensive toolkit for phylogenetic tree reconstruction, offering multiple algorithms and utilities to handle various types of mutation data and reconstruction scenarios.