]> git.donarmstrong.com Git - ape.git/blobdiff - man/dist.dna.Rd
small moification on man page of as.phylo
[ape.git] / man / dist.dna.Rd
index 2cee8e2f95898bd5fb8df0ee86b5c81f6bd5d894..bc5d4858a46ad3cf6a28fb1ce043731f25926d73 100644 (file)
@@ -7,12 +7,15 @@ dist.dna(x, model = "K80", variance = FALSE,
          base.freq = NULL, as.matrix = FALSE)
 }
 \arguments{
-  \item{x}{a matrix or a list containing the DNA sequences.}
+  \item{x}{a matrix or a list containing the DNA sequences; this must be
+    of class \code{"DNAbin"} (use \code{\link{as.DNAbin}} is they are
+    stored as character).}
   \item{model}{a character string specifying the evlutionary model to be
-    used; must be one of \code{"raw"}, \code{"N"}, \code{"JC69"},
-    \code{"K80"} (the default), \code{"F81"}, \code{"K81"},
-    \code{"F84"}, \code{"BH87"}, \code{"T92"}, \code{"TN93"},
-    \code{"GG95"}, \code{"logdet"}, or \code{"paralin"}.}
+    used; must be one of \code{"raw"}, \code{"N"}, \code{"TS"},
+    \code{"TV"}, \code{"JC69"}, \code{"K80"} (the default),
+    \code{"F81"}, \code{"K81"}, \code{"F84"}, \code{"BH87"},
+    \code{"T92"}, \code{"TN93"}, \code{"GG95"}, \code{"logdet"},
+    \code{"paralin"}, \code{"indel"}, or \code{"indelblock"}.}
   \item{variance}{a logical indicating whether to compute the variances
     of the distances; defaults to \code{FALSE} so the variances are not
     computed.}
@@ -21,7 +24,8 @@ dist.dna(x, model = "K80", variance = FALSE,
       FALSE} so no correction is applied).}
   \item{pairwise.deletion}{a logical indicating whether to delete the
     sites with missing data in a pairwise way. The default is to delete
-    the sites with at least one missing data for all sequences.}
+    the sites with at least one missing data for all sequences (ignored
+    if \code{model = "indel"} or \code{"indelblock"}).}
   \item{base.freq}{the base frequencies to be used in the computations
     (if applicable, i.e. if \code{method = "F84"}). By default, the
     base frequencies are computed from the whole sample of sequences.}
@@ -40,12 +44,16 @@ dist.dna(x, model = "K80", variance = FALSE,
   brief description is given below; more details can be found in the
   References.
 
-  \item{``raw'', ``N''}{This is simply the proportion or the number of
+\itemize{
+  \item{\code{raw}, \code{N}: }{This is simply the proportion or the number of
     sites that differ between each pair of sequences. This may be useful
     to draw ``saturation plots''. The options \code{variance} and
     \code{gamma} have no effect, but \code{pairwise.deletion} can.}
 
-  \item{``JC69''}{This model was developed by Jukes and Cantor (1969). It
+  \item{\code{TS}, \code{TV}: }{These are the numbers of transitions and
+    transversions, respectively.}
+
+  \item{\code{JC69}: }{This model was developed by Jukes and Cantor (1969). It
     assumes that all substitutions (i.e. a change of a base by another
     one) have the same probability. This probability is the same for all
     sites along the DNA sequence. This last assumption can be relaxed by
@@ -54,7 +62,7 @@ dist.dna(x, model = "K80", variance = FALSE,
     default, no gamma correction is applied. Another assumption is that
     the base frequencies are balanced and thus equal to 0.25.}
 
-  \item{``K80''}{The distance derived by Kimura (1980), sometimes referred
+  \item{\code{K80}: }{The distance derived by Kimura (1980), sometimes referred
     to as ``Kimura's 2-parameters distance'', has the same underlying
     assumptions than the Jukes--Cantor distance except that two kinds of
     substitutions are considered: transitions (A <-> G, C <-> T), and
@@ -69,48 +77,60 @@ dist.dna(x, model = "K80", variance = FALSE,
     Jukes--Cantor model, the gamma parameter must be given by the
     user. By default, no gamma correction is applied.}
 
-  \item{``F81''}{Felsenstein (1981) generalized the Jukes--Cantor model
+  \item{\code{F81}: }{Felsenstein (1981) generalized the Jukes--Cantor model
     by relaxing the assumption of equal base frequencies. The formulae
     used in this function were taken from McGuire et al. (1999)}.
 
-  \item{``K81''}{Kimura (1981) generalized his model (Kimura 1980) by
+  \item{\code{K81}: }{Kimura (1981) generalized his model (Kimura 1980) by
     assuming different rates for two kinds of transversions: A <-> C and
     G <-> T on one side, and A <-> T and C <-> G on the other. This is
     what Kimura called his ``three substitution types model'' (3ST), and
     is sometimes referred to as ``Kimura's 3-parameters distance''}.
 
-  \item{``F84''}{This model generalizes K80 by relaxing the assumption
+  \item{\code{F84}: }{This model generalizes K80 by relaxing the assumption
     of equal base frequencies. It was first introduced by Felsenstein in
     1984 in Phylip, and is fully described by Felsenstein and Churchill
     (1996). The formulae used in this function were taken from McGuire
     et al. (1999)}.
 
-  \item{``BH87''}{Barry and Hartigan (1987) developed a distance based
+  \item{\code{BH87}: }{Barry and Hartigan (1987) developed a distance based
     on the observed proportions of changes among the four bases. This
     distance is not symmetric.}
 
-  \item{``T92''}{Tamura (1992) generalized the Kimura model by relaxing
+  \item{\code{T92}: }{Tamura (1992) generalized the Kimura model by relaxing
     the assumption of equal base frequencies. This is done by taking
     into account the bias in G+C content in the sequences. The
     substitution rates are assumed to be the same for all sites along
     the DNA sequence.}
 
-  \item{``TN93''}{Tamura and Nei (1993) developed a model which assumes
+  \item{\code{TN93}: }{Tamura and Nei (1993) developed a model which assumes
     distinct rates for both kinds of transition (A <-> G versus C <->
     T), and transversions. The base frequencies are not assumed to be
     equal and are estimated from the data. A gamma correction of the
     inter-site variation in substitution rates is possible.}
 
-  \item{``GG95''}{Galtier and Gouy (1995) introduced a model where the
+  \item{\code{GG95}: }{Galtier and Gouy (1995) introduced a model where the
     G+C content may change through time. Different rates are assumed for
     transitons and transversions.}
 
-  \item{``logdet''}{The Log-Det distance, developed by Lockhart et
-    al. (1994), is related to BH87. However, this distance is symmetric.}
+  \item{\code{logdet}: }{The Log-Det distance, developed by Lockhart et
+    al. (1994), is related to BH87. However, this distance is
+    symmetric. Formulae from Gu and Li (1996) are used.
+    \code{dist.logdet} in \pkg{phangorn} uses a different
+    implementation that gives substantially different distances for
+    low-diverging sequences.}
 
-  \item{``paralin''}{Lake (1994) developed the paralinear distance which
+  \item{\code{paralin}: }{Lake (1994) developed the paralinear distance which
     can be viewed as another variant of the Barry--Hartigan distance.}
-}
+
+  \item{\code{indel}: }{this counts the number of sites where there an
+    insertion/deletion gap in one sequence and not in the other.}
+
+  \item{\code{indelblock}: }{same than before but contiguous gaps are
+    counted as a single unit. Note that the distance between `-A-' and
+    `A--' is 3 because there are three different blocks of gaps, whereas
+    the ``indel'' distance will be 2.}
+}}
 \value{
   an object of class \link[stats]{dist} (by default), or a numeric
   matrix if \code{as.matrix = TRUE}. If \code{model = "BH87"}, a numeric
@@ -136,6 +156,11 @@ dist.dna(x, model = "K80", variance = FALSE,
   sequences of unequal base compositions. \emph{Proceedings of the
     National Academy of Sciences USA}, \bold{92}, 11317--11321.
 
+  Gu, X. and Li, W.-H. (1996) Bias-corrected paralinear and LogDet
+  distances and tests of molecular clocks and phylogenies under
+  nonstationary nucleotide frequencies. \emph{Molecular Biology and
+    Evolution}, \bold{13}, 1375--1383.
+
   Jukes, T. H. and Cantor, C. R. (1969) Evolution of protein
   molecules. in \emph{Mammalian Protein Metabolism}, ed. Munro, H. N.,
   pp. 21--132, New York: Academic Press.
@@ -173,7 +198,7 @@ dist.dna(x, model = "K80", variance = FALSE,
   substitutions in the control region of mitochondrial DNA in humans and
   chimpanzees. \emph{Molecular Biology and Evolution}, \bold{10}, 512--526.
 }
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
 \seealso{
   \code{\link{read.GenBank}}, \code{\link{read.dna}},
   \code{\link{write.dna}},  \code{\link{DNAbin}},