getgenbank - Retrieve sequence information from GenBank database

Syntax

Data = getgenbank(AccessionNumber)
getgenbank(AccessionNumber)

getgenbank(..., 'PartialSeq', PartialSeqValue, ...)
getgenbank(..., 'ToFile', ToFileValue, ...)
getgenbank(..., 'FileFormat', FileFormatValue, ...)
getgenbank(..., 'SequenceOnly', SequenceOnlyValue, ...)

Arguments

AccessionNumberString specifying a unique alphanumeric identifier for a sequence record.
PartialSeqValueTwo-element array of integers containing the start and end positions of the subsequence [StartBP, EndBP] that specifies a subsequence to retrieve. StartBP is an integer between 1 and EndBP; EndBP is an integer between StartBP and the length of the sequence.
ToFileValue String specifying either a file name or a path and file name for saving the GenBank data. If you specify only a file name, the file is saved to the MATLAB Current Directory.
FileFormatValueString specifying the format for the file specified with the 'ToFile' property. Choices are 'GenBank' (default) or 'FASTA'.
SequenceOnlyValue

Controls the return of only the sequence as a character array. Choices are true or false (default).

Description

getgenbank retrieves nucleotide information from the GenBank database. This database is maintained by the National Center for Biotechnology Information (NCBI). For more details about the GenBank database, see

http://www.ncbi.nlm.nih.gov/Genbank/

Data = getgenbank(AccessionNumber) searches for the accession number in the GenBank database and returns a MATLAB structure containing information for the sequence.

getgenbank(AccessionNumber) displays the information in the MATLAB Command Window without returning data to a variable. The displayed information includes hyperlinks to the URLs used to search for and retrieve the data.

getgenbank(..., 'PropertyName', PropertyValue, ...) calls getgenbank with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:


getgenbank(..., 'PartialSeq', PartialSeqValue, ...)
returns the specified subsequence in the Sequence field of the MATLAB structure. PartialSeqValue is a two-element array of integers containing the start and end positions of the subsequence [StartBP, EndBP]. StartBP is an integer between 1 and EndBP; EndBP is an integer between StartBP and the length of the sequence.

getgenbank(..., 'ToFile', ToFileValue, ...) saves the data returned from the GenBank database to a file. ToFileValue is a string specifying either a file name or a path and file name for saving the GenBank data. If you specify only a file name, the file is saved to the MATLAB Current Directory.

getgenbank(..., 'FileFormat', FileFormatValue, ...) returns the sequence in the specified format. Choices are 'GenBank' (default) or 'FASTA'.

getgenbank(..., 'SequenceOnly', SequenceOnlyValue, ...) controls the return of only the sequence as a character array. Choices are true or false (default).

Examples

Retrieving an RNA Sequence

To retrieve the sequence from chromosome 19 that codes for the human insulin receptor and store it in a structure, S, in the MATLAB Command Window, type:

S = getgenbank('M10051')

S = 

                LocusName: 'HUMINSR'
      LocusSequenceLength: '4723'
     LocusNumberofStrands: ''
            LocusTopology: 'linear'
        LocusMoleculeType: 'mRNA'
     LocusGenBankDivision: 'PRI'
    LocusModificationDate: '06-JAN-1995'
               Definition: 'Human insulin receptor mRNA, complete cds.'
                Accession: 'M10051'
                  Version: 'M10051.1'
                       GI: '186439'
                  Project: []
                 Keywords: 'insulin receptor; tyrosine kinase.'
                  Segment: []
                   Source: 'Homo sapiens (human)'
           SourceOrganism: [4x65 char]
                Reference: {[1x1 struct]}
                  Comment: [14x67 char]
                 Features: [51x74 char]
                      CDS: [1x1 struct]
                 Sequence: [1x4723 char]
                SearchURL: [1x105 char]
              RetrieveURL: [1x95 char]                            

Retrieving a Partial RNA Sequence

By looking at the Features field of the structure returned in Retrieving an RNA Sequence, you can determine that the coding sequence is positions 139 through 4287. To retrieve only the coding sequence from chromosome 19 that codes for the human insulin receptor and store it in a structure, CDS, in the MATLAB Command Window, type:

CDS = getgenbank('M10051','PARTIALSEQ',[139,4287]);

See Also

Bioinformatics Toolbox functions: genbankread, getembl, getgenpept, getpdb, seqtool

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS