Skip to main contentHigh-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 base Exception 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 the tools.autocorrelation module.
CassiopeiaError
Description
A general exception class for the Cassiopeia software.
CassiopeiaTreeError
Description
An exception class for errors encountered in the CassiopeiaTree 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 the DataSimulator 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 the DistanceSolver 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 the ecDNABirthDeathSimulator 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 the FitchCount 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 the GreedySolver 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 the HybridSolver 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 the ILPSolver 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 the LeafSubsampler 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.
Description
An exception class for errors encountered when transforming prior probabilities into weights.
SharedMutationJoiningSolverError
Description
An exception class for errors encountered in the SharedMutationJoiningSolver class. This class represents an agglomerative clustering procedure that joins samples based on shared mutations.
TreeSimulatorError
Description
An exception class for errors encountered in the TreeSimulator 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 the BranchLengthEstimator class. This class is used to estimate branch lengths on a tree.
IIDExponentialMLEError
Description
An exception class for errors encountered in the IIDExponentialMLE class, a subclass of BranchLengthEstimator. This class estimates branch lengths under a model of independent and identically distributed (IID) exponential waiting times for mutations.
TreeMetricError
Description
An exception class for errors encountered when calculating tree metrics.
ParameterEstimateError
Description
An exception class for errors encountered when estimating tree parameters.
PlottingError
Description
An exception class for errors encountered when plotting trees.