]> git.donarmstrong.com Git - ape.git/blobdiff - man/read.dna.Rd
new option 'draw' in plot.phylo()
[ape.git] / man / read.dna.Rd
index af26aa7b1655fa90148f6edc23a5a1fcb5888ab4..3f350314155250032c3e5d461a1e4c13567bb337 100644 (file)
@@ -4,7 +4,7 @@
 \usage{
 read.dna(file, format = "interleaved", skip = 0,
          nlines = 0, comment.char = "#", seq.names = NULL,
-         as.character = FALSE)
+         as.character = FALSE, as.matrix = NULL)
 }
 \arguments{
   \item{file}{a file name specified by either a variable of mode character,
@@ -23,6 +23,12 @@ read.dna(file, format = "interleaved", skip = 0,
     names read in the file are used.}
   \item{as.character}{a logical controlling whether to return the
     sequences as an object of class \code{"DNAbin"} (the default).}
+  \item{as.matrix}{(used if \code{format = "fasta"}) one of the three
+    followings: (i) \code{NULL}: returns the sequences in a matrix if
+    they are of the same length, otherwise in a list; (ii) \code{TRUE}:
+    returns the sequences in a matrix, or stops with an error if they
+    are of different lengths; (iii) \code{FALSE}: always returns the
+    sequences in a list.}
 }
 \description{
   This function reads DNA sequences in a file, and returns a matrix or a
@@ -47,6 +53,7 @@ read.dna(file, format = "interleaved", skip = 0,
   the file unless the `seq.names' option is used. Particularities for
   each format are detailed below.
 
+\itemize{
   \item{Interleaved:}{the function starts to read the sequences when it
     finds 10 contiguous characters belonging to the ambiguity code of
     the IUPAC (namely A, C, G, T, U, M, R, W, S, Y, K, V, H, D, B, and
@@ -73,7 +80,7 @@ read.dna(file, format = "interleaved", skip = 0,
     leading spaces before this character). These lines are taken as taxa
     names after removing the ``>'' and the possible leading and trailing
     spaces. All the data in the file before the first sequence is ignored.}
-}
+}}
 \value{
   a matrix or a list (if \code{format = "fasta"}) of DNA sequences
   stored in binary format, or of mode character (if \code{as.character =
@@ -94,7 +101,7 @@ read.dna(file, format = "interleaved", skip = 0,
   \code{\link{read.GenBank}}, \code{\link{write.dna}},
   \code{\link{DNAbin}}, \code{\link{dist.dna}}, \code{\link{woodmouse}}
 }
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
 \examples{
 ### a small extract from `data(woddmouse)'
 cat("3 40",