Various functions used in quantitative genetics
This package was partially developed at the Department of Animal Breeding and Genetics and CiBreed, University of Goettingen.
Very fast calculation of genomic relationship matrix for 0-1-coded haplotypes and 0-1-2-coded genotypes; Matrix should be in the RAM
relationshipMatrix
fast calculation of \((M-P) (M-P)^T /
\sigma^2 \)
crossprodx
fast implementation of
crossprod
for SNP matrices
further commands
haplomatrix
compresses haplotype data
as.matrix
uncompresses genomicmatrix
or haplomatrix
genomicmatrix
transformation
to a compressed genotype from a usual matrix or a
compressed haplotype
genomicmatrix
,fillGeno
creating a compressed matrix and filling it with uncompressed
data. These two functions make sense if the SNP matrix is too
large to be kept in the RAM.
solveRelMat
calculates the inverse of a relatioship matrix and also
solves equations
allele_freq
calculates the allele frequencies of a SNP matrix that might have
been compressed by genomicmatrix
, for instance.
genoVector
, vectorGeno
multiplication
of vector onto a compressed SNP matrix from the right and left,
respectively.
vectorGeno
etc. fast calculation of 012 matrix
with an arbitrary vector
matrixvector012
etc. fast calculation of an
arbitrary matrix with a 012 vector
Functions related to the package MoBPs by Torsten Pook.
codeOrigins
,decodeOrigins
compressed data representation of breeding relevant information of
an individuum
computeSNPS
calculates the genome of an individuum from the coding in the
population tree
compute
concatenation of computeSNPS
, relationshipMatrix
,
and solveRelMat
# NOT RUN {
indiv <- 5
snps <- indiv * 10
M <- matrix(ncol=indiv, sample(0:2, indiv * snps, replace=TRUE))
print(M)
print(relationshipMatrix(M))
# }
Run the code above in your browser using DataLab