scPhyloX.estimation.haematopoiesis
Classes
Functions
|
ODE of cell number changes over time |
|
Stem cell number calculator |
|
|
|
Probability density function of LR distance |
|
Likelihood of lr-dist |
|
Mutation rate estimation using DE |
|
Mutation rate estimation using DE-MCMC |
Module Contents
- cellnumber(t, xx, r, a, b, k, t0, p, r1, b1)
ODE of cell number changes over time
- Args:
- t:
time
- xx:
[n_stemcell, n_nonstemcell]
- stem_num(i, t, c0, ax, bx, r, k, t0, r1, b1)
Stem cell number calculator
- Args:
- i:
generation
- t:
time
- c0:
initial cell number
- ax,bx,r,d,k,t0:
parameters
- return:
- float:
Stem cell number in generation i at time t.
- nstem_num(t, x, c0, ax, bx, r, k, t0, r1, b1)
- p_xi(gen, T, c0, ax, bx, r, k, t0, r1, b1)
Probability density function of LR distance Args:
- n_gen:
generation
- T:
time
- c0:
initial cell number
- ax, bx, r, k, t0, r1, b1:
parameters
- Return:
- np.array:
Probability density of LR distance at time T.
- my_loglike(theta, data, args)
Likelihood of lr-dist
- Args:
- theta:
parameters, (ax, bx, r, k, t0, r1, b1)
- data:
Observed lr dist
- args:
paramteres, (time, initial_cell_number, prior_sigma)
- Return:
- float:
Sum of log-likelihood of given lr dist parameters
- para_inference_DE(data, T=20, c0=None, sigma=1, n_iter=100, bootstrape=0, verbose='text')
Mutation rate estimation using DE
- Args:
- data:
lp-dist
- n_iter:
Iterations of de estimation
- bootstrape:
Weather using bootstrape to accuratly estimate mutation rate, 0 to turn off.
- Return:
- tuple:
(accepted parameters, loss, de-estimator)
- class LogLike(loglike, data, args)
Bases:
pytensor.tensor.Op- itypes
- otypes
- likelihood
- data
- args
- perform(node, inputs, outputs)
- mcmc_inference(data, para_prior, T, c0, sigma, draw=1000, tune=1000, chains=9, est_bx=False)
Mutation rate estimation using DE-MCMC
- Args:
- data:
Observed lp-dist
- data_prior:
mean of prior distributions of all parameters
- T:
time of phylodynamics eqns
- c0:
initial cell numbers
- sigma:
variation of loss function
- draw:
Number of smaples to draw
- tune:
Number of iterations to tune
- chain:
number of chains to sample