]> git.donarmstrong.com Git - ape.git/blobdiff - man/read.nexus.Rd
various bug fixes since the release of ape 3.0
[ape.git] / man / read.nexus.Rd
index d12f4d29f019ef3cb859a202bfb301058e2847ec..8a668d1e2db0e8eaf502dd8efca5b922e4a76ba6 100644 (file)
@@ -8,20 +8,28 @@ read.nexus(file, tree.names = NULL)
   \item{file}{a file name specified by either a variable of mode character,
     or a double-quoted string.}
   \item{tree.names}{if there are several trees to be read, a vector of
-    mode character that gives names to the individual trees; if
-    \code{NULL} (the default), the trees are named \code{"tree1"},
-    \code{"tree2"}, ...}
+    mode character that gives names to the individual trees.}
 }
 \description{
   This function reads one or several trees in a NEXUS file.
 }
 \details{
   The present implementation tries to follow as much as possible the
-  NEXUS standard. Only the block ``TREES'' is read; the other data can be
-  read with other functions (e.g., \code{\link{read.dna}},
-  \code{\link[base]{read.table}}, ...). A trace of the original data is
+  NEXUS standard (but see the restriction below on TRANSLATION
+  tables). Only the block ``TREES'' is read; the other data can be read
+  with other functions (e.g., \code{\link{read.dna}},
+  \code{\link[utils]{read.table}}, ...). A trace of the original data is
   kept with the attribute \code{"origin"} (see below).
 
+  If a TRANSLATION table is present it is assumed that only the tip
+  labels are translated and they are all translated with integers
+  without gap. Consequently, if nodes have labels in the tree(s) they
+  are read as they are and not looked for in the translation table. The
+  logic behind this is that in the vast majority of cases, node labels
+  will be support values rather than proper taxa names. This is
+  consistent with \code{\link{write.nexus}} which translates only the
+  tip labels.
+
   `read.nexus' tries to represent correctly trees with a badly
   represented root edge (i.e. with an extra pair of parentheses). For
   instance, the tree "((A:1,B:1):10);" will be read like "(A:1,B:1):10;"
@@ -52,19 +60,13 @@ read.nexus(file, tree.names = NULL)
 
   If several trees are read in the file, the returned object is of class
   \code{"multiPhylo"}, and is a list of objects of class \code{"phylo"}.
-
-  An attribute \code{"origin"} is further given to the returned object
-  which gives the name of the source file (with its path). This is used
-  to write a tree in a NEXUS file where all the original data must be
-  written (not only the tree) in accordance to the specifications of
-  Maddison et al. (1997).
 }
 \references{
   Maddison, D. R., Swofford, D. L. and Maddison, W. P. (1997) NEXUS: an
   extensible file format for systematic information. \emph{Systematic
     Biology}, \bold{46}, 590--621.
 }
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
 \seealso{
   \code{\link{read.tree}}, \code{\link{write.nexus}},
   \code{\link{write.tree}}, \code{\link{read.nexus.data}},