Main Content

fastainfo

Return information about FASTA file

Description

example

info = fastainfo(file) returns a structure info containing summary information about the FASTA file.

example

info = fastainfo(file,'TimeOut',TO) sets the connection timeout (in seconds) to read data from a remote file or URL.

Examples

collapse all

info = fastainfo('ex1ref.fasta')
info = struct with fields:
           Filename: 'ex1ref.fasta'
           FilePath: '/mathworks/devel/bat/Bdoc23b/build/matlab/toolbox/bioinfo/bioinfodata'
        FileModDate: '07-May-2010 16:12:06'
           FileSize: 1612
    NumberOfEntries: 1
             Header: 'Reference for ex1'
             Length: 1569

Input Arguments

collapse all

FASTA file, specified as one of the following:

  • Character vector or string specifying a FASTA file name, path and name of a FASTA file, or URL pointing to a FASTA file. If you specify only a file name, the file must be on the MATLAB® search path or in the current folder.

  • Character array containing the text of a FASTA file.

Data Types: char | string

Connection timeout to read data from a remote file, specified as a positive scalar. For details, see here.

Data Types: double
Complex Number Support: Yes

Output Arguments

collapse all

Summary information about the FASTA file, returned as a structure. The structure contains the following fields.

FieldDescription

Filename

Name of the file.

FilePath

Path to the file.

FileModDate

Modification date of the file.

FileSize

Size of the file in bytes.

NumberOfEntries

Number of sequence entries in the file.

Header

If file contains only one sequence, then this is a character vector containing the header information from the FASTA file. Otherwise, this field is empty.

Length

If file contains only one sequence, then this is a scalar specifying the length of the sequence. Otherwise, this field is empty.

Version History

Introduced in R2009b