Simulated pre-adjusted phenotype means (BLUEs) for 120 individuals across
two environments, formatted as a named list for use with
run_haplotype_stability and cv_haplotype_prediction.
Each element is a named numeric vector (names = individual IDs, values = BLUEs)
representing adjusted means from one environment or growing season.
In a real analysis these would come from fitting environment-specific mixed
models. Here they are generated from the same polygenic trait values as
ldx_blues with environment-specific offsets and noise.
Format
A named list with 2 elements:
env1Named numeric vector of length 120. BLUEs for environment 1 (base yield values with small noise).
env2Named numeric vector of length 120. BLUEs for environment 2 (mean shift of 0.4 units above env1, simulating a more favourable environment).
Names of each vector match rownames(ldx_geno) (ind001
to ind120).
Examples
data(ldx_blues_list)
names(ldx_blues_list) # "env1" "env2"
#> [1] "env1" "env2"
length(ldx_blues_list$env1) # 120
#> [1] 120
head(ldx_blues_list$env1)
#> ind001 ind002 ind003 ind004 ind005 ind006
#> -0.3923 0.6664 -1.4078 -1.4531 1.3324 1.1296
# Mean BLUE difference between environments (expected ~0.4)
mean(ldx_blues_list$env2 - ldx_blues_list$env1)
#> [1] 0.3960925
# \donttest{
# Finlay-Wilkinson stability analysis across two environments
data(ldx_geno, ldx_snp_info, ldx_blocks)
stab <- run_haplotype_stability(
geno_matrix = ldx_geno,
snp_info = ldx_snp_info,
blocks = ldx_blocks,
blues_list = ldx_blues_list,
verbose = FALSE
)
# Stable blocks (regression slope b not significantly different from 1)
head(stab[stab$stable, c("block_id","b","b_se","r2_fw")])
#> [1] block_id b b_se r2_fw
#> <0 rows> (or 0-length row.names)
# }