NOIA matrix manipulation {noia}R Documentation

Matrix algebra in the NOIA framework.

Description

These functions perform the matrix computation required for the computation of geneticEffects and Genotype-to-Phenotype mapping.

Usage

gen2Z(gen)
gen2genZ(gen)
genZ2freq(genZ)
genZ2S(type="F2", genZ=NULL, nloc=NULL)
genZ2Z(genZ)
Z2freq(Z)
Sloc(type="F2", i=NULL, genZ=NULL)

Arguments

gen The matrix of genotypes, one column per locus, the genotype is coded 1, 2, 3. Missing data are allowed.
genZ The matrix of genotypic probabilities, 3 columns per locus (one for the probability of each genotype). The sum of probabilities must be 1, and missing data are not allowed.
type The type of the population. "F2", "F1", "Finf". "P1", "P2, "G2A", "UWR" and "noia" are possible. Default is "F2".
nloc Number of loci.
Z A matrix reflecting the genotype of the corresponding observed phenotypes, as defined in Alvarez-Castro and Carlborg 2007.
i Index of the locus.

Details

gen2Z
Transforms a gen data set into a Z matrix that is the data matrix in the regression. The function actually calls sequencially gen2genZ and genZ2Z.
gen2genZ
Transforms a gen matrix into a genZ matrix.
genZ2freq
Provides a vector representing the frequency of each genotypic form at each locus. The sum of the frequency is 1 for each locus.
genZ2S
Provides the S matrix (see Alvarez-Castro and Carlborg 2007) for a given reference point. Some reference points are genotypic frequency-dependent ("G2A" and "noia"), and the genZ matrix must be provided. For the others, only the number of loci is necessary.
genZ2Z
Conmputes the Z matrix from the genotypic probabilities. See Alvarez-Castro and Carlborg 2007 for more details.
Z2freq
Computes the multi-locus genotypic frequency over all genotypic combinations.
Sloc
Provides a 3x3 S matrix, corresponding to one locus. Frequency-dependent reference points will require the genZ matrix and the index of the locus.

Author(s)

Arnaud Le Rouzic <a.p.s.lerouzic@bio.uio.no>

References

Alvarez-Castro JM, Carlborg O. (2007). A unified model for functional and statistical epistasis and its application in quantitative trait loci analysis. Genetics 176(2):1151-1167.

Le Rouzic A, Alvarez-Castro JM. (2008). Estimation of genetic effects and genotype-phenotype maps. Evolutionary Bioinformatics, in press.

See Also

linearRegression, multilinearRegression

Examples

set.seed(123456789)

map <- c(0.25, -0.75, -0.75, -0.75, 2.25, 2.25, -0.75, 2.25, 2.25)
names(map) <- genNames(2)
pop <- simulatePop(map, N=500, sigmaE=0.2, type="F2")

gen <- pop[2:3]
genZ <- gen2genZ(gen)
Z <- genZ2Z(genZ)

[Package noia version 0.91 Index]