msheatmap
Create pseudocolor image of set of mass spectra
Syntax
msheatmap(
MZ
, Intensities
)
msheatmap(MZ
, Times
, Intensities
)
msheatmap(..., 'Midpoint', MidpointValue
,
...)
msheatmap(..., 'Range', RangeValue
,
...)
msheatmap(..., 'Markers', MarkersValue
,
...)
msheatmap(..., 'SpecIdx', SpecIdxValue
,
...)
msheatmap(..., 'Group', GroupValue
,
...)
msheatmap(..., 'Resolution', ResolutionValue
,
...)
Arguments
MZ | Column vector of common mass/charge (m/z)
values for a set of spectra. The number of elements in the vector
equals the number of rows in the matrix Intensities .Note You can use the |
Times | Column vector of retention times associated
with a liquid chromatography/mass spectrometry (LC/MS) or gas chromatography/mass
spectrometry (GC/MS) data set. The number of elements in the vector
equals the number of columns in the matrix Intensities .
The retention times are used to label the y -axis
of the heat map.Tip You can use the |
Intensities | Matrix of intensity values for a set
of mass spectra that share the same m/z range. Each row corresponds
to an m/z value, and each column corresponds to a spectrum or retention
time. The number of rows equals the number of elements in vector MZ .
The number of columns equals the number of elements in vector Times .Note You can use the |
MidpointValue | Value specifying a quantile of the ion
intensity values to fall below the midpoint of the colormap, meaning
they do not represent peaks. msheatmap uses a custom
colormap where cool colors represent nonpeak regions, white represents
the midpoint, and warm colors represent peaks. Choices are any value ≥
0 and ≤ 1 . Default is:
Tip You can also change the midpoint interactively after creating the heat map by right-clicking the color bar, selecting Interactive Colormap Shift, and then click-dragging the cursor vertically on the color bar. This technique is useful when comparing multiple heat maps. |
RangeValue | 1-by-2 vector specifying the m/z range
for the x -axis of the heat map. RangeValue must
be within [min( ].
Default is the full range [min( . |
MarkersValue | Vector of m/z values to mark on the top
horizontal axis of the heat map. Default is [] . |
SpecIdxValue | Either of the following:
y -axis of the heat map. Note If input |
GroupValue | Either of the following:
y -axis in the heat map.Note If input |
ResolutionValue | Value specifying the horizontal resolution
of the heat map image. Increase this value to enhance details. Decrease
this value to reduce memory usage. Default is:
|
Description
msheatmap(
displays
a pseudocolor heat map image of the intensities for the spectra in
matrix MZ
, Intensities
)
.Intensities
msheatmap(
displays
a pseudocolor heat map image of the intensities for the spectra in
matrix MZ
, Times
, Intensities
)Intensities
, using the retention
times in vector Times
to label the y
-axis.
msheatmap(..., '
calls PropertyName
', PropertyValue
,
...)msheatmap
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:
msheatmap(..., 'Midpoint',
specifies a quantile of the ion intensity values
to fall below the midpoint of the colormap, meaning they do not represent
peaks. MidpointValue
,
...)msheatmap
uses a custom colormap where cool
colors represent nonpeak regions, white represents the midpoint, and
warm colors represent peaks. Choices are any value between 0
and 1
.
Default is:
0.99
— For LC/MS or GC/MS data or when inputT
is provided. This means that 1% of the pixels are warm colors and represent peaks.0.95
— For non-LC/MS or non-GC/MS data or when inputT
is not provided. This means that 5% of the pixels are warm colors and represent peaks.
Tip
You can also change the midpoint interactively after creating the heat map by right-clicking the color bar, selecting Interactive Colormap Shift, then click-dragging the cursor vertically on the color bar. This technique is useful when comparing multiple heat maps.
msheatmap(..., 'Range',
specifies the m/z range for the RangeValue
,
...)x
-axis
of the heat map. RangeValue
is a 1-by-2
vector that must be within [min(
]. Default is the full
range MZ
)
max(MZ
)[min(
.MZ
) max(MZ
)]
msheatmap(..., 'Markers',
places markers along the top horizontal axis of the
heat map for the m/z values specified in the vector MarkersValue
,
...)MarkersValue
.
Default is []
.
msheatmap(..., 'SpecIdx',
labels the spectra along the SpecIdxValue
,
...)y
-axis in the heat map. The
labels are specified by SpecIdxValue
, a vector of values,
cell array of character vectors, or string vector. The number of values or character
vectors or strings is the same as the number of columns (spectra) in the matrix
Intensities
. Each value or character vector or string
specifies a label for the corresponding spectrum.
msheatmap(..., 'Group',
sorts and combines spectra into groups along the GroupValue
,
...)y
-axis in
the heat map. The groups are specified by GroupValue
, a
vector of values, cell array of character vectors, or string vector. The number of
values, character vectors, or strings is the same as the number of rows in the matrix
Intensities
. Each value or character vector or string
specifies a group to which the corresponding spectrum belongs. Default is
[1:numSpectra]
.
msheatmap(..., 'Resolution',
specifies the horizontal resolution of the heat map
image. Increase this value to enhance details. Decrease this value
to reduce memory usage. Default is:ResolutionValue
,
...)
0.5 — When
MZ
contains > 2,500 elements.0.05 — When
MZ
contains <= 2,500 elements.
Examples
Load SELDI-TOF sample data.
load sample_lo_res
Create a vector of four m/z values to mark along the top horizontal axis of the heat map.
M = [3991.4 4598 7964 9160];
Display the heat map with m/z markers and a limited m/z range.
msheatmap(MZ_lo_res,Y_lo_res,'markers',M,'range',[3000 10000])
Display the heat map again grouping each spectrum into one of two groups.
TwoGroups = [1 1 2 2 1 1 2 2]; msheatmap(MZ_lo_res,Y_lo_res,'markers',M,'group',TwoGroups)
Load LC/MS sample data.
load lcmsdata
Resample the peak lists to create a vector of m/z values and a matrix of intensity values.
[MZ, Intensities] = msppresample(ms_peaks, 5000);
Display the heat map showing mass spectra at different retention times.
msheatmap(MZ, ret_time, log(Intensities))
Version History
Introduced before R2006a
See Also
mspalign
| msbackadj
| msdotplot
| msalign
| mslowess
| msnorm
| mspeaks
| msresample
| msppresample
| mssgolay
| msviewer
Topics
- Mass Spectrometry and Bioanalytics
- Preprocessing Raw Mass Spectrometry Data
- Visualizing and Preprocessing Hyphenated Mass Spectrometry Data Sets for Metabolite and Protein/Peptide Profiling
- Differential Analysis of Complex Protein and Metabolite Mixtures Using Liquid Chromatography/Mass Spectrometry (LC/MS)