Trajectories

Determistic Trajectory with Euler's method

Simulates the deterministic trajectory of the cells using Euler's method: $$ \operatorname{state}(t + \Delta t) = \operatorname{state}(t) + {d \operatorname{state} \over dt} \Delta t. $$

Parameters:

Name Type Description Default
cells CellPopulation

CellPopulation.

required
time_range 1D torch.Tensor

Time points at which the cells state should be evaluated.

required

Returns:

Type Description
torch.Tensor

torch.Tensor: Trajectory of shape (n_time_points, n_cells, n_genes, *state_dim)

Determistic Trajectory with solver

Simulates the deterministic trajectory of the cells using the torchdiffeq solver.

Parameters:

Name Type Description Default
cells CellPopulation

CellPopulation.

required
time_range 1D torch.Tensor

Time points at which the cells state should be evaluated.

required
method str

argument for the solver.

'dopri5'

Returns:

Type Description
torch.Tensor

torch.Tensor: Trajectory of shape (n_time_points, n_cells, n_genes, *state_dim)

Stochastic Trajectory

Simulates stochastic trajectories of the cell using the tau-leaping method, which is a variation of the Gillespie algorithm: $$ \operatorname{state}(t + \Delta t) = \operatorname{state}(t) + \operatorname{Pois}[\Delta t \cdot (\operatorname{production rates})] - \operatorname{Pois}[\Delta t \cdot (\operatorname{decay rates})]. $$

Parameters:

Name Type Description Default
cells CellPopulation

CellPopulation.

required
time_range 1D torch.Tensor

Time points at which the cells state should be evaluated.

required

Returns:

Type Description

torch.Tensor: Trajectory of shape (n_time_points, n_cells, n_genes, *state_dim)