SpaTemHTP_proc: HTP data processing

Description Usage Arguments Details Value Author(s) References Examples

View source: R/SpaTemHTP_proc.R

Description

Calculate sequentially the genotype adjusted means (genotype best unbiased linear estimates, G-BLUEs).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
SpaTemHTP_proc(
  exp_des_data,
  pheno_data,
  out_det = TRUE,
  miss_imp = TRUE,
  sp_adj = TRUE,
  single_mixed_model = FALSE,
  out_p_val = 0.05,
  print_day = TRUE,
  fixed = NULL,
  random = ~row_f + col_f,
  spatial,
  h2_comp = TRUE,
  h2_comp_alt = TRUE,
  plot = TRUE,
  plot_out = TRUE,
  plot_miss = TRUE,
  plot_SpATS = TRUE,
  res_folder = NULL
)

Arguments

exp_des_data

data.frame of dimension (N_genotype * N_replicate) x N_variable containing the experimental design information. It must include: a) a 'genotype' column representing the line phenotyped; b) numeric 'row' and 'col' column representing the row and column informaiton, c) the same row and column information into factor columns named 'row_f' and 'col_f'. Other variables like replicate or block can be introduced to be used in the spatially adjusted mixed model computation. The user must set those extra variable in the correct format (generally factor).

pheno_data

data.frame of dimension (N_genotype * N_replicate) x N_days containing the measured phenotypic values.

out_det

Logical value specifying if outlier detection should be performed on the phenotypic data. Default = TRUE.

miss_imp

Logical value specifying if missing value imputation should be performed on the phenotypic data. Default = TRUE.

sp_adj

Logical value specifying if a mixed model with spatial adjustment (SpATS model) should be used to calculate the genotype BLUEs. Default = TRUE.

single_mixed_model

Logical value indicating if a 'single-step' mixed model should be calculated. See Details for more explanations. Default = FALSE.

out_p_val

Numeric value indicating the signficance threshold for outliers detection. Default = 0.05.

print_day

Logical value indicating if the day progression should be printed. Default = TRUE.

fixed

Optional right hand formula object specifying the fixed effects of the SpATS model. Default = NULL.

random

Optional right hand formula object specifying the random effects of the SpATS model. Default = ~ row_f + col_f.

spatial

Character string specifying the methode used to calculate the spatial surface. must be one of: 'SAP', 'PSANOVA', 'SAP_if_PSANOVA_fail', 'PSANOVA_if_SAP_fail'.

h2_comp

Logical value indicating if the should calculate the daily genotypic heritability. Default = TRUE.

h2_comp_alt

Logical value indicating if the should calculate the daily genotypic heritability. Default = TRUE.

plot

Logical value specifying if a time series plot of the G-BLUEs should be produced. Default = TRUE.

plot_out

Logical value specifying if the boxplots of the outlier detection should be saved at the specified location (res_folder). Default = TRUE.

plot_miss

Logical value specifying if the plot of the missing values imputation should be saved at the specified location (res_folder). Default = TRUE.

plot_SpATS

Logical value specifying if the plot of the spatial adjustment should be saved at the specified location (res_folder). Default = TRUE.

res_folder

Character string specifying the path where the plot results will be saved. Default = NULL.

Details

The function iterates over the different time points (e.g days) of the experiment and calculate the G-BLUEs according to the following model: pheno = Int + row(random) + col(random) + genotype(fixed) + f(row, col) + e, where f(row, col) represent the spatial surface modeled using a 2-D P-spline approach as proposed by Rodgriguez-Alvarez et al. (2018).

The user can run a different model using the fixed and random arguments that specifies the fixed and random part of the mixed model used to calculate the genotypes BLUEs. The spatially adjusted model are fitted using function from the SpATS package (Rodgriguez-Alvarez et al., 2018).

The methode used to calculate the spatial surface can be specified in argument 'spatial'. The user can choose between 'SAP' and 'PSANOVA'. The user can also try the alternative method if one is failing by selecting 'SAP_if_PSANOVA_fail' or 'PSANOVA_if_SAP_fail'.

If single_mixed_model = TRUE, the function calculates a single-step mixed model where outliers are iteratively removed based on the model residuals and the missing values imputed during the estimation procedure. The outliers are detected using a Grubb Test (p<0.05, default).

If h2_comp = TRUE, the function calculate the heritability from the computed SpATS model. If h2_comp_alt = TRUE, if the heritability computation fail with the SpATS model, the function calculates the heritability using a classicle linear mixed model (pheno = rep (F) + row (R) + col (R) + genotype (R) + e). The formula used in the following h2 = Sgeno / (Sgeno + (Se/n_rep)).

Value

Return:

If sp_adj = FALSE, the code to calculate the genotype BLUEs using a mixed model without spatial adjustment is not available, so we return the matrix of data after eventual processing operation (outlier detection, missing value imputation). Those data can be used with another software (e.g. Genstat) to calculate the genotype BLUEs without spatial adjustment.

If sp_adj = TRUE, list containing the following objects

G_BLUES

Matrix of the genotype BLUEs with the genotype in row and the day (or measurement time) in column.

G_BLUES_stdev

Matrix of the genotype BLUEs standard deviation with the genotype in row and the day (or measurement time) in column.

h2

Vector with the daily genotypic heritability.

Author(s)

Soumyashree Kar, Vincent Garin

References

Maria Xose Rodriguez-Alvarez, Martin P. Boer, Fred A. van Eeuwijk, Paul H.C. Eilers (2018). Correcting for spatial heterogeneity in plant breeding experiments with P-splines. Spatial Statistics 23 52 - 71 URL https://doi.org/10.1016/j.spasta.2017.10.003

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(SG_PH_data)

SG_PH_data$col_f <- factor(SG_PH_data$col)
SG_PH_data$row_f <- factor(SG_PH_data$row)

SG_PH_data$rep <- factor(SG_PH_data$rep)
SG_PH_data$block <- factor(SG_PH_data$block)

exp_des_data = SG_PH_data[, c("row", "col", "row_f", "col_f","genotype",
"rep", "block")]

## Not run: 

G_BLUEs <- SpaTemHTP_proc(exp_des_data, pheno_data = SG_PH_data[, 6:28],
                          out_det = TRUE, miss_imp = TRUE, sp_adj = TRUE,
                          random = ~ rep +  rep:block + row_f + col_f,
                          spatial = 'PSANOVA',
                          plot = TRUE, plot_out = FALSE, plot_miss = FALSE,
                          plot_SpATS = FALSE)


## End(Not run)

ICRISAT-GEMS/SpaTemHTP documentation built on March 9, 2021, 12:12 a.m.