ape (version 1.0)

read.dna: Read DNA Sequences in a File

Description

This function reads DNA sequences in a file, and returns a list of DNA sequences with the names of the taxa read in the file as names of the vectors of the list.

Usage

read.dna(file, format = "interleaved", skip = 0,
         nlines = 0, comment.char = "#")

Arguments

file
a file name specified by either a variable of mode character, or a double-quoted string.
format
a character string specifying the format of the DNA sequences. Two choices are possible: "interleaved" or "sequential".
skip
the number of lines of the input file to skip before beginning to read data.
nlines
the number of lines to be read (by default the file is read untill its end).
comment.char
a single character, the remaining of the line after this character is ignored.

Value

  • A list a DNA sequences each made of a single vector of mode character where each element is a nucleotide.

Details

This function tries to be as flexible as possible with respect to the presentation of the sequences. There is no restriction on the lengths of the taxa names.

See Also

read.GenBank, write.dna, dist.dna