Description Usage Arguments Details Value Author(s) See Also
Read in sequences in FASTA format
1 2 | read.fasta(file, header = FALSE, sep = "", quote = "\"", dec = ".", fill
= FALSE, alphabet = aabet)
|
file |
the name of the file which the data are to be read from.
Each row of the table appears as one line of the file. If it
does not contain an _absolute_ path, the file name is
_relative_ to the current working directory, Alternatively,
|
header |
a logical value indicating whether the file contains the
names of the variables as its first line. If missing, the
value is determined from the file format: |
sep |
the field separator character. Values on each line of the
file are separated by this character. If |
quote |
the set of quoting characters. To disable quoting altogether,
use |
dec |
the character used in the file for decimal points. |
fill |
logical. If |
alphabet |
The alphabet to use for the sequences. The default alphabet contains
the canonical 20 amino acids, as well as B, Z, X, and |
See the details for read.table
for more information about
reading the file itself. Information about the FASTA form may be found
elsewhere, but basically each sequence starts with a definition/name
deliminated by a '<' character. For example:
———————-
>Sequence 1, from mouse
FTRP
>Sequence 2b, from humans
FPYT
>Unkown origin
FPRW
———————–
Each sequence should be the same length, thus
-
should be use to pad the sequences, as seen in the example. Use an alignment
algorithm, such as Clustal, to align your sequences before reading. The
ClustalW2 algorithm is available from the European Bioinformatics
Institutes's website.
An object of class Sequences
. This is a small
extension of the matrix class, and as expected, each row of the matrix
corresponds to a single sequence. The sequences are always represented
as integers. The rownames of the matrix are the original string/character
representations of the sequences.
Andrew White
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.