posthoc.simulation
- class posthoc.simulation.base.PhenotypeModel(additive_indices=<factory>, additive_effects=<factory>, dominant_indices=<factory>, dominant_effects=<factory>, recessive_indices=<factory>, recessive_effects=<factory>, interaction_pairs=<factory>, interaction_effects=<factory>, interaction_triples=<factory>, interaction_triple_effects=<factory>, heritability=0.5, task='linear', prevalence=0.1, seed=None)[source]
Bases:
objectAdditive + dominant + recessive + interaction liability model, following Yelmen et al. (2026).
- Parameters:
- class posthoc.simulation.base.SimulationResult(genotype_data, phenotype, causal_indices, liability=None, metadata=<factory>)[source]
Bases:
objectReal genotypes + simulated phenotype, with ground truth for scoring.
- Parameters:
genotype_data (GenotypeData)
phenotype (ndarray)
causal_indices (ndarray)
liability (ndarray | None)
metadata (dict)
- genotype_data: GenotypeData
- posthoc.simulation.base.simulate_phenotype(genotypes, model, covariates=None, covariate_effects=None)[source]
- posthoc.simulation.base.simulate(genotype_data, phenotype_model, covariates=None, covariate_effects=None)[source]
Simulate a phenotype on top of real genotype data (e.g. from read_pgen).
- Parameters:
genotype_data (GenotypeData)
phenotype_model (PhenotypeModel)
covariates (ndarray | None)
covariate_effects (ndarray | None)
- Return type: