Function to predict the variances (and trait-trait co-variances) expected in the offspring of a cross. Takes a list of crosses to predict, marker effects, parental haplotype matrix and recombination frequency matrix as input. Predicts potentially over multiple crosses and multiple traits. When multiple traits are supplied, trait-trait co-variances are also predicted.
predCrossVars(
CrossesToPredict,
modelType,
AddEffectList,
DomEffectList = NULL,
predType = "VPM",
haploMat,
recombFreqMat,
ncores = 1,
nBLASthreads = NULL,
...
)
data.frame or tibble, col/colnames: sireID, damID. sireID and damID must both be in the haploMat.
string, "A" or "AD", should additive only or additive and dominance variances be predicted?
list of ADDITIVE effect matrices, one matrix per trait, Each element of the list is named with a string identifying the trait and the colnames of each matrix are labelled with snpIDs.
list of DOMINANCE effect matrices, one matrix per trait, Each element of the list is named with a string identifying the trait and the colnames of each matrix are labelled with snpIDs.
string, default predType="VPM"
, "VPM" or "PMV". Choose option "VPM" if you have REML marker effect estimates (or posterior-means from MCMC) one set of marker effect estimates per trait. Variance of posterior means is faster but the alternative predType=="PMV" is expected to be less biassed. PMV requires user to supply a (probably LARGE) variance-covariance matrix of effects estimates.
matrix of phased haplotypes, 2 rows per sample, cols = loci, 0,1, rownames assumed to contain GIDs with a suffix, separated by "_" to distinguish haplotypes
a square symmetric matrix with values = (1-2*c1), where c1=matrix of expected recomb. frequencies. The choice to do 1-2c1 outside the function was made for computation efficiency; every operation on a big matrix takes time.
number of cores, parallelizes across CrossesToPredict
, in multi-trait cases, process traits for each family in serial within each worker.
number of cores for each worker to use for multi-thread BLAS
tibble, each row contains predictions for a single cross. Columns:
"Nsegsnps"
: give the number of segregating sites in the cross and thus those used for variance predictions
"ComputeTime"
: time in minutes
"predVars"
: list-column, each element is a tibble, containing all predicted variances and covariances in a long-format.
Other predCrossVar:
calcCrossLD()
,
calcGameticLD()
,
predCrossMeans()