lineage.states.StateDistributionGaPhs

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

Classes

StateDistribution

For G1 and G2 separated as observations.

Module Contents

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

For G1 and G2 separated as observations.

Parameters:
  • bern_p1 (float)

  • bern_p2 (float)

  • gamma_a1 (float)

  • gamma_scale1 (float)

  • gamma_a2 (float)

  • gamma_scale2 (float)

params
G1
G2
rvs(size, rng=None)

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

Parameters:

size (int)

dist(other)

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

dof()

Return the degrees of freedom.

logpdf(x)

To calculate the log-likelihood of observations to states.

Parameters:

x (numpy.ndarray)

Return type:

numpy.ndarray

estimator(x, gammas)

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

Parameters:
  • x (numpy.ndarray)

  • gammas (numpy.ndarray)

censor_lineage_array(censor_condition, tree, obs, states, desired_experiment_time=2000000000000.0)

Applies censoring to array representation directly.

Parameters:
  • censor_condition (int)

  • tree (scipy.sparse.csr_array)

  • obs (numpy.ndarray)

  • states (numpy.ndarray)

Return type:

tuple[scipy.sparse.csr_array, numpy.ndarray, numpy.ndarray]