Amat.pieces: Amat.pieces

Description Usage Arguments Value Author(s) References Examples

View source: R/Amat.pieces.R

Description

This calculates the genomic relationship matrix using the formula in VanRaden (2008)

Usage

1
Amat.pieces(M, pieces=10, mc.cores=1)

Arguments

M

The matrix of markers rows rorresponding to individuals and columns for markers, the markers scores are coded as -1,0,1 (corresponding to allele counts 0,1,2).

pieces

number of chunks to split the markers

mc.cores

number of cores to use

Value

a genomic relationship matrix.

Author(s)

Deniz Akdemir, Julio Isidro Sanch\'ez, Hanna Haikka, Itaraju Baracuhy Brum

References

VanRaden, Paul M. ”Efficient methods to compute genomic predictions.” Journal of dairy science 91.11 (2008): 4414-4423.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(GenomicMating)
N=50
nmarkers=500
Markers<-c()
for (i in 1:N){
  Markers<-rbind(Markers,sample(-1:1,nmarkers, replace=TRUE))
}

markereffects<-rep(0,nmarkers)
markereffects[sample(1:nmarkers,nmarkers/2)]<-rnorm(nmarkers/2)
Markers[1:5,1:5]

K=Amat.pieces(Markers, pieces=5) 
K[1:5,1:5]

GenomicMating documentation built on May 2, 2019, 6:52 a.m.