Main Content

clusterGroup

Select cluster group

Description

example

clusterGroup(cgObj1,groupIndex,dim) selects and highlights the cluster group specified by groupIndex along the row or column dimension dim in the Clustergram window.

example

cgObj2 = clusterGroup(cgObj1,groupIndex,dim) creates and returns the clustergram object cgObj2 for the specified cluster group. This syntax is equivalent to selecting the Export Group to Workspace option from the context menu after right-clicking a group in the Clustergram window.

cgObj2 = clusterGroup(cgObj1,groupIndex,dim,'InfoOnly',tf_InfoOnly) specifies whether to return the cluster group as a structure or a clustergram object.

cgObj2 = clusterGroup(cgObj1,groupIndex,dim,'Color',colorChoice) specifies the color to use to highlight the dendrogram of the selected cluster group.

Examples

collapse all

Load microarray data containing some measurements of gene expression levels.

load filteredyeastdata

Create a clustergram object and display a heatmap from the gene expression data.

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

From the command line, use the clusterGroup function to select and highlight the Group 4 column cluster in the Clustergram window.

cgroup4 = clusterGroup(cgo,4,'column')
Clustergram object with 30(30) rows of nodes and 4(7) columns of nodes.

Input Arguments

collapse all

Clustergram object, specified as a clustergram object.

Group index for a cluster group in cgObj1, specified as a positive integer.

Example: 4

Data Types: double

Dimension of the cluster group, specified as 'row' or 'column'.

Example: 'row'

Data Types: char

Flag to return a structure instead of a clustergram object, specified as true or false.

Example: true

Data Types: logical

Color to highlight the dendrogram of the selected cluster group, specified as a character vector or three-element numeric vector of RGB values. For example, to use cyan, specify [0 1 1], 'c', or 'cyan'.

For more information on specifying colors, see Color Options.

Example: 'red'

Data Types: double | char

Output Arguments

collapse all

Selected cluster group, returned as a clustergram object or structure. If you specify 'InfoOnly' as true, the function returns cgObj2 as a structure.

More About

collapse all

Color Options

The following lists the predefined colors and their RGB triplet equivalents. The short names and long names are character vectors that specify one of eight preset colors. The RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color; the intensities must be in the range [0 1].

RGB Triplet

Short Name

Long Name

[1 1 0]

y

yellow

[1 0 1]

m

magenta

[0 1 1]

c

cyan

[1 0 0]

r

red

[0 1 0]

g

green

[0 0 1]

b

blue

[1 1 1]

w

white

[0 0 0]

k

black

Introduced in R2009b