| Bioinformatics Toolbox | ![]() |
The function maimage can take a microarray data structure and create a pseudocolor image of the data arranged in the same order as the spots on the array. In other words, maimage plots a spatial plot of the microarray.
This procedure uses data from a study of gene expression in mouse brains. For a list of field names in the MATLAB structure pd, see Exploring the Microarray Data Set.
Plot the median values for the red channel. For example, to plot data from the field F635 Median, type
figure maimage(pd,'F635 Median')
MATLAB plots an image showing the median pixel values for the foreground of the red (Cy5) channel.
Plot the median values for the green channel. For example, to plot data from the field F532 Median, type
figure maimage(pd,'F532 Median')
MATLAB plots an image showing the median pixel values of the foreground of the green (Cy3) channel.
Plot the median values for the red background. The field B635 Median shows the median values for the background of the red channel.
figure maimage(pd,'B635 Median')
MATLAB plots an image for the background of the red channel. Notice the very high background levels down the right side of the array.
Plot the medial values for the green background. The field B532 Median shows the median values for the background of the green channel.
figure maimage(pd,'B532 Median')
MATLAB plots an image for the background of the green channel.
The first array was for the Parkinson's disease model mouse. Now read in the data for the same brain voxel but for the untreated control mouse. In this case, the voxel sample was labeled with Cy3 and the control, total brain (not voxelated), was labeled with Cy5.
wt = gprread('mouse_a1wt.gpr')
MATLAB creates a structure and displays information about the structure.
wt =
Header: [1x1 struct]
Data: [9504x38 double]
Blocks: [9504x1 double]
Columns: [9504x1 double]
Rows: [9504x1 double]
Names: {9504x1 cell}
IDs: {9504x1 cell}
ColumnNames: {38x1 cell}
Indices: [132x72 double]
Shape: [1x1 struct]
Use the function maimage to show pseudocolor images of the foreground and background. You can use the function subplot to put all the plots onto one figure.
figure subplot(2,2,1); maimage(wt,'F635 Median') subplot(2,2,2); maimage(wt,'F532 Median') subplot(2,2,3); maimage(wt,'B635 Median') subplot(2,2,4); maimage(wt,'B532 Median')
MATLAB plots the images.
If you look at the scale for the background images, you will notice that the background levels are much higher than those for the PD mouse and there appears to be something nonrandom affecting the background of the Cy3 channel of this slide. Changing the colormap can sometimes provide more insight into what is going on in pseudocolor plots. For more control over the color, try the colormapeditor function.
colormap hot
MATLAB plots the images.
The function maimage is a simple way to quickly create pseudocolor images of microarray data. However if you want more control over plotting, it is easy to create your own plots using the function imagesc.
First find the column number for the field of interest.
b532MedCol = find(strcmp(wt.ColumnNames,'B532 Median'))
MATLAB displays
b532MedCol =
16
Extract that column from the field Data.
b532Data = wt.Data(:,b532MedCol);
Use the field Indices to index into the Data.
figure
subplot(1,2,1);
imagesc(b532Data(wt.Indices))
axis image
colorbar
title('B532 Median')
MATLAB plots the image.
Bound the intensities of the background plot to give more contrast in the image.
maskedData = b532Data;
maskedData(b532Data<500) = 500;
maskedData(b532Data>2000) = 2000;
subplot(1,2,2);
imagesc(maskedData(wt.Indices))
axis image
colorbar
title('Enhanced B532 Median')
MATLAB plots the images.
| Exploring the Microarray Data Set | Statistics of the Microarrays | ![]() |
© 1994-2005 The MathWorks, Inc.