admix.simulate.quant_pheno_grm#
- admix.simulate.quant_pheno_grm(dset: Dataset, grm: str | List[str] | dict, var: Dict[str, float], cov_cols: List[str] | None = None, cov_effects: List[float] | None = None, n_sim=10)[source]#
Simulate continuous phenotype of admixed individuals [continuous] using GRM
- Parameters:
grm (str, list of str or dict) – column name(s) of GRM, or a dict of {name: grm} Don’t include the identity matrix, the indentify matrix representing environemntal factor will be added to the list automatically
var (dict of {str: float}) – dictionary of variance explained by the GRM effect, use ‘e’ to set the variance of environmental effectse.g. {‘K1’: 0.5, ‘K2’: 0.5, ‘e’: 1.0}
gamma (float, optional) – Correlation between the genetic effects from two ancestral backgrounds, by default None
cov_cols (List[str], optional) – list of covariates to include as covariates, by default None
cov_effects (List[float], optional) – list of the effect of each covariate, by default None for each simulation, the cov_effects will be the same
n_sim (int, optional) – number of simulations, by default 10
- Returns:
A dictionary containing the following variables –
pheno: (n_indiv, n_sim) simulated phenotype
cov_effects: (n_cov,) simulated covariate effects