phylovelo.gillespie_variable_paras
Module Contents
Classes
Cell class |
|
Cell division/differentiation type |
|
Gillespie simulation |
- class Cell(Ngene: int = None, state: int = 0, gen: int = None, cid: int = None, parent: int = None, tb: float = None, td: float = None)
Cell class
- Args:
- Ngene:
Gene number
- state:
Cell type
- gen:
Cell generation
- cid:
Cell id
- parent:
Cell’s parent
- tb:
Birth time
- td:
Death time
- class Reaction(rate: callable = None, num_lefts: list = None, num_rights: list = None, index: int = None)
Cell division/differentiation type
- Args:
- rate:
reaction rate function
- num_lefts:
Cell numbers before reaction
- num_right:
Cell numbers after reaction
- index:
Reaction index
- combine(n, s)
- propensity(n, t)
- class Gillespie(num_elements: int, inits: list = None, max_cell_num: int = 20000)
Gillespie simulation
- Args:
- num_elements:
Cell type number
- inits:
Initial cell number
- max_cell_num:
Maximum cell number
- add_reaction(rate: callable = None, num_lefts: list = None, num_rights: list = None, index: int = None)
Add reactions to simulation
- Args:
- rate:
reaction rate function
- num_lefts:
Cell numbers before reaction
- num_right:
Cell numbers after reaction
- index:
Reaction index
- evolute(steps: int)
Run simulation
- Args:
- steps:
How many steps to evolute before step