fastainfo

Return information about FASTA file

Syntax

InfoStruct = fastainfo(File)

Description

InfoStruct = fastainfo(File) returns a MATLAB® structure containing summary information about a FASTA-formatted file.

Input Arguments

File

FASTA-formatted file specified by one of the following:

  • String specifying a file name or path and file name of a FASTA-formatted file. If you specify only a file name, that file must be on the MATLAB search path or in the current folder.

  • URL pointing to a FASTA-formatted file.

  • MATLAB character array containing the text of a FASTA-formatted file.

Output Arguments

InfoStruct

MATLAB structure containing summary information about a FASTA-formatted file. The structure contains the following fields.

FieldDescription
FilenameName of the file.
FilePathPath to the file
FileModDateModification date of the file.
FileSizeSize of the file in bytes.
NumberOfEntries Number of sequence entries in the file.
HeaderIf File contains only one sequence, then this is a string containing the header information from the FASTA-formatted file. Otherwise, this field is empty.
LengthIf File contains only one sequence, then this is a scalar specifying the length of the sequence. Otherwise, this field is empty.

Examples

Return a summary of the contents of a FASTA file:

info = fastainfo('p53nt.txt')

info = 

           Filename: 'p53nt.txt'
           FilePath: 'D:\2010_08_24_h11m43s32_job6027_pass\matlab\toolbox\bioinfo\biodemos'
        FileModDate: '31-Mar-2003 11:44:27'
           FileSize: 2764
    NumberOfEntries: 1
             Header: [1x94 char]
             Length: 2629
Was this topic helpful?