Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doctring and type hints for simulation module #660

Merged
merged 4 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading