lineage.CellVar
¶
This file contains the class for CellVar which holds the state and observation information in the hidden and observed trees respectively.
Module Contents¶
-
class
lineage.CellVar.
CellVar
(parent: Optional[‘CellVar’], state: Optional[int] = None)¶ Cell class.
-
parent
:Optional['CellVar']¶
-
gen
:int¶
-
observed
:bool¶
-
state
:Optional[int]¶
-
obs
:Optional[np.ndarray]¶
-
left
:Optional['CellVar']¶
-
right
:Optional['CellVar']¶
-
divide
(self, T: np.ndarray, 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.
-
isLeafBecauseTerminal
(self)¶ Returns true when a cell is a leaf with no children. These are cells at the end of the tree.
-
isLeaf
(self)¶ 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.
-
isRootParent
(self)¶ Returns true if this cell is the first cell in a lineage.
-
get_sister
(self)¶ - Return cell_to_return
The sister of the current cell.
-
get_root_cell
(self)¶ - Return curr_cell
The first cell in the lineage to which this cell belongs.
-