High-level description
This file defines a set of custom exception classes for the Cassiopeia software. These exceptions are used to handle various error conditions that may arise during the execution of the Cassiopeia pipeline, such as autocorrelation errors, tree errors, data simulator errors, distance solver errors, and more.Code Structure
The code consists of a series of custom exception classes, each inheriting from the baseException class. These classes are named according to the specific error condition they represent, such as AutocorrelationError, CassiopeiaTreeError, DataSimulatorError, etc. Each class has a simple pass statement, indicating that they do not have any additional logic or attributes beyond the basic exception handling.
Symbols
AutocorrelationError
Description
An exception class for errors encountered in thetools.autocorrelation module.
CassiopeiaError
Description
A general exception class for the Cassiopeia software.CassiopeiaTreeError
Description
An exception class for errors encountered in theCassiopeiaTree class. This class is used to handle errors related to tree manipulation, character state assignments, and other tree-related operations.
DataSimulatorError
Description
A generic exception class for errors encountered in theDataSimulator subclasses. This class is used to handle errors related to data simulation, such as invalid parameters or data inconsistencies.
DistanceSolverError
Description
An exception class for errors encountered in theDistanceSolver subclasses. This class is used to handle errors related to distance-based tree solving algorithms, such as Neighbor-Joining and UPGMA.
ecDNABirthDeathSimulatorError
Description
An exception class for errors encountered in theecDNABirthDeathSimulator class. This class is used to handle errors specific to the simulation of trees with extrachromosomal DNA (ecDNA).
FitchCountError
Description
An exception class for errors encountered in theFitchCount algorithm. This algorithm is used to infer the number of transitions between categorical variables (e.g., tissues) in a tree.
GreedySolverError
Description
An exception class for errors encountered in theGreedySolver class. This class represents the structure of top-down algorithms that build the reconstructed tree by recursively splitting the set of samples based on some split criterion.
HybridSolverError
Description
An exception class for errors encountered in theHybridSolver subclasses. This class represents a hybrid approach to tree solving, combining a greedy algorithm with a more complex algorithm for subproblems.
ILPSolverError
Description
An exception class for errors encountered in theILPSolver subclasses. This class represents an integer linear programming (ILP) approach to tree solving.
iTOLError
Description
An exception class for errors encountered when interacting with the iTOL (Interactive Tree Of Life) software.LeafSubsamplerError
Description
An exception class for errors encountered in theLeafSubsampler class. This class is used to handle errors related to subsampling leaves from a tree.
PreprocessError
Description
An exception class for errors encountered during the preprocessing stage of the Cassiopeia pipeline.PriorTransformationError
Description
An exception class for errors encountered when transforming prior probabilities into weights.SharedMutationJoiningSolverError
Description
An exception class for errors encountered in theSharedMutationJoiningSolver class. This class represents an agglomerative clustering procedure that joins samples based on shared mutations.
TreeSimulatorError
Description
An exception class for errors encountered in theTreeSimulator subclasses. This class is used to handle errors related to tree simulation, such as invalid parameters or stopping conditions.
UnknownCigarStringError
Description
An exception class for errors encountered when parsing an unknown CIGAR string. A CIGAR string is a compact representation of an alignment between two sequences.UnspecifiedConfigParameterError
Description
An exception class for errors encountered when a required configuration parameter is not specified.BranchLengthEstimatorError
Description
An exception class for errors encountered in theBranchLengthEstimator class. This class is used to estimate branch lengths on a tree.
IIDExponentialMLEError
Description
An exception class for errors encountered in theIIDExponentialMLE class, a subclass of BranchLengthEstimator. This class estimates branch lengths under a model of independent and identically distributed (IID) exponential waiting times for mutations.
