Skip to content

Commit

Permalink
Merge pull request #660 from Sichao25/tool
Browse files Browse the repository at this point in the history
Add doctring and type hints for simulation module
  • Loading branch information
Xiaojieqiu authored Feb 26, 2024
2 parents 2951273 + f847738 commit f5756a3
Show file tree
Hide file tree
Showing 6 changed files with 858 additions and 206 deletions.
33 changes: 17 additions & 16 deletions dynamo/simulation/Gillespie.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,29 @@ def Gillespie(
method: str = "basic",
verbose: bool = False,
) -> AnnData:
"""A simulator of RNA dynamics that includes RNA bursting, transcription, metabolic labeling, splicing, transcription, RNA/protein degradation
"""A simulator of RNA dynamics that includes RNA bursting, transcription, metabolic labeling, splicing,
transcription, RNA/protein degradation.
Args:
a: rate of active promoter switches to inactive one
b: rate of inactive promoter switches to active one
la: lambda_: 4sU labelling rate
aa: transcription rate with active promoter
ai: transcription rate with inactive promoter
si: sigma, degradation rate
be: beta, splicing rate
ga: gamma, the fraction of labeled u turns to unlabeled s
a: rate of active promoter switches to inactive one.
b: rate of inactive promoter switches to active one.
la: lambda_: 4sU labelling rate.
aa: transcription rate with active promoter.
ai: transcription rate with inactive promoter.
si: sigma, degradation rate.
be: beta, splicing rate.
ga: gamma, the fraction of labeled u turns to unlabeled s.
C0: A numpy array with dimension of 5 x n_gene. Here 5 corresponds to the five species (s - promoter state, ul,
uu, sl, su) for each gene.
t_span: list of between and end time of simulation
n_traj: number of simulation trajectory to use
t_eval: the time points at which data is simulated
dt: delta t used in simulation
method: method to simulate the expression dynamics
verbose: whether to report running information
t_span: list of between and end time of simulation.
n_traj: number of simulation trajectory to use.
t_eval: the time points at which data is simulated.
dt: delta t used in simulation.
method: method to simulate the expression dynamics.
verbose: whether to report running information.
Returns:
adata: an Annodata object containing the simulated data.
An Annodata object containing the simulated data.
"""

gene_num, species_num = C0.shape[0:2]
Expand Down
Loading

0 comments on commit f5756a3

Please sign in to comment.