| Bioinformatics Toolbox™ | ![]() |
Data = getgenbank(AccessionNumber)
getgenbank(AccessionNumber)
getgenbank(..., 'PartialSeq', PartialSeqValue,
...)
getgenbank(..., 'ToFile', ToFileValue,
...)
getgenbank(..., 'FileFormat', FileFormatValue,
...)
getgenbank(..., 'SequenceOnly', SequenceOnlyValue,
...)
| AccessionNumber | String specifying a unique alphanumeric identifier for a sequence record. |
| PartialSeqValue | Two-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. |
| FileFormatValue | String 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). |
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.
Tip If an error occurs while retrieving the GenBank-formatted information, try rerunning the query. Errors can occur due to Internet connectivity issues that are unrelated to the GenBank record. |
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.
Tip You can read a GenBank-formatted file back into MATLAB using the genbankread function. |
Tip To append GenBank data to an existing file, specify that file name, and the data will be added to the end of the file. If you are using getgenbank in a script, you can disable the append warning message by entering the following command lines before the getgenbank command: warnState = warning %Save the current warning state
warning('off','Bioinfo:getncbidata:AppendToFile'); Then enter the following command line after the getgenbank command: warning(warnState) %Reset warning state to previous settings |
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).
Note When the 'SequenceOnly' and 'ToFile' properties are used together, the output is a FASTA-formatted file. |
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]);Bioinformatics Toolbox™ functions: genbankread, getembl, getgenpept, getpdb, seqtool
![]() | getembl | getgenpept | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |