Marginal locus calculation {noia} | R Documentation |
Estimation of parameters for specific allele frequencies
Description
This function computes some parameters of interest (mean phenotype, genetic variance, additive variance, and evolutionary change in additive variance) for a combination of allele frequencies, based on a genotype-phenotype map.
Usage
marginallocus(gmap, freq=NULL, what="mean", definition=11, mc.cores=1, ...)
## S3 method for class 'noia.marloc'
plot(x, xlab=NULL, ylim=NULL, ylab=attr(x, "what"), ...)
## S3 method for class 'noia.marloc'
image(x, xlab=NULL, ylab=NULL, zlim=NULL,
main=attr(x, "what"), col.max="red", col.min="blue", col.zero="white",
n.cols=1000, zeropart=0.01, contour.levels=10, contour.options=list(), ...)
Arguments
gmap |
Either an object of class |
.
freq |
A vector indicating the loci that should be analysed. See Details. |
what |
A character string among "mean", "varA", "varG", or "dvarA.dt". |
definition |
The number of allele frequencies to try for each locus. |
mc.cores |
If more than 1, the calculation is run on |
x |
An object of class |
col.max , col.min , col.zero |
Colors standing for the maximal, minimal, and nil values, respectively. Setting |
n.cols |
Number of colors in the gradient. |
zeropart |
Width (relative to the full amplitude) of the region around zero which will be colored as |
contour.levels |
Number of contour lines. Setting this to 0 leads to no contour lines. |
contour.options |
List of additional options to the |
xlab , ylab , ylim , zlim , main |
|
... |
Additional parameters to internal functions. |
Details
marginallocus
computes a population parameter for a series of allele frequencies. The loci under investigation are provided through the freq
vector, which need to have as many elements as loci in the system. Values of the freq
vector indicate fixed allele frequencies, while NA
indicate loci under investigation. For instance, freq=c(NA, 1, NA, 0.5)
, will investigate the effect of varying loci 1 and 3, while keeping loci 2 and 4 at constant allele frequencies. The population is assumed to be at Hardy-Weinberg frequencies. If freq
is not provided, all loci will be investigated.
Value
marginallocus
returns an array with as many dimensions as loci under investigation. This array is an object of class "noia.marloc"
which can be graphically illustrated through the provided plot
(for 1-dimensional data) and image
(for 2-dimensional data). Arrays of higher dimensionality cannot be represented graphically.
Author(s)
Arnaud Le Rouzic
See Also
Examples
map <- c(0.25, -0.75, -0.75, -0.75, 2.25, 2.25, -0.75, 2.25, 2.25)
mrg2D <- marginallocus(map)
mrg1D <- marginallocus(map, freq=c(NA, 0)) # the second locus is fixed for allele 1
image(mrg2D)
plot(mrg1D)