Quantcast

Documentation Center

  • Trial Software
  • Product Updates

get (clustergram)

Retrieve information about clustergram object

Syntax

get(CGobj)
CGStruct = get(CGobj)
PropertyValue = get(CGobj, 'PropertyName')
[Property1Value, Property2Value, ...] = get(CGobj, 'Property1Name', 'Property2Name', ...)

Arguments

CGobjClustergram object created with the function clustergram.
PropertyNameProperty name for a clustergram object.

Description

get(CGobj) displays all properties and their current values of CGobj, a clustergram object.

CGStruct = get(CGobj) returns all properties of CGobj, a clustergram object, to CGStruct, a scalar structure, in which each field name is a property of a clustergram object, and each field contains the value of that property.

PropertyValue = get(CGobj, 'PropertyName') returns the value of the specified property of CGobj, a clustergram object.

[Property1Value, Property2Value, ...] = get(CGobj, 'Property1Name', 'Property2Name', ...) returns the values of the specified properties of CGobj, a clustergram object.

Properties of a Clustergram Object

PropertyDescription
RowLabelsVector of numbers or cell array of text strings to label the rows in the dendrogram and heat map. Default is a vector of values 1 through M, where M is the number of rows in Data, the matrix of data used by the clustergram function to create the clustergram object.
ColumnLabelsVector of numbers or cell array of text strings to label the columns in the dendrogram and heat map. Default is a vector of values 1 through N, where N is the number of columns in Data, the matrix of data used by the clustergram function to create the clustergram object.
RowGroupNamesA cell array of text strings containing the names of the row groups exported to a clustergram object created using the Export Group to Workspace command in the Clustergram window.
RowNodeNamesA cell array of text strings containing the names of the row nodes exported to a clustergram object created using the Export Group to Workspace command in the Clustergram window.
ColumnGroupNamesA cell array of text strings containing the names of the column groups exported to a clustergram object created using the Export Group to Workspace command in the Clustergram window.
ColumnNodeNamesA cell array of text strings containing the names of the column nodes exported to a clustergram object created using the Export Group to Workspace command in the Clustergram window.
ExprValuesAn M-by-N matrix of data, where M and N are the number of row nodes and column nodes respectively, exported to a clustergram object created using the Export Group to Workspace command in the Clustergram window. If the matrix contains gene expression data, typically each row corresponds to a gene and each column corresponds to a sample.
Standardize

Text string that specifies the dimension for standardizing the values in the data. The standardized values are transformed so that the mean is 0 and the standard deviation is 1 in the specified dimension. Possibilities are:

  • 'column' or 1 — Standardize along the columns of data.

  • 'row' or 2 — Standardize along the rows of data.

  • 'none' or 3 (default) — Do not standardize.

Cluster

Text string that specifies the dimension for clustering the values in the data. Possibilities are:

  • 'Row (1)' — Clustered rows of data only.

  • 'Column (2)' — Clustered columns of data only.

  • 'All (3)' — Clustered rows of data, then cluster columns of row-clustered data.

RowPdist

String or cell array that specifies the distance metric and optional arguments passed to the pdist function (Statistics Toolbox™ software) used to calculate the pairwise distances between rows. For information on possibilities, see the pdist function.

ColumnPdist

String or cell array that specifies the distance metric and optional arguments passed to the pdist function (Statistics Toolbox software) used to calculate the pairwise distances between columns. For information on possibilities, see the pdist function.

LinkageString or two-element cell array of strings that specifies the linkage method passed to the linkage function (Statistics Toolbox software) used to create the hierarchical cluster tree for rows and columns. If a two-element cell array of strings, the first element is for linkage between rows, and the second element is for linkage between columns. For information on possibilities, see the linkage function.
DendrogramScalar or two-element numeric vector or cell array that specifies the 'colorthreshold' property passed to the dendrogram function (Statistics Toolbox software) used to create the dendrogram plot. If a two-element numeric vector or cell array, the first element is for the rows, and the second element is for the columns. For more information, see the dendrogram function.
OptimalLeafOrderProperty that enabled or disabled the optimal leaf ordering calculation, which determines the leaf order that maximizes the similarity between neighboring leaves. Possibilities are 1 (enabled) or 0 (disabled).
LogTransControlled the log2 transform of the data from natural scale. Possibilities are 1 (true) or 0 (false).
Colormap

Either of the following:

  • M-by-3 matrix of RGB values

  • Name or function handle of a function that returns a colormap, such as redgreencmap or redbluecmap

DisplayRange

Positive scalar that specifies the display range of standardized values.

For example, if you specify redgreencmap for the 'ColorMap' property, pure red represents values ≥ DisplayRange, and pure green represents values ≤ –DisplayRange.

SymmetricProperty to force the color scale of the heat map to be symmetric around zero. Possibilities are 1 (true) or 0 (false).
Ratio

Either of the following:

  • Scalar

  • Two-element vector

It specifies the ratio of space that the row and column dendrograms occupy relative to the heat map. If Ratio is a scalar, it is the ratio for both dendrograms. If Ratio is a two-element vector, the first element is for the ratio of the row dendrogram width to the heat map width, and the second element is for the ratio of the column dendrogram height to the heat map height. The second element is ignored for one-dimensional clustergrams.

Impute

Any of the following:

  • Name of a function that imputes missing data.

  • Handle to a function that imputes missing data.

  • Cell array where the first element is the name of or handle to a function that imputes missing data and the remaining elements are property name/property value pairs used as inputs to the function.

RowMarkers

Optional structure array for annotating the groups (clusters) of rows determined by the clustergram function. Each structure in the array represents a group of rows and contains the following fields:

  • GroupNumber — Number to annotate the row group.

  • Annotation — String specifying text to annotate the row group.

  • Color — String or three-element vector of RGB values specifying a color, which is used to label the row group. For more information on specifying colors, see colorspec. If this field is empty, default is 'blue'.

ColumnMarkers

Optional structure array for annotating groups (clusters) of columns determined by the clustergram function. Each structure in the array represents a group of rows and contains the following fields:

  • GroupNumber — Number to annotate the column group.

  • Annotation — String specifying text to annotate the column group.

  • Color — String or three-element vector of RGB values specifying a color, which is used to label the column group. For more information on specifying colors, see colorspec. If this field is empty, default is 'blue'.

Examples

  1. Load the MAT-file, provided with the Bioinformatics Toolbox™ software, that contains yeastvalues, a matrix of gene expression data.

    load filteredyeastdata
    
  2. Create a clustergram object and display the dendrograms and heat map from the gene expression data in the first 30 rows of the yeastvalues matrix and standardize along the rows of data.

    cgo = clustergram(yeastvalues(1:30,:),'Standardize', 'row')
    
    Clustergram object with 30 rows of nodes and 7 columns of nodes.

  3. Use the get method to display the properties of the clustergram object, cgo.

    get(cgo)
    
                     Cluster: 'ALL'
                    RowPDist: {'Euclidean'}
                 ColumnPDist: {'Euclidean'}
                     Linkage: {'Average'}
                  Dendrogram: {}
            OptimalLeafOrder: 1
                    LogTrans: 0
                DisplayRatio: [0.2000 0.2000]
              RowGroupMarker: []
           ColumnGroupMarker: []
              ShowDendrogram: 'on'
                 Standardize: 'ROW'
                   Symmetric: 1
                DisplayRange: 3
                    Colormap: [11x3 double]
                   ImputeFun: []
                ColumnLabels: {'2'  '1'  '3'  '4'  '5'  '7'  '6'}
                   RowLabels: {30x1 cell}
          ColumnLabelsRotate: 90
             RowLabelsRotate: 0
        ColumnLabelsLocation: 'bottom'
           RowLabelsLocation: 'right'
                    Annotate: 'off'
              AnnotPrecision: 2
                  AnnotColor: 'w'
           ColumnLabelsColor: []
              RowLabelsColor: []
           LabelsWithMarkers: 0
  4. Export a clustergram object of a group (Group 19) of rows to the MATLAB® Workspace by right-clicking a node in the row dendrogram, and then selecting Export Group to Workspace.

  5. In the Export to Workspace dialog box, type cgo2 for the Workspace variable name for the clustergram object, and then click OK.

  6. Use the get method to display the properties of cgo2, the clustergram object of the exported group.

    get(cgo2)
    
                     Cluster: 'ALL'
                    RowPDist: {'Euclidean'}
                 ColumnPDist: {'Euclidean'}
                     Linkage: {'Average'}
                  Dendrogram: {}
            OptimalLeafOrder: 1
                    LogTrans: 0
                DisplayRatio: [0.2000 0.2000]
              RowGroupMarker: []
           ColumnGroupMarker: []
              ShowDendrogram: 'on'
                 Standardize: 'ROW'
                   Symmetric: 1
                DisplayRange: 3
                    Colormap: [11x3 double]
                   ImputeFun: []
                ColumnLabels: {'2'  '1'  '3'  '4'  '5'  '7'  '6'}
                   RowLabels: {9x1 cell}
          ColumnLabelsRotate: 90
             RowLabelsRotate: 0
        ColumnLabelsLocation: 'bottom'
           RowLabelsLocation: 'right'
                    Annotate: 'off'
              AnnotPrecision: 2
                  AnnotColor: 'w'
           ColumnLabelsColor: []
              RowLabelsColor: []
           LabelsWithMarkers: 0

See Also

| | |

Was this topic helpful?