lineage.states.StateDistributionGaPhs

State distribution class for separated G1 and G2 phase durations as observation.

Module Contents

class lineage.states.StateDistributionGaPhs.StateDistribution(bern_p1=0.9, bern_p2=0.75, gamma_a1=7.0, gamma_scale1=3, gamma_a2=14.0, gamma_scale2=6)

For G1 and G2 separated as observations.

rvs(self, size: int, rng=None)

User-defined way of calculating a random variable given the parameters of the state stored in that observation’s object.

dist(self, other)

Calculate the Wasserstein distance between this state emissions and the given.

dof(self)

Return the degrees of freedom.

logpdf(self, x: np.ndarray)

To calculate the log-likelihood of observations to states.

estimator(self, x: np.ndarray, gammas)

User-defined way of estimating the parameters given a list of the tuples of observations from a group of cells.

assign_times(self, full_lineage: list)

Assigns the start and end time for each cell in the lineage. The time observation will be stored in the cell’s observation parameter list in the second position (index 1). See the other time functions to understand. This is used in the creation of LineageTrees

censor_lineage(self, censor_condition: int, full_lineage: list, desired_experiment_time=2000000000000.0)

This function removes those cells that are intended to be remove from the output binary tree based on emissions. It takes in LineageTree object, walks through all the cells in the output binary tree, applies the pruning to each cell that is supposed to be removed, and returns the censored list of cells.

lineage.states.StateDistributionGaPhs.fate_censor(cell)

User-defined function that checks whether a cell’s subtree should be removed. Our example is based on the standard requirement that the first observation (index 0) is a measure of the cell’s fate (1 being alive, 0 being dead). Clearly if a cell has died, its subtree must be removed.

lineage.states.StateDistributionGaPhs.time_censor(cell, desired_experiment_time)

User-defined function that checks whether a cell’s subtree should be removed. Our example is based on the standard requirement that the second observation (index 1) is a measure of the cell’s lifetime. If a cell has lived beyond a certain experiment time, then its subtree must be removed.