fastainfo

Return information about FASTA file

Description

example

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

Examples

collapse all

info = fastainfo('ex1ref.fasta')
info = struct with fields:
           Filename: 'ex1ref.fasta'
           FilePath: '/mathworks/devel/bat/Bdoc19b/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

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.

Introduced in R2009b