Generate eQTL Data with Multiple Genetic Architecture Components
Source:R/simulate_eQTL.R
generate_eqtl_data.RdUsage
generate_eqtl_data(
G,
h2g = 0.3,
prop_h2_sparse = 0.5,
prop_h2_oligogenic = 0.15,
prop_h2_infinitesimal = 0.35,
n_sparse = 2,
n_oligogenic = 10,
mixture_props = c(0.75, 0.25),
sparse_sd = 0.5,
oligo_sds = c(0.05, 0.15),
inf_sd = 0.01,
standardize = TRUE,
independent = TRUE,
verbose = FALSE,
seed = NULL
)Arguments
- G
Genotype matrix.
- h2g
Total SNP heritability (proportion of variance explained by genotyped SNPs).
- prop_h2_sparse
Proportion of h2g explained by sparse effects.
- prop_h2_oligogenic
Proportion of h2g explained by oligogenic effects.
- prop_h2_infinitesimal
Proportion of h2g explained by infinitesimal effects.
- n_sparse
Number of sparse SNPs.
- n_oligogenic
Number of oligogenic SNPs to simulate.
- mixture_props
Mixture proportions for oligogenic effects (must sum to 1). Default c(0.75, 0.25) means 75
sparse_sdStandard deviation for drawing sparse effects (default 0.5).
oligo_sdsStandard deviations for oligogenic mixture components (default c(0.05, 0.15)).
inf_sdStandard deviation for drawing infinitesimal effects (default 0.01).
standardizeLogical; if TRUE, the genotype matrix will be standardized.
independentLogical; if TRUE, ensures all sparse and oligogenic SNPs have |r| < 0.15 with each other (default FALSE).
verboseLogical; if TRUE, prints progress messages including LD constraint attempts (default FALSE).
seedOptional seed for reproducibility.
A list containing the standardized genotype matrix, simulated phenotype, combined beta values, indices for each effect component, realized heritability estimates, effect size ranges, hierarchy validation results, and causal indices. This function generates simulated gene expression data with a partitioned genetic architecture that enforces strict effect size hierarchies: |sparse| > |oligogenic| >> |infinitesimal|