harissa.inference.kinetics module#

Inference of basal parameters

Functions#

estim_gamma

Estimate the parameters of a gamma distribution using the method of moments.

estim_gamma_poisson

Estimate parameters a and b of the Gamma-Poisson(a,b) distribution, a.k.a.

infer_kinetics

Infer parameters a[0], ..., a[m-1] and b of a Gamma-Poisson model with time-dependant a and constant b for a given gene at m time points.

transform

Replace x by the conditional expectation given x of the underlying Gamma distribution, within the Gamma-Poisson model inferred from x.

harissa.inference.kinetics.estim_gamma(x)[source]#

Estimate the parameters of a gamma distribution using the method of moments. The output is (a,b) for the distribution f(x) = x**(a-1)*exp(-b*x)/(gamma(a)/b**a).

harissa.inference.kinetics.estim_gamma_poisson(x)[source]#

Estimate parameters a and b of the Gamma-Poisson(a,b) distribution, a.k.a. negative binomial distribution, using the method of moments.

harissa.inference.kinetics.infer_kinetics(x, times, tol=1e-05, max_iter=100, verb=False)[source]#

Infer parameters a[0], …, a[m-1] and b of a Gamma-Poisson model with time-dependant a and constant b for a given gene at m time points.

Parameters:
  • x (ndarray) – x[k] is the gene expression of cell k

  • times (ndarray) – times[k] is the time point of cell k

harissa.inference.kinetics.transform(x)[source]#

Replace x by the conditional expectation given x of the underlying Gamma distribution, within the Gamma-Poisson model inferred from x. NB: this simply corresponds to a linear transformation with offset.