]> git.donarmstrong.com Git - ape.git/blob - man/DNAmodel.Rd
current 2.1 release
[ape.git] / man / DNAmodel.Rd
1 \name{DNAmodel}
2 \alias{DNAmodel}
3 \title{Defines Models of DNA Evolution}
4 \usage{
5 DNAmodel(model = "K80", partition = 1,
6          ncat.isv = 1, invar = FALSE,
7          equal.isv = TRUE, equal.invar = 1)
8 }
9 \arguments{
10   \item{model}{a vector of mode character giving the substition model.}
11   \item{partition}{a vector of integers defining the partitions for the
12     substition models (eventually recycled).}
13   \item{ncat.isv}{the number of categories in each partition.}
14   \item{invar}{a logical value specifying whether there are invariants.}
15   \item{equal.isv}{a logical value specifying whether the `alpha'
16     parameter is the same in all partitions; has no effet if \code{ncat
17       = 1} or if \code{partition = 1}.}
18   \item{equal.invar}{similar to the argument above but for the
19     proportion of invariants.}
20 }
21 \description{
22   This function defines a model of evolution for a set of DNA sequences
23   with possible partitions.
24 }
25 \details{
26   \code{partition} is recycled along the sequence: thus by default there
27   is a single partition. For instance, to partition a sequence of 1000
28   sites into two partitions of equal length, one will use
29   \code{partition = c(rep(1, 500), rep(2, 500))}. The partitions must be
30   numbered with a series of integers (1, 2, 3, ...). To partition the
31   codon positions, one could do \code{partition = c(1, 1, 2)}.
32
33   The substition models are the same in all partitions. Branch lengths
34   are the same in all partitions up to a multiplying coefficient (the
35   contrast parameter, denoted 'xi').
36
37   The substitution models must be among the followings: \code{"JC69"}
38   \code{"K80"}, \code{"F81"}, \code{"F84"}, \code{"HKY85"},
39   \code{"T92"}, \code{"TN93"}, and \code{"GTR"}. These models (except
40   HKY85 and GTR) are described in the help page of
41   \code{\link{dist.dna}}.
42
43   Inter-sites variation in substitution rates (ISV) is allowed by
44   specifying \code{ncat.isv} greater than one.
45 }
46 \note{
47   The result of this function is not intended to be used by the user,
48   but rather to be passed to \code{\link{mlphylo}}.
49 }
50 \value{
51   an object of class \code{"DNAmodel"} with components defined by the
52   arguments of the function call.
53 }
54 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
55 \seealso{
56   \code{\link{mlphylo}}, \code{\link{dist.dna}}
57 }
58 \examples{
59 ### the K80 model:
60 mod <- DNAmodel()
61 ### the simplest substitution model:
62 mod <- DNAmodel("JC69")
63 ### the classical GTR + G4 + I:
64 mod <- DNAmodel("GTR", ncat.isv = 4, invar = TRUE)
65 ### codon-partitioning (with K80):
66 mod <- DNAmodel(partition = c(1, 1, 2))
67 ### the same but adding inter-sites variation (the alpha parameter
68 ### is the same for both partitions):
69 mod <- DNAmodel(partition = c(1, 1, 2), ncat.isv = 4)
70 ### ... and with different `alpha' for each partition:
71 mod <- DNAmodel(partition = c(1, 1, 2), ncat.isv = 4, equal.isv = FALSE)
72 }
73 \keyword{models}