admix.simulate.quant_pheno#

admix.simulate.quant_pheno(dset: Dataset, hsq: float, cor: float | None = None, n_causal: int | None = None, beta: ndarray | None = None, cov_cols: List[str] | None = None, cov_effects: List[float] | None = None, n_sim=10) dict[source]#

Simulate continuous phenotype of admixed individuals [continuous]

Parameters:
  • dset (admix.Dataset) –

    Dataset containing the following variables:
    • geno: (n_indiv, n_snp, 2) phased genotype of each individual

    • lanc: (n_indiv, n_snp, 2) local ancestry of each SNP

  • hsq (float) – Variance explained by the genotype effect

  • cor (float) – Correlation between the genetic effects from two ancestral backgrounds

  • n_causal (int, optional) – number of causal variables, by default None

  • beta (np.ndarray, optional) – causal effect of each causal variable, 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:

  • beta (np.ndarray) – simulated effect sizes (2 * n_snp, n_sim)

  • phe_g (np.ndarray) – simulated genetic component of phenotypes (n_indiv, n_sim)

  • phe (np.ndarray) – simulated phenotype (n_indiv, n_sim)