Description Usage Arguments Details Value Author(s) References Examples
Function for creating a gpmap
object representing a genotype-phenotype (GP) map
for N biallelic loci or more generally K such maps, from a matrix of genotypic values.
1 | generate_gpmap(y, locinames = NULL, allelenames = NULL, mapnames = NULL)
|
y |
A (3^NxK) matrix or numeric with each column specifying the 3^N genotypic values for K GP maps |
locinames |
An optional character vector with N names of loci |
allelenames |
An optional character object specifying allele names |
mapnames |
An optional character vector with K names of GP maps / phenotypes |
Arguments locinames
and allelenames
are passed on to enumerate_genotypes
, and the genotypic values in y
should be given
in the same sequence as the sequence of genotypes returned by enumerate_genotypes
. If mapnames
is not specified then the GP maps
will be named "GPmap_1", "GPmap_2",..,"GPmap_K".
The function returns an object of class gpmap
containing the following components
values |
The vector or matrix of genotypic values |
nloci |
The number of loci in the map |
genotypes |
Data frame with enumeration of genotypes |
locinames |
Character vector with names for all loci |
mapname |
The name(s) of the GP map |
Arne B. Gjuvsland <arne.gjuvsland@nmbu.no> and Yunpeng Wang <yunpeng.wng@gmail.com>
Gjuvsland AB, Vik JO, Woolliams JA, Omholt SW (2011) Order-preserving principles underlying genotype-phenotype maps ensure high additive proportions of genetic variance. Journal of Evolutionary Biology 24(10):2269-2279 [link]
1 2 3 4 5 6 7 8 9 | #inter- and intra-locus additive GPmap with two loci
generate_gpmap(c(-2,1,0,-1,0,1,0,1,2),mapnames="Additive")
#two-locus GP map with AxA epistasis for loci named A and B
generate_gpmap(c(-1,0,1,0,0,0,1,0,-1),locinames=c("A","B"),mapnames="AxA")
#random GP map with 3 loci
set.seed(0)
generate_gpmap(rnorm(27))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.