Function to make a genomic relationship matrix to be used to analyze the phenotypic records. So far only works with parentSelCritGEBV and popImprovementByParentSel.

make_grm(records, indivs2keep, bsp, SP, grmType = "add")

Arguments

records

The breeding program records object. See fillPipeline for details

indivs2keep

chr. vector of id's to be included in the grm. Must be present in c(records$F1,bsp$checks).

bsp

The breeding scheme parameter list

SP

The AlphaSimR SimParam object. Needed to pull the SNP genotypes

Value

A genomic relationship matrix

Details

Setting up to distinguish between parent and cross selection and additive and non-additive predictions. Uses genomicMateSelectR functions, which will need to be installed for these to work.

This version uses the genomicMateSelectR::kinship.

Includes a new grmType param, can produce additive and dominance matrices. Same matrix as A.mat by default grmType="add".

records maintains the phenotypic and genotypic records across years and stages. For GEBV analysis, you need the GRM of these individuals. makeGRM assumes the first phenotyping stage (records[[2]]) has all individuals that have been phenotyped. The GRM also includes the unphenotyped new F1 individuals in records[[1]]