DataSimulator.py
High-level description
The DataSimulator
class in cassiopeia/simulator/DataSimulator.py
is an abstract base class for simulating various types of data to overlay onto a CassiopeiaTree
. This class provides a blueprint for creating simulators that can generate data like lineage tracing information, transcriptomes, or proteomes, allowing for in silico exploration of different data types and their impact on phylogenetic reconstruction.
Code Structure
This code defines a single abstract class DataSimulator
which serves as a template for concrete data simulator implementations. It doesn’t have complex interconnections between symbols.
Symbols
Symbol Name: DataSimulator
Description
This abstract class defines the blueprint for all data simulators. It mandates that any derived class must implement the overlay_data
method.
Inputs
This class doesn’t take any input during initialization.
Outputs
This class doesn’t return any output during initialization.
Internal Logic
This class doesn’t have any internal logic as it’s an abstract class.
Symbol Name: overlay_data
Description
This abstract method defines the core functionality of a DataSimulator
. It’s intended to be implemented by derived classes to overlay specific types of data onto a CassiopeiaTree
.
Inputs
Name | Type | Description |
---|---|---|
tree | CassiopeiaTree | The CassiopeiaTree object to overlay the simulated data on. The tree is assumed to have its topology initialized. |
Outputs
This method doesn’t return any value. It modifies the input CassiopeiaTree
in-place.
Internal Logic
This method is abstract and doesn’t have an implementation in this base class. Derived classes are responsible for implementing the specific logic for data overlay.