Because the audience asked for it so much. This is a simple step-by-step R script for GS for breeding purposes. I am using sommer but this can be changed by any other package and will be very simple.
- Read sommer package.
- Pheno --> phenotype data
- Geno --> genotype data
- Calculate h2 with the markers
- Spatial trends (A1 x A1)
- Calculate h2 adding spatial trends
- Extract BLUPs
- Adjust by different environments and extracts BLUPs
- Mixed model with GRM
- Calculate correlation
Side exercise for each trial: Cross Validation