| Bioinformatics Toolbox™ | ![]() |
rnaplot(RNA2ndStruct)
ha = rnaplot(RNA2ndStruct)
[ha, H]
= rnaplot(RNA2ndStruct)
rnaplot(RNA2ndStruct,
...'Sequence', SequenceValue, ...)
rnaplot(RNA2ndStruct, ...'Format', FormatValue,
...)
rnaplot(RNA2ndStruct, ...'Selection', SelectionValue,
...)
rnaplot(RNA2ndStruct, ...'ColorBy', ColorByValue,
...)
| RNA2ndStruct | Secondary structure of an RNA sequence represented by either:
| |
| SequenceValue | Sequence of the RNA secondary structure being plotted, specified by either of the following:
This information is used in the data tip displayed by clicking a base in the plot of the RNA secondary structure RNA2ndStruct. This information is required if you specify the 'Diagram' format or if you specify to highlight any of the following paired selections: 'AU', 'UA', 'GC', 'CG', 'GU' or 'UG'. | |
| FormatValue | String specifying the format of the plot. Choices are:
| |
| SelectionValue | Either of the following:
| |
| ColorByValue | String specifying a color scheme for the plot. Choices are:
|
| ha | Handle to the figure axis. |
| H | A structure of handles containing a subset of the following
fields, based on what you specify for the 'Selection' and 'ColorBy' properties:
|
rnaplot(RNA2ndStruct) draws the RNA secondary structure specified by RNA2ndStruct, the secondary structure of an RNA sequence represented by a string specifying bracket notation or a connectivity matrix.
ha = rnaplot(RNA2ndStruct) returns ha, a handle to the figure axis.
[ha, H] = rnaplot(RNA2ndStruct) also returns H, a structure of handles, which you can use to graph elements in a MATLAB® Figure window.
Tip Use the handles returned in H to change properties of the graph elements, such as color, marker size, and marker type. |
H contains a subset of the following fields, based on what you specify for the 'Selection' and 'ColorBy' properties.
| Field | Description |
|---|---|
| Paired | Handles to all paired residues |
| Unpaired | Handles to all unpaired residues |
| A | Handles to all A residues |
| C | Handles to all C residues |
| G | Handles to all G residues |
| U | Handles to all U residues |
| AU | Handles to all AU or UA pairs |
| GC | Handles to all GC or CG pairs |
| GU | Handles to all GU or UG pairs |
| Selected | Handles to all selected residues |
rnaplot(RNA2ndStruct, ...'PropertyName', PropertyValue, ...) calls rnaplot 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:
rnaplot(RNA2ndStruct,
...'Sequence', SequenceValue, ...) draws
the RNA secondary structure specified by RNA2ndStruct,
and annotates it with the sequence positions supplied by SequenceValue,
the RNA sequence specified by a string of characters or a structure
containing a Sequence field.
rnaplot(RNA2ndStruct, ...'Format', FormatValue, ...) draws the RNA secondary structure specified by RNA2ndStruct, using the format specified by FormatValue.
FormatValue is a string specifying the format of the plot. Choices are as follows.
| Format | Description |
|---|---|
| 'Circle' (default) | Each base is represented by a dot on the circumference of a circle of arbitrary size. Lines connect bases that pair with each other.
|
| 'Diagram' | Two-dimensional representation of the RNA secondary structure. Each base is represented and identified by a letter. The backbone and hydrogen bonds between base pairs are represented by lines.
|
| 'Dotdiagram' | Two-dimensional representation of the RNA secondary structure. Each base is represented and identified by a dot. The backbone and hydrogen bonds between base pairs are represented by lines.
|
| 'Graph' | Bases are displayed in their sequence position along the abscissa (x-axis) of a graph. Semi-elliptical lines connect bases that pair with each other. The height of the lines is proportional to the distance between paired bases.
|
| 'Mountain' | Each base is represented by a dot in a two-dimensional plot, where the base position is in the abscissa (x-axis) and the number of base pairs enclosing a given base is in the ordinate (y-axis).
|
| 'Tree' | Each base is represented by a node in a tree graph. Leaf nodes indicate unpaired bases, while each internal node indicates a base pair. The tree root is a fictitious node, not associated with any base in the secondary structure.
|
rnaplot(RNA2ndStruct, ...'Selection', SelectionValue, ...) draws the RNA secondary structure specified by RNA2ndStruct, highlighting a subset of residues specified by SelectionValue. SelectionValue can be either:
Numeric array specifying the indices of residues to highlight in the plot.
String specifying the subset of residues to highlight in the plot. Choices are:
'Paired'
'Unpaired'
'AU' or 'UA'
'GC' or 'CG'
'GU' or 'UG'
Note If you specify 'AU', 'UA', 'GC', 'CG', 'GU', or 'UG', you must also use the 'Sequence' property to provide the RNA sequence. |
rnaplot(RNA2ndStruct, ...'ColorBy', ColorByValue, ...) draws the RNA secondary structure specified by RNA2ndStruct, using a color scheme specified by ColorByValue, a string indicating a color scheme. Choices are:
'State' (default) — Color by pair state: paired bases and unpaired bases.
'Residue' — Color by residue type (A, C, G, and U).
'Pair' — Color by pair type (AU/UA, GC/CG, and GU/UG).
Note If you specify 'Residue' or 'Pair', you must also use the 'Sequence' property to provide the RNA sequence. |
Note Because internal nodes of a tree correspond to paired residues, you cannot specify 'Residue' if you specify 'Tree' for the 'Format' property. |
Determine the minimum free-energy secondary structure of an RNA sequence and plot it in circle format:
seq = 'GCGCCCGUAGCUCAAUUGGAUAGAGCGUUUGACUACGGAUCAAAAGGUUAGGGGUUCGACUCCUCUCGGGCGCG'; ss = rnafold(seq); rnaplot(ss)

Plot the RNA sequence secondary structure in graph format and color it by pair type.
rnaplot(ss, 'sequence', seq, 'format', 'graph', 'colorby', 'pair')

Plot the RNA sequence secondary structure in mountain format and color it by residue type. Use the handle to add a title to the plot.
ha = rnaplot(ss, 'sequence', seq, 'format', 'mountain',...
'colorby', 'residue')
title(ha, 'Bacillus halodurans, tRNA Arg')

Mutate the first six positions in the sequence and observe the effect the change has on the secondary structure by highlighting the first six residues.
seqMut = seq; seqMut(1:6) = 'AAAAAA'; ssMut = rnafold(seqMut); rnaplot(ss, 'sequence', seq, 'format', 'dotdiagram', 'selection', 1:6); rnaplot(ssMut, 'sequence', seqMut, 'format', 'dotdiagram', 'selection', 1:6);


Tip If necessary, click-drag the legend to prevent it from covering the plot. Click a base in the plot to display a data tip with information on that base. |
Bioinformatics Toolbox™ functions: rnaconvert, rnafold
![]() | rnafold | samplealign | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |