lineage.CellVar
This file contains the class for CellVar which holds the state and observation information in the hidden and observed trees respectively.
Classes
Class that stores all the time related observations in a neater format. |
|
Cell class. |
Module Contents
- class lineage.CellVar.Time
Class that stores all the time related observations in a neater format. This assists in pruning based on experimental time and obtaining attributes of the lineage as a whole like the average growth rate.
- startT: float
- endT: float
- transition_time: float = 0.0
- class lineage.CellVar.CellVar(parent=None, state=-1)
Cell class.
- Parameters:
parent (CellVar | None)
state (int)
- gen: int
- observed: bool
- state: int
- obs: numpy.ndarray | list[Any]
- divide(T, rng=None)
Member function that performs division of a cell. Equivalent to adding another timestep in a Markov process. :param T: The array containing the likelihood of a cell switching states.
- Parameters:
T (numpy.ndarray)
- isLeafBecauseTerminal()
Returns true when a cell is a leaf with no children. These are cells at the end of the tree.
- Return type:
bool
- isLeaf()
Returns true when a cell is a leaf defined by the two conditions that determine whether a cell is a leaf. A cell only has to satisfy one of the conditions (an or statement) for it to be a leaf.
- Return type:
bool