Main Content

mairplot

Create intensity versus ratio scatter plot of microarray data

Syntax

mairplot(DataX, DataY)
[Intensity, Ratio] = mairplot(DataX, DataY)
[Intensity, Ratio, H] = mairplot(DataX, DataY)
... = mairplot(..., 'Type', TypeValue, ...)
... = mairplot(..., 'LogTrans', LogTransValue, ...)
... = mairplot(..., 'FactorLines', FactorLinesValue, ...)
... = mairplot(..., 'Title', TitleValue, ...)
... = mairplot(..., 'Labels', LabelsValue, ...)
... = mairplot(..., 'Normalize', NormalizeValue, ...)
... = mairplot(..., 'LowessOptions', LowessOptionsValue, ...)
... = mairplot(..., 'Showplot', ShowplotValue, ...)
... = mairplot(..., 'PlotOnly', PlotOnlyValue, ...)

Input Arguments

DataX, DataYDataMatrix object or vector of gene expression values where each row corresponds to a gene. For example, in a two-color microarray experiment, DataX could be cy3 intensity values and DataY could be cy5 intensity values.
TypeValueCharacter vector or string that specifies the plot type. Choices are 'IR' (plots log10 of the product of the DataX and DataY intensities versus log2 of the intensity ratios ) or 'MA' (plots (1/2)log2 of the product of the DataX and DataY intensities versus log2 of the intensity ratios). Default is 'IR'.
LogTransValueControls the conversion of data in X and Y from natural scale to log2 scale. Set LogTransValue to false, when the data is already log2 scale. Default is true, which assumes the data is natural scale.
FactorLinesValueAdds lines to the plot showing a factor of N change. Default is 2, which corresponds to a level of 1 and -1 on a log2 scale.

Tip

You can also change the factor lines interactively, after creating the plot.

TitleValueCharacter vector or string that specifies a title for the plot.
LabelsValueCell array of character vectors or string vector containing labels for the data. If labels are defined, then clicking a point on the plot shows the label corresponding to that point.
NormalizeValueControls the display of lowess normalized ratio values. Enter true to display to lowess normalized ratio values. Default is false.

Tip

You can also normalize the data from the MAIR Plot window, after creating the plot.

LowessOptionsValueCell array of one, two, or three property name/value pairs in any order that affect the lowess normalization. Choices for property name/value pairs are:
  • 'Order', OrderValue

  • 'Robust', RobustValue

  • 'Span', SpanValue

For more information on the preceding property name/value pairs, see malowess.

ShowplotValueControls the display of the scatter plot. Choices are true (default) or false.
PlotOnlyValue

Controls the display of the scatter plot without user interface components. Choices are true or false (default).

Note

If you set the 'PlotOnly' property to true, you can still display labels for data points by clicking a data point, and you can still adjust the horizontal fold change lines by click-dragging the lines.

Output Arguments

IntensityDataMatrix object or vector containing intensity values for the microarray gene expression data, calculated as:
  • log10 of the product of the DataX and DataY intensities (when Type is 'IR')

  • (1/2)log2 of the product of the DataX and DataY intensities (when Type is 'MA')

Note

If DataX or DataY is a DataMatrix object, then Intensity is also a DataMatrix object with the same properties.

RatioDataMatrix object or vector containing ratios of the microarray gene expression data, calculated as log2(DataX./DataY).

Note

If DataX or DataY is a DataMatrix object, then Ratio is also a DataMatrix object with the same properties.

HHandle of the plot.

Description

mairplot(DataX, DataY) creates a scatter plot that plots log10 of the product of the DataX and DataY intensities versus log2 of the intensity ratios.

[Intensity, Ratio] = mairplot(DataX, DataY) returns the intensity and ratio values. If you set 'Normalize' to true, the returned ratio values are normalized.

[Intensity, Ratio, H] = mairplot(DataX, DataY) returns the handle of the plot.

... = mairplot(..., 'PropertyName', PropertyValue, ...) calls mairplot 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:

... = mairplot(..., 'Type', TypeValue, ...) specifies the plot type. Choices are 'IR' (plots log10 of the product of the DataX and DataY intensities versus log2 of the intensity ratios ) or 'MA' (plots (1/2)log2 of the product of the DataX and DataY intensities versus log2 of the intensity ratios). Default is 'IR'.

... = mairplot(..., 'LogTrans', LogTransValue, ...) controls the conversion of data in X and Y from natural to log 2 scale. Set LogTransValue to false, when the data is already log 2 scale. Default is true, which assumes the data is natural scale.

... = mairplot(..., 'FactorLines', FactorLinesValue, ...) adds lines to the plot showing a factor of N change. Default is 2, which corresponds to a level of 1 and -1 on a log2 scale.

Tip

You can also change the factor lines interactively, after creating the plot.

... = mairplot(..., 'Title', TitleValue, ...) specifies a title for the plot.

... = mairplot(..., 'Labels', LabelsValue, ...) specifies a cell array of character vectors or string vector of labels for the data. If labels are defined, then clicking a point on the plot shows the label corresponding to that point.

... = mairplot(..., 'Normalize', NormalizeValue, ...) controls the display of lowess normalized ratio values. Enter true to display to lowess normalized ratio values. Default is false.

Tip

You can also normalize the data from the MAIR Plot window, after creating the plot.

... = mairplot(..., 'LowessOptions', LowessOptionsValue, ...) lets you specify up to three property name/value pairs (in any order) that affect the lowess normalization. Choices for property name/value pairs are:

  • 'Order', OrderValue

  • 'Robust', RobustValue

  • 'Span', SpanValue

For more information on the previous three property name/value pairs, see the malowess function.

... = mairplot(..., 'Showplot', ShowplotValue, ...) controls the display of the scatter plot. Choices are true (default) or false.

... = mairplot(..., 'PlotOnly', PlotOnlyValue, ...) controls the display of the scatter plot without user interface components. Choices are true or false (default).

Note

If you set the 'PlotOnly' property to true, you can still display labels for data points by clicking a data point, and you can still adjust the horizontal fold change lines by click-dragging the lines.

Following is an IR plot of normalized data.

Following is an MA plot of unnormalized data.

The intensity versus ratio scatter plot displays the following:

  • log10 (Intensity) versus log2 (Ratio) scatter plot of genes.

  • Two horizontal fold change lines at a fold change level of 2, which corresponds to a ratio of 1 and –1 on a log 2 (Ratio) scale. (Lines will be at different fold change levels, if you used the 'FactorLines' property.)

  • Data points for genes that are considered differentially expressed (outside of the fold change lines) appear in orange.

After you display the intensity versus ratio scatter plot, you can interactively do the following:

  • Adjust the horizontal fold change lines by click-dragging one line or entering a value in the Fold Change text box, then clicking Update.

  • Display labels for data points by clicking a data point.

  • Select a gene from the Up Regulated or Down Regulated list to highlight the corresponding data point in the plot. Press and hold Ctrl or Shift to select multiple genes.

  • Zoom the plot by selecting Tools > Zoom In or Tools > Zoom Out.

  • View lists of significantly up-regulated and down-regulated genes, and optionally, export the gene labels and indices to a structure in the MATLAB® Workspace by clicking Export.

  • Normalize the data by clicking the Normalize button, then selecting whether to show the normalized plot in a separate window. If you show the normalized plot in a separate window, the Show smooth curve check box becomes available in the original (unnormalized) plot.

    Tip

    To select different lowess normalization options before normalizing, select Tools > Set LOWESS Normalization Options, then enter options in the Options for LOWESS dialog box.

Examples

  1. Use the gprread function to create a structure containing microarray data.

    maStruct = gprread('mouse_a1wt.gpr');
  2. Use the magetfield function to extract the green (cy3) and red (cy5) signals from the structure.

    cy5data = magetfield(maStruct,'F635 Median');
    cy3data = magetfield(maStruct,'F532 Median');
  3. Create an intensity versus ratio scatter plot of the cy3 and cy5 data. Normalize the data and add a title and labels:

    mairplot(cy5data, cy3data, 'Normalize', true, ...
    				'Title','Normalized R vs G IR plot', ...
    				'Labels', maStruct.Names)

  4. Return intensity values and ratios without displaying the plot.

    [intensities, ratios] = mairplot(cy5data, cy3data, 'Showplot', false);
  5. Create a normalized MA plot of the cy3 and cy5 data without the user interface components.

    mairplot(cy5data, cy3data, 'Normalize', true, ...
    				'Type','MA','PlotOnly',true)

References

[1] Quackenbush, J. (2002). Microarray Data Normalization and Transformation. Nature Genetics Suppl. 32, 496–501.

[2] Dudoit, S., Yang, Y.H., Callow, M.J., and Speed, T.P. (2002). Statistical Methods for Identifying Differentially Expressed Genes in Replicated cDNA Microarray Experiments. Statistica Sinica 12, 111–139.

Version History

Introduced before R2006a