phylovelo.gene_expr
Module Contents
Classes
Gene class |
|
Gene expression program |
- class Gene(mu0: float, drift: float, sigma: float = None, t0: int = 0)
Gene class
- Args:
- mu0:
Initial expression
- drift:
Drift coefficient of DP
- sigma:
Diffusion coefficient of DP
- t0:
Gene initial time
- diffusion()
Diffusion one step.
- base_expr_calc(t: int)
Calculate base expression
- Args
- t:
time
- Return:
Base expression at time t
- class GeneExpr(Ngene: int, r_variant_gene: float, diff_map: dict, state_time: dict, forward_map: dict = None)
Gene expression program
- Args:
- Ngene:
Gene number
- r_variant_gene:
Ratio of gene changes with differentiation
- diff_map:
Differentiation relationships between different cell types {a:[b,c]} means ‘a’ is differentiated from ‘b’ and ‘c’
- state_time:
Pseudo time of each states
- forward_map:
Only use in convergent model simulation {a:b} means ‘a’ will differentiated to ‘b’
- generate_genes(mu0_loc: float = 20, mu0_scale: float = 3, drift_loc: float = 0, drift_scale: float = 1)
Generate genes
- Args:
- mu0_loc:
Mean of initial expression
- mu0_scale:
Variation of initial expression
- drift_loc:
Mean of gene drift
- drift_scale:
Variation of drift
- expr(state, time)