> ## Documentation Index
> Fetch the complete documentation index at: https://demo.agenticlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TreeSimulator.py

## High-level description

The `TreeSimulator` class is an abstract base class for all tree simulators in Cassiopeia. It defines the basic interface for simulating single-cell phylogenies, requiring derived classes to implement a `simulate_tree` method that returns a `CassiopeiaTree` object representing the simulated phylogeny. This enables users to generate ground truth phylogenies for evaluating different reconstruction and analysis methods.

## References

This class is referenced in other parts of the codebase, particularly in concrete simulator implementations like `BirthDeathFitnessSimulator`, `CompleteBinarySimulator`, and `SimpleFitSubcloneSimulator`. These classes inherit from `TreeSimulator` and provide specific simulation algorithms.

## Symbols

### `TreeSimulator`

#### Description

This is an abstract base class for all tree simulators. It defines the blueprint for simulating single-cell phylogenies.

#### Inputs

This class does not have an **init** method and therefore does not take any inputs.

#### Outputs

This class does not directly return any outputs.

#### Internal Logic

The class uses the `abc` module to define the `simulate_tree` method as an abstract method, ensuring that all concrete subclasses must implement this method.

### `simulate_tree`

#### Description

An abstract method that needs to be implemented by all derived classes. This method should simulate a `CassiopeiaTree` with at least its tree topology initialized.

#### Inputs

This method does not take any inputs.

#### Outputs

| Name | Type | Description |
| :- | :- | :- |
| | `CassiopeiaTree` | A `CassiopeiaTree` object representing the simulated phylogeny. The tree should have at least its topology initialized. |

#### Internal Logic

This method is abstract and therefore does not have any internal logic defined in the base class. Concrete subclasses are responsible for implementing the specific simulation logic.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.