rnaplot
Draw secondary structure of RNA sequence
Syntax
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
,
...)
Input Arguments
RNA2ndStruct | Secondary structure of an RNA sequence represented by either:
Tip Use the |
SequenceValue | Sequence of the RNA secondary structure being plotted, specified by either of the following:
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 | Character vector or string specifying the format of the plot. Choices are:
Note If you specify |
SelectionValue | Either of the following:
Note If you specify |
ColorByValue | Character vector or string specifying a color scheme for the plot. Choices are:
Note If you specify Note Because internal nodes of a tree correspond
to paired residues, you cannot specify
|
Output Arguments
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:
|
Description
rnaplot(
draws the RNA secondary
structure specified by
RNA2ndStruct
)RNA2ndStruct
, the
secondary structure of an RNA sequence represented by a
character vector or string specifying bracket notation or a
connectivity matrix.
returns ha
= rnaplot(RNA2ndStruct
)ha
,
a handle to the figure axis.
[
also
returns ha
, H
]
= rnaplot(RNA2ndStruct
)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(
calls RNA2ndStruct
, ...'PropertyName
', PropertyValue
,
...)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(
draws the RNA secondary structure specified by
RNA2ndStruct
,
...'Sequence', SequenceValue
, ...)RNA2ndStruct
, and
annotates it with the sequence positions supplied by
SequenceValue
, the RNA
sequence specified by a character vector, string, or a
structure containing a Sequence
field.
rnaplot(
draws the RNA secondary structure specified by RNA2ndStruct
, ...'Format', FormatValue
,
...)RNA2ndStruct
,
using the format specified by FormatValue
.
FormatValue
is a character vector or 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. Note If you specify |
'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(
draws the RNA secondary structure specified by RNA2ndStruct
, ...'Selection', SelectionValue
,
...)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.
Character vector or 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(
draws the RNA secondary structure specified by
RNA2ndStruct
, ...'ColorBy', ColorByValue
,
...)RNA2ndStruct
, using a
color scheme specified by
ColorByValue
, a
character vector or 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.
Examples
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.
Version History
Introduced in R2007b