| Bioinformatics Toolbox | ![]() |
Create dendrogram and heat map
clustergram(Data, 'PropertyName', PropertyValue...) clustergram(..., 'RowLabels', RowLabelsValue) clustergram(..., 'ColumnLabels', ColumnLabelsValue) clustergram(..., 'Pdist', PdistValue) clustergram(..., 'Linkage', LinkageValue) clustergram(..., 'Dendrogram', DendrogramValue) clustergram(..., 'ColorMap', ColorMapValue) clustergram(..., 'SymmetricRange', SymmetricRangeValue) clustergram(..., 'Dimension', DimensionValue) clustergram(..., 'Ratio', RatioValue)
Data | Matrix where each row corresponds to a gene. Each column is the result from one experiment. |
RowLabels | Property to label the rows in Data.ColLabels Enter a cell array of text strings. |
ColumnLabels | Property to label the columns in Data. For example, you can enter the names of the genes. Enter a cell array of text strings. |
Pdist | Property to pass arguments to the function pdist. |
Linkage | Property to pass arguments to the function linkage. |
Dendrogram | Property to pass arguments to the function dendrogram. |
| ColorMap | Property to select a colormap. Enter the name or function handle of a function that returns a colormap, or an M-by-3 array containing RGB values. The default value is REDGREENCMAP. |
| SymmetricRange | Property to force the color range to be symmetric around zero. Enter either true or false. The default value is true. |
| Dimension | Property to select either a one-dimensional or two-dimensional clustergram. Enter either 1 or 2. The default value is 1. |
| Ratio | Property to specify the ratio of the space that the dendrogram(s) uses. |
clustergram(Data, 'PropertyName', PropertyValue...) creates a dendrogram and heat map from gene expression data (Data) using hierarchical clustering with correlation as the distance metric and using average linkage to generate the hierarchical tree. The clustering is performed on the rows of Data. The rows of Data are typically genes and the columns are the results from different microarrays. To cluster the columns instead of the rows, transpose the data using the transpose (') operator.
clustergram(...,'RowLabels', RowLabelsValue) uses the contents of a cell array (RowLabels) as labels for the rows in Data.
clustergram(...,'ColumnLabels', ColumnLabelsValue) uses the contents of a cell array (ColumnLabels) as labels for the columns in Data.
clustergram(...,'Pdist', PdistValue) sets the distance metric the function pdist uses to calculate the pairwise distances between observations. If the distance metric requires extra arguments, then pass the arguments as a cell array. For example, to use the Minkowski distance with exponent P you the help for the Statistical Toolbox function pdist. The default distance metric for a clustergram is 'correlation'.
clustergram(..., 'Linkage', LinkageValue) selects the linkage method the function linkage uses to create the hierarchical cluster tree. For more information about the available options, see the help for the Statistical Toolbox function linkage. The default linkage method used by clustergram is 'average'.
clustergram(..., 'Dendrogram', DendrogramValue) passes arguments the function dendrogram uses to create a dendrogram. Dendrogram should be a cell arrays of parameter name/value pairs that can be passed to dendrogram. For more information about the available options, see the help for the Statistical Toolbox function dendrogram .
clustergram((..., 'ColorMap', ColorMapValue) specifies the colormap that is used for the figure containing the clustergram. This controls the colors used to display the heat map.
clustergram(..., 'SymmetricRange', SymmetricRangeValue), when SymmetricRange is false, disables the default behavior of forcing the color scale of the heat map to be symmetric about zero.
clustergram(..., 'Dimension', DimensionValue) specifies whether to create a one-dimensional or two-dimensional clustergram. The one-dimensional clustergram clusters the rows of the data. The two-dimensional clustergram creates the one-dimensional clustergram, and then clusters the columns of the row-clustered data.
clustergram(..., 'Ratio', RatioValue) specifies the ratio of the space that the dendrogram(s) uses, relative to the size of the heat map, in the X and Y directions. If Ratio is a single scalar value, it is used as the ratio for both directions. If Ratio is a two-element vector, the first element is used for the X ratio, and the second element is used for the Y ratio. The Y ratio is ignored for one-dimensional clustergrams. The default ratio is 1/5.
Hold the mouse button down over the image to see the exact values at a particular point.
load filteredyeastdata;
clustergram(yeastvalues);
% Add some labels.
clustergram(yeastvalues,'ROWLABELS',genes,'COLUMNLABELS',times);
% Change the clustering parameters.
clustergram(yeastvalues,'PDIST','euclidean','LINKAGE','complete');
% Change the dendrogram color parameter.
clustergram(yeastvalues,'ROWLABELS',genes,'DENDROGRAM',{'color',5});
Statistics Toolbox functions cluster, dendrogram, linkage, pdist
| cleave | codoncount | ![]() |
© 1994-2005 The MathWorks, Inc.