Title: | Analysing and Plotting Genotype-Phenotype Maps |
---|---|
Description: | Tools for studying genotype-phenotype maps for bi-allelic loci underlying quantitative phenotypes. The 0.1 version is released in connection with the publication of Gjuvsland et al (2013) and implements basic line plots and the monotonicity measures for GP maps presented in the paper. Reference: Gjuvsland AB, Wang Y, Plahte E and Omholt SW (2013) Monotonicity is a key feature of genotype-phenotype maps. Frontier in Genetics 4:216 <doi:10.3389/fgene.2013.00216>. |
Authors: | Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]> |
Maintainer: | Arne B. Gjuvsland <[email protected]> |
License: | GPL-3 |
Version: | 0.1.2 |
Built: | 2025-02-27 03:00:19 UTC |
Source: | https://github.com/cran/gpmap |
The gpmap package deals with genotype-phenotype maps for biallelic loci underlying
quantitative phenotypes. The package provides a class gpmaps
, analysis functions and basic
lineplots. The package is designed for studying the properties of GP maps without
reference to any particular population, i.e. the physiological (Cheverud & Routman, 1995)
or functional (Hansen, 2001) properties of the GP map. This is opposed to statistical effects underlying
most of quantitative genetics, where the GP-map is analysed togehter with genotype frequencies in a given
population (e.g. Lynch & Walsh, 1998).
In version 0.1 which is released as part of the publication of Gjuvsland et al. (2013) we have implemented functionality for studying monotonicity Gjuvsland et al. (2011) of GP maps. The package utilizes the isotone package for monotone regression, and the foreach package for parallel computation.
The package consists of the following high-level functions :
enumerate_genotypes
, generate_gpmap
,
degree_of_monotonicity
, decompose_monotone
and
plot.gpmap
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
Cheverud JM & Routman EJ (1995) Epistasis and Its Controbution to Genetic Variance Components. Genetics 139:1455-1461 [link]
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]
Gjuvsland AB, Wang Y, Plahte E and Omholt SW (2013) Monotonicity is a key feature of genotype-phenotype maps. Front. Genet. 4:216. doi: 10.3389/fgene.2013.00216 [link]
Hansen T & Wagner GP (2001) Modeling genetic Architecture: A Multilinear Theory of gene Interaction. Theoretical Population Biology 59:61-86 [link]
Leeuw J, Hornik K and Mair P (2009) Isotone Optimization in R: Pool-Adjacent-Violators Algorithm (PAVA) and Active Set Methods. Journal of Statistical Software 32(5) [link]
Lynch M & Walsh B (1998) Genetics and Analysis of Quantitative Traits, Sunderland, MA: Sinauer Associates
Functions for decomposing genotype-phenotype (GP) maps with biallelic loci using monotone regression from the
isotone
package.
decompose_monotone(gpmap) decompose_monotone_single(gpmap)
decompose_monotone(gpmap) decompose_monotone_single(gpmap)
gpmap |
A |
decompose_monotone
works for any gpmap
object (values
is matrix of genotypic values)
and calls the internal function
decompose_monotone_single
for each column. decompose_monotone_single
takes a
gpmap
object with a single set of genotypic values (), loops through all
possible
combinations of plusalleles, calls
monotone_regression
and identifies the best fit. The code uses the
foreach
package and will run in parallel if a parallel backend is registered (see
foreach
documentation).
The input gpmap
is returned with two added elements
monoR2 |
The coefficient of determination of the monotone regression |
values.mono |
A matrix of genotypic values for the monotone component of genotype-phenotype map(s) |
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
Leeuw J, Hornik K and Mair P (2009) Isotone Optimization in R: Pool-Adjacent-Violators Algorithm (PAVA) and Active Set Methods. Journal of Statistical Software 32(5) [link]
Gjuvsland AB, Wang Y, Plahte E and Omholt SW (2013) Monotonicity is a key feature of genotype-phenotype maps. Front. Genet. 4:216. doi: 10.3389/fgene.2013.00216 [link]
data(GPmaps) #Additive GP map is monotone so monoR2=1 and values.mono=values decompose_monotone(A) #Pure AxA epistasis map decompose_monotone(AA) #two-locus example in Cheverud & Routman (1995) decompose_monotone(mouseweight) #decompose four random 3-locus GP maps set.seed(0) randomGP <- rnorm(3^2*4) dim(randomGP) <- c(9,4) decompose_monotone(generate_gpmap(randomGP))
data(GPmaps) #Additive GP map is monotone so monoR2=1 and values.mono=values decompose_monotone(A) #Pure AxA epistasis map decompose_monotone(AA) #two-locus example in Cheverud & Routman (1995) decompose_monotone(mouseweight) #decompose four random 3-locus GP maps set.seed(0) randomGP <- rnorm(3^2*4) dim(randomGP) <- c(9,4) decompose_monotone(generate_gpmap(randomGP))
Functions for computing degree of monotonicity for
gpmap
objects.
degree_of_monotonicity(gpmap) degree_of_monotonicity_single(gpmap)
degree_of_monotonicity(gpmap) degree_of_monotonicity_single(gpmap)
gpmap |
A |
degree_of_monotonicity
works for any gpmap
object (values
is matrix of genotypic values)
and calls the internal function
degree_of_monotonicity_single
for each column. degree_of_monotonicity_single
computes
substitution effect, locus weights and per-locus and overall degree of monotonicity as decribed in Gjuvsland et al. (2013).
degree_of_monotonicity
returns the input gpmap
with the following added fields:
degree.monotonicity |
Overall degree of monotonicity for the |
degree.monotonicity.locus |
Data frame with per locus degree of monotonicity for the |
locus.weight |
Data frame with locus weigths |
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
Gjuvsland AB, Wang Y, Plahte E and Omholt SW (2013) Monotonicity is a key feature of genotype-phenotype maps. Front. Genet. 4:216. doi: 10.3389/fgene.2013.00216 [link]
data(GPmaps) #Additive GP map is monotone degree_of_monotonicity(A) #Pure AxA epistasis map degree_of_monotonicity(AA) #two-locus example in Cheverud & Routman (1995) degree_of_monotonicity(mouseweight)
data(GPmaps) #Additive GP map is monotone degree_of_monotonicity(A) #Pure AxA epistasis map degree_of_monotonicity(AA) #two-locus example in Cheverud & Routman (1995) degree_of_monotonicity(mouseweight)
biallelic loci Function for enumerating all genotypes for
biallelic loci. Optional specification of names of loci and alleles.
genotypes. Generates a data frame of multilocus genotypes in the sequence used for objects of class
gpmap
.
enumerate_genotypes(nloci=1, locinames=NULL, allelenames=NULL)
enumerate_genotypes(nloci=1, locinames=NULL, allelenames=NULL)
nloci |
The number of loci |
locinames |
An optional character vector with |
allelenames |
An optional character object specifying allele names |
Unless specified locinames default to "Locus 1", "Locus 2",..,"Locus N".
If allelenames
is not specified then the alleles will be named "1" and "2".
Returns a data frame with locinames as colnames, and with rows specifying all possible genotypes in the sequence
used for all GP maps in the package (the same sequence as used in Gjuvsland et al.( 2011)), where the genotype at the first locus varies fastest,
then the second locus, and so on:
Locus_1 Locus_2 1 11 11 2 12 11 3 22 11 4 11 12 5 12 12 6 22 12 7 11 22 8 12 22 9 22 22
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
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]
#genotypes for a single locus enumerate_genotypes() #genotypes for two loci "A" and "B", with alleles named "H" and "L" enumerate_genotypes(2,c("A","B"),c("H","L")) #genotypes for the two-locus example in Cheverud & Routman (1995) enumerate_genotypes(2,c("D7Mit17","D1Mit7"),rbind(c('A1','A2'),c('B1','B2')))
#genotypes for a single locus enumerate_genotypes() #genotypes for two loci "A" and "B", with alleles named "H" and "L" enumerate_genotypes(2,c("A","B"),c("H","L")) #genotypes for the two-locus example in Cheverud & Routman (1995) enumerate_genotypes(2,c("D7Mit17","D1Mit7"),rbind(c('A1','A2'),c('B1','B2')))
Function for creating a gpmap
object representing a genotype-phenotype (GP) map
for biallelic loci or more generally
such maps, from a matrix of genotypic values.
generate_gpmap(y, locinames = NULL, allelenames = NULL, mapnames = NULL)
generate_gpmap(y, locinames = NULL, allelenames = NULL, mapnames = NULL)
y |
A |
locinames |
An optional character vector with |
allelenames |
An optional character object specifying allele names |
mapnames |
An optional character vector with |
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 <[email protected]> and Yunpeng Wang <[email protected]>
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]
#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))
#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))
Example GP maps with two loci including: The orthogonal GP maps A
, D
, AA
, AD
, DA
and DD
used in
decomposition of genetic variance (Zeng et al. 2005). The GP map mouseweight
for body weight studied by Cheverud et al. (1995).
data(GPmaps)
data(GPmaps)
Objects of class gpmap
Cheverud JM & Routman EJ (1995) Epistasis and Its Controbution to Genetic Variance Components. Genetics 139:1455-1461 [link]
Zeng ZB, Wang T, Zou W. (2005). Modelling quantitative trait loci and interpretation of models. Genetics 169: 1711-1725. [link]
The function uses partial_genotype_order
and activeSet
from the isotone package to do
monotone regression (Leeuw et al., 2009) on a GP map.
monotone_regression(gpmap, plusallele)
monotone_regression(gpmap, plusallele)
gpmap |
An object of class |
plusallele |
An |
Element i in plusallele
specifies the ordering of the genotypes at locus i, if the element is 1 then 11 < 12 < 22 and conversely if it is 2 then
22 < 12 < 11. monotone_regression
calls partial_genotype_order
to obtain the partial ordering of genotypic values for the given plusalleles
.
This partial ordering is then used together with the GP map itself as input to the activeSet
function from the package
isotone.
monotone_regression
returns the output from activeSet
directly.
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
Leeuw J, Hornik K and Mair P (2009) Isotone Optimization in R: Pool-Adjacent-Violators Algorithm (PAVA) and Active Set Methods. Journal of Statistical Software 32(5) [link]
Gjuvsland AB, Wang Y, Plahte E and Omholt SW (2013) Monotonicity is a key feature of genotype-phenotype maps. Front. Genet. 4:216. doi: 10.3389/fgene.2013.00216 [link]
data(GPmaps) #Additive GP map is monotone monotone_regression(A,c(2,2)) #Pure AxA epistasis map monotone_regression(AA,c(2,2)) #two-locus example in Cheverud & Routman (1995) monotone_regression(mouseweight,c(1,1))
data(GPmaps) #Additive GP map is monotone monotone_regression(A,c(2,2)) #Pure AxA epistasis map monotone_regression(AA,c(2,2)) #two-locus example in Cheverud & Routman (1995) monotone_regression(mouseweight,c(1,1))
Generate the strict partial order on genotype space specified in eq. (13) in Gjuvsland et al. (2011).
For a genotype space with biallelic loci a minimal description of this partial order is given by
inequalities.
partial_genotype_order(plusallele)
partial_genotype_order(plusallele)
plusallele |
A |
In short a partial order on a set is a binary relation defining a parwise ordering of some pairs of elements in the set, for a formal definiton see https://en.wikipedia.org/wiki/Partial_order. In the partial order on the set of genotypes defined in Gjuvsland et al. (2011) the comparable pairs of genotypes are equal at every locus except one, while all other pairs of genotypes are incomparable. This partial ordering of genotype space is implicit in the regression on gene content (the number of alleles with a given index in each genotype) used for decomposition of tne genotypic value in quantitative genetics (see e.g. Lynch and Walsh page 65).
Returns a matrix of genotype indexes. The genotype indexes refer to row number in the genotype sequence set up in
enumerate_genotypes
.
Each row vector in the matrix contains the genotype indexes of one comparable pairs, and if the first index is and the second is
then genotype[
] < genotype[
].
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
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]
Lynch M & Walsh B (1998) Genetics and Analysis of Quantitative Traits, Sunderland, MA: Sinauer Associates
Function for creating lineplots for genotype-phenotype (GP) map (an object of class gpmap
)
with 1-3 biallelic loci.
## S3 method for class 'gpmap' plot(x, show=1, decomposed=FALSE, ...)
## S3 method for class 'gpmap' plot(x, show=1, decomposed=FALSE, ...)
x |
A |
show |
Which map (only used if >1 map in |
decomposed |
Decomposition into monotone and non-monotone component plotted if TRUE |
... |
ignored |
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
data(GPmaps) #plot additive gpmap plot(A) #plot decomposition of GPmap from Cheverud & Routman (1995) decomp <- decompose_monotone(mouseweight) plot(decomp, decomposed=TRUE)
data(GPmaps) #plot additive gpmap plot(A) #plot decomposition of GPmap from Cheverud & Routman (1995) decomp <- decompose_monotone(mouseweight) plot(decomp, decomposed=TRUE)
gpmap
objects Print a summary of a genotype-phenotype (GP) map (an object of class gpmap
)
with 1-3 biallelic loci.
## S3 method for class 'gpmap' print(x, ...)
## S3 method for class 'gpmap' print(x, ...)
x |
A |
... |
ignored |
Prints name(s) of GP map(s) and loci, a summary of genotypic values. Monotonicity measures are printed if available.
Arne B. Gjuvsland <[email protected]> and Yunpeng Wang <[email protected]>
data(GPmaps) print(A)
data(GPmaps) print(A)