This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Read data from EMBL file


EMBLData = emblread(File)
EMBLSeq = emblread (File, 'SequenceOnly', SequenceOnlyValue)

Input Arguments


Either of the following:

  • Character vector specifying a file name, a path and file name, or a URL pointing to a file. The referenced file is an EMBL-formatted file. If you specify only a file name, that file must be on the MATLAB® search path or in the MATLAB Current Folder.

  • Character vector that contains the text of an EMBL-formatted file

    Tip   You can use the getembl function with the 'ToFile' property to retrieve data from the European Molecular Biology Laboratory (EMBL) database and create an EMBL-formatted file.

SequenceOnlyValueControls the reading of only the sequence without the metadata. Choices are true or false (default).

Output Arguments

EMBLDataStructure with fields corresponding to EMBL data.
EMBLSeqCharacter vector representing the sequence.


EMBLData = emblread(File) reads data from File, an EMBL-formatted file, and creates EMBLData, a MATLAB structure containing fields corresponding to the EMBL two-character line type code, based on release 107 of the EMBL-Bank flat file format. Each line type code is stored as a separate element in the structure. For a list of the EMBL two-character line type codes, see

    Note:   Topology information was not included in EMBL flat files before release 87 of the database. When reading a file created before release 87, EMBLREAD returns an empty Identification.Topology field.

    Note:   The entry name is no longer displayed in the ID line of EMBL flat files in release 87. When reading a file created in release 87, EMBLREAD returns the accession number in the Identification.EntryName field.

EMBLSeq = emblread (File, 'SequenceOnly', SequenceOnlyValue) controls the reading of only the sequence without the metadata. Choices are true or false (default).


Retrieve sequence information from the Web, save to a file, and then read back into the MATLAB software.

  1. Use the getembl function and ToFile property to retrieve sequence information from the Web and save to an EMBL-formatted file.

  2. Read data from the EMBL-formatted file and create a MATLAB structure.

    EMBLData = emblread('rat_protein.txt')
    EMBLData = 
                Identification: [1x1 struct]
                     Accession: 'X00558'
               SequenceVersion: 'X00558.1'
                   DateCreated: '13-JUN-1985 (Rel. 06, Created)'
                   DateUpdated: [1x46 char]
                   Description: [1x75 char]
                       Keyword: [1x75 char]
               OrganismSpecies: [1x75 char]
        OrganismClassification: [3x75 char]
                     Organelle: ''
                     Reference: {[1x1 struct]}
        DatabaseCrossReference: ''
                      Comments: ''
                      Assembly: ''
                       Feature: [23x75 char]
                     BaseCount: [1x1 struct]
                      Sequence: [1x877 char]

Introduced before R2006a

Was this topic helpful?