ape (version 2.2-3)

DNAmodel: Defines Models of DNA Evolution

Description

This function defines a model of evolution for a set of DNA sequences with possible partitions.

Usage

DNAmodel(model = "K80", partition = 1,
         ncat.isv = 1, invar = FALSE,
         equal.isv = TRUE, equal.invar = 1)

Arguments

Value

an object of class "DNAmodel" with components defined by the arguments of the function call.

Details

partition is recycled along the sequence: thus by default there is a single partition. For instance, to partition a sequence of 1000 sites into two partitions of equal length, one will use partition = c(rep(1, 500), rep(2, 500)). The partitions must be numbered with a series of integers (1, 2, 3, ...). To partition the codon positions, one could do partition = c(1, 1, 2).

The substition models are the same in all partitions. Branch lengths are the same in all partitions up to a multiplying coefficient (the contrast parameter, denoted 'xi').

The substitution models must be among the followings: "JC69" "K80", "F81", "F84", "HKY85", "T92", "TN93", and "GTR". These models (except HKY85 and GTR) are described in the help page of dist.dna.

Inter-sites variation in substitution rates (ISV) is allowed by specifying ncat.isv greater than one.

See Also

mlphylo, dist.dna

Examples

Run this code
### the K80 model:
mod <- DNAmodel()
### the simplest substitution model:
mod <- DNAmodel("JC69")
### the classical GTR + G4 + I:
mod <- DNAmodel("GTR", ncat.isv = 4, invar = TRUE)
### codon-partitioning (with K80):
mod <- DNAmodel(partition = c(1, 1, 2))
### the same but adding inter-sites variation (the alpha parameter
### is the same for both partitions):
mod <- DNAmodel(partition = c(1, 1, 2), ncat.isv = 4)
### ... and with different `alpha' for each partition:
mod <- DNAmodel(partition = c(1, 1, 2), ncat.isv = 4, equal.isv = FALSE)

Run the code above in your browser using DataLab