mmGEBLUP
A systematic simulation program and a novel genomic prediction strategy based on integrated evaluation of major and minor gene and gene-by-environment effects
In our package, we offer Three key functions in the field of quantatative genetics including Genotype-by-Environment (GE) interaction.
- Functions
- * Trait simulation
- * GWAS analysis
- * Genomic prediction (a novel model named mmGEBLUP)
The current GitHub version of mmGEBLUP can be installed via:
library(devtools)
install_github("qixininin/mmGEBLUP")
Example: Trait simulation
This example simulate 1000 (indNum) individual genotypes with 2000 (snpNum) independent markers and their phenotypes with specified genetic architecture and extended GE interaction structure in 3 (envNum) environments.
The trait simulation can be specified through several parameters:
-
: General heritability -
: Interaction heritability -
: General polygenicity (or the proportion of genetic variance explained by the large-effect term) -
: Interaction polygenicity (or the proportion of interaction variance explained by the large-interaction-effect term)
# Load packages
library(mmGEBLUP)
# Set parameters
envNum = 3
indNum = 1000
snpNum = 2000
rho_a = 0.5
rho_ae = 0.5
h2_a = 0.3
h2_ae = 0.3
sigma_a = h2_a
sigma_ae = h2_ae
sigma_error = 1-h2_a-h2_ae
# Define large additive effect markers
major_a_idx = c(500, 750, 1000, 1250, 1500)
snpNum_a_major = length(major_a_idx)
snpNum_a_minor = snpNum-snpNum_a_major
# Define large interaction effect markers
major_ae_idx = c(250, 500, 1000, 1500, 1750)
snpNum_ae_major = length(major_ae_idx)
snpNum_ae_minor = snpNum-snpNum_ae_major
# Transform to marker effect variance
sigma_a_major = rho_a * sigma_a/ snpNum_a_major
sigma_a_minor = (1-rho_a) * sigma_a / snpNum_a_minor
sigma_ae_major = rho_ae * sigma_ae/ snpNum_ae_major
sigma_ae_minor = (1-rho_ae) * sigma_ae / snpNum_ae_minor
# Effect generation
eff_list = snp.effect(snpNum = snpNum, envNum = envNum,
major_a_idx = major_a_idx, major_ae_idx = major_ae_idx,
variance_a_major = sigma_a_major , variance_a_minor = sigma_a_minor,
variance_ae_major = sigma_ae_major, variance_ae_minor = sigma_ae_minor)
b = eff_list$effects
# Plot marker effects
p = snp.effect.plot(effects = b)
# Genotype generation
geno_data = geno.generate(indNum = indNum, snpNum = snpNum, maf.min = 0.05, maf.max = 0.5,
chr.snpNum = c(500, 500, 500, 500))
# Phenotype generation
pheno_data = pheno.generate(genotypes = t(geno_data[-c(1:3)]), effects = b,
envNum = envNum, indNum = indNum, sigma.error = sigma_error)
save(geno_data, pheno_data, file = "./inst/Simulation-genphe.Rdata")