| Bioinformatics Toolbox™ | ![]() |
get(CGobj)
CGStruct = get(CGobj)
PropertyValue =
get(CGobj, 'PropertyName')
[Property1Value, Property2Value,
...] = get(CGobj, 'Property1Name',
'Property2Name', ...)
| CGobj | Clustergram object created with the function clustergram. |
| PropertyName | Property name for a clustergram object. |
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
| Property | Description |
|---|---|
| RowLabels | Vector 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. |
| ColumnLabels | Vector 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. |
| RowGroupNames | A 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. |
| RowNodeNames | A 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. |
| ColumnGroupNames | A 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. |
| ColumnNodeNames | A 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. |
| ExprValues | An 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:
|
| Cluster | Text string that specifies the dimension for clustering the values in the data. Possibilities are:
|
| 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. |
| Linkage | String 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. |
| Dendrogram | Scalar 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. |
| OptimalLeafOrder | Property 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). |
| LogTrans | Controlled the log2 transform of the data from natural scale. Possibilities are 1 (true) or 0 (false). |
| ColorMap | Either of the following:
|
| 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. |
| SymmetricRange | Property 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:
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:
|
| 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:
|
| 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:
|
Load the MAT-file, provided with the Bioinformatics Toolbox™ software, that contains yeastvalues, a matrix of gene expression data.
load filteredyeastdata
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.
cgo = clustergram(yeastvalues(1:30,:)) Clustergram object with 30 rows of nodes and 7 columns of nodes.

Use the get method to display the properties of the clustergram object, cgo.
get(cgo)
RowLabels: {30x1 cell}
ColumnLabels: {7x1 cell}
Standardize: {'ROW (2)'}
Cluster: {'ALL (3)'}
RowPDist: {'Euclidean'}
ColumnPDist: {'Euclidean'}
Linkage: {'Average'}
Dendrogram: {[0]}
OptimalLeafOrder: 1
LogTrans: 0
Colormap: [11x3 double]
DisplayRange: 3
SymmetricRange: 1
Ratio: [0.2000 0.2000]
Impute: []
RowMarkers: []
ColumnMarkers: []Export a clustergram object of a group (cluster) of rows to the MATLAB® Workspace by right-clicking a node in the row dendrogram, and then selecting Export Group to Workspace.

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

Use the get method to display the properties of cgo2, the clustergram object of the exported group.
get(cgo2)
RowGroupNames: {8x1 cell}
RowNodeNames: {9x1 cell}
ColumnGroupNames: {6x1 cell}
ColumnNodeNames: {7x1 cell}
ExprValues: [9x7 double]
Standardize: {'ROW (2)'}
Cluster: {'ALL (3)'}
RowPDist: {'Euclidean'}
ColumnPDist: {'Euclidean'}
Linkage: {'Average'}
Dendrogram: {[0]}
OptimalLeafOrder: 1
LogTrans: 0
Colormap: [11x3 double]
DisplayRange: 3
SymmetricRange: 1
Ratio: [0.2000 0.2000]
Impute: []
RowMarkers: []
ColumnMarkers: []Bioinformatics Toolbox function: clustergram (object constructor)
Bioinformatics Toolbox object: clustergram object
Bioinformatics Toolbox methods of a clustergram object: plot, set, view
![]() | dolayout (biograph) | get (phytree) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |