| Bioinformatics Toolbox | ![]() |
Read data from FASTA file
FASTAData = fastaread('File')
[Header, Sequence] = fastaread('File')
File | FASTA formatted file (ASCII text file). Enter a filename, a path and filename, or a URL pointing to a file. File can also be a MATLAB character array that contains the text for a filename. |
FASTAData | MATLAB structure with the fields Header and Sequence. |
fastaread reads data from a FASTA formatted file into a MATLAB structure with the following fields:
Header Sequence
A file with a FASTA format begins with a right angle bracket (>) and a single line description. Following this description is the sequence as a series of lines with fewer than 80 characters. Sequences are expected to use the standard IUB/IUPAC amino acid and nucleotide letter codes.
For a list of codes, see aminolookup and baselookup.
FASTAData = fastaread('File') reads a file with a FASTA format and returns the data in a structure. FASTAData.Header is the header information, while FASTAData.Sequence is the sequence stored as a string of letters.
[Header, Sequence] = fastaread('File') reads data from a file into separate variables. If the file contains more than one sequence, then header and sequence are cell arrays of header and sequence information.
Get a FASTA formatted sequence from GenBank, save it, and then read the FASTA file into the MATLAB workspace as a structure.
s= fastaread('p53nt.txt')
s =
Header: [1x94 char]
Sequence: [1x2629 char]
Bioinformatics Toolbox function aminolookup, baselookup, fastawrite
| exprprofvar | fastawrite | ![]() |
© 1994-2005 The MathWorks, Inc.