This function simulates trait data from a genotype matrix.
simulate_traits(
genotype_matrix,
n_causal = 1000,
n_trait_specific = 10,
n_pleiotropic = 10,
H2 = 0.6,
d = 2,
rho = 0.8,
marginal_correlation = 0.3,
epistatic_correlation = 0.3,
group_ratio_trait = 1,
group_ratio_pleiotropic = 1,
maf_threshold = 0.01,
seed = 67132,
logLevel = "INFO",
logFile = NULL
)
Genotype matrix with samples as rows, and SNPs as columns.
Number of SNPs that are causal.
Number of causal SNPs with single trait epistatic effects.
Number of SNPs with epistatic effects on all traits.
Broad-sense heritability. Can be vector.
Number of traits.
Proportion of heritability explained by additivity.
Correlation between the additive effects of the trait.
Correlation between the epistatic effects of the trait.
Ratio of sizes of trait specific groups that interact, e.g. a ratio 1:3 would be value 3.
Ratio of sizes of pleiotropic groups that interact, e.g. a ratio 1:3 would be value 3.
is a float parameter defining the threshold for the minor allele frequency not included in causal SNPs.
Random seed for simulation.
is a string parameter defining the log level for the logging package.
is a string parameter defining the name of the log file for the logging output.
A list object containing the trait data, the genotype data, as well as the causal SNPs and summary statistics.
This function takes a genotype matrix and simulates trait data under the following model: beta_i ~ MN(0, V_i, I), i in { additive, epistatic, residual}
The effect sizes follow a matrix normal distribution with no correlation between the samples but covariance between the effects for different traits