simulate-pheno
Simulate a phenotype from real genotypes using additive, dominant, recessive, and interaction effects, following the liability-threshold model described in Concepts and methodology.
posthoc simulate-pheno
Usage
posthoc simulate-pheno [OPTIONS]
Options
- --pfile <pfile>
Required Prefix of PLINK2 .pgen/.pvar/.psam fileset.
- --additive <additive_terms>
Additive causal SNP: INDEX EFFECT_SIZE. Repeatable.
- --dominant <dominant_terms>
Dominant causal SNP: INDEX EFFECT_SIZE. Repeatable.
- --recessive <recessive_terms>
Recessive causal SNP: INDEX EFFECT_SIZE. Repeatable.
- --interaction2 <interaction2_terms>
Two-way interaction: INDEX_I INDEX_J EFFECT_SIZE. Repeatable.
- --interaction3 <interaction3_terms>
Three-way interaction: INDEX_I INDEX_J INDEX_K EFFECT_SIZE. Repeatable.
- --logistic
Binary phenotype (case/control).
- --linear
Continuous phenotype.
- --heritability <heritability>
Fraction of liability variance from genotype.
- --prevalence <prevalence>
Target case prevalence (logistic task only).
- --recode-centered
Recode genotypes from 0/1/2 to -1/0/1 before simulating (Yelmen et al.).
- --pheno-name <pheno_name>
Column name for the output phenotype.
- --seed <seed>
- --out <out_path>
Required Output phenotype file path.
Effect term encoding
--additive INDEX EFFECT— contributesgenotype * EFFECTto the liability, wheregenotypeis the0/1/2allele count (or-1/0/1if--recode-centeredis set).--dominant INDEX EFFECT— contributesEFFECTonly where the (centered) genotype equals-1; intended for use with--recode-centered.--recessive INDEX EFFECT— contributesEFFECTonly where the (centered) genotype equals1.--interaction2 INDEX_I INDEX_J EFFECT— contributesEFFECT * genotype_i * genotype_j.--interaction3 INDEX_I INDEX_J INDEX_K EFFECT— contributesEFFECT * genotype_i * genotype_j * genotype_k.
All five options are repeatable — pass --additive (or any other) more
than once to add multiple independent terms. INDEX values are
zero-based positions into the variant order of the --pfile, not
variant IDs. At least one causal term must be given across all five
options combined.
Exactly one of --logistic/--linear must be given. For
--logistic, the liability is thresholded at the --prevalence
quantile to produce a binary phenotype; for --linear, the liability
itself (with noise scaled to hit the target --heritability) is the
phenotype.
Outputs
See Output formats for the two files this command writes.