Main Content


Read data from GenPept file


GenPeptData = genpeptread(File)
GenPeptData = genpeptread(File, 'TimeOut', TimeOutValue)



Either of the following:

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

  • MATLAB character array that contains the text of a GenPept-formatted file.


You can use the getgenpept function with the 'ToFile' property to retrieve sequence information from the GenPept database and create an GenPept-formatted file.

TimeOutValueConnection timeout in seconds, specified as a positive scalar. The default value is 5. For details, see here.
GenPeptData MATLAB structure or array of structures containing fields corresponding to GenPept keywords.



NCBI has changed the name of their protein search engine from GenPept to Entrez Protein. However, the function names in the Bioinformatics Toolbox™ software (getgenpept and genpeptread) are unchanged representing the still-used GenPept report format.

GenPeptData = genpeptread(File) reads a GenPept-formatted file, File, and creates GenPeptData, a structure or array of structures, containing fields corresponding to the GenPept keywords. When File contains multiple entries, each entry is stored as a separate element in GenPeptData. For a list of the GenPept keywords, see

GenPeptData = genpeptread(File, 'TimeOut', TimeOutValue) sets the connection timeout (in seconds) to read data from a remote file or URL.


Retrieve sequence information for the protein coded by the HEXA gene, store the data in a file, and then read into the MATLAB software.

getgenpept('p06865', 'ToFile', 'TaySachs_Protein.txt')
Introduced before R2006a