# Generating a hierarchical clustering heatmap

To check how well our list of differentially expressed genes distinguishes one treatment group from another, we can perform hierarchical clustering based on the gene list. Clustering can also be used to discover novel groups within your data set, identify gene expression signatures distinguishing groups of samples, and to identify genes with similar patterns of gene expression across samples.

* Click the **Filtered feature list** data node
* Click **Exploratory analysis in** the task menu
* Click **Hierarchical clustering** (Figure 1)

![Figure 1. Invoking Hierarchical clustering task](https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-28247488c0dc1257872a307217e97d42cee5113b%2Fbulk%20seq%20tut%20que%20heatmap%20task.png?alt=media)

The *Hierarchical clustering* menu will open (Figure 2). Hierarchical clustering can be performed with a heatmap or bubble map plot. **Cluster** must be selected under *Ordering* for both *Feature order* and *Sample order* if both the features (columns) and samples (rows) are to be clustered.

![Figure 2. Configuring Hierarchical clustering](https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-16ac0d09726f636f3be51242733f22ae5d01f91a%2Fheatmap%20task%20set%20up.png?alt=media)

* Click **Finish** to run with default settings

A *Hierarchical clustering* task node will be added to the pipeline (Figure 3).

![Figure 3. Hierarchical clustering task node](https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-e7795006ba0195536538a49c4ecd914b016d4ba3%2Fbulk%20seq%20tut%20heatmap%20output%20task%20graph.png?alt=media)

* Double-click the **Hierarchical clustering / heatmap** task node to view the heatmap

The *Dendrogram view* will open showing a heatmap with the hierarchical clustering results (Figure 4).

![Figure 4. Viewing the hierarchical clustering heatmap](https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-008de223e6432bf5ee0d4356ad8a579db6ec64a1%2Fbulk%20seq%20tut%20heatmap%20defualt%20output.png?alt=media)

Samples are shown on rows and genes on columns. Clustering for samples and genes is shown through the dendrogram trees. More similar samples/genes are separated by fewer branch points of the dendrogram tree.

The heatmap displays standardized expression values with a mean of zero and standard deviation of one.

The heatmap can be customized to improve data visualization using the menu on the *Configuration* panel on the left.

* Click *Annotations* under *Configure* section in the left panel
* Select **5-AZA Dose** from *Row annotation* drop-down
* Click *Axes* under *Configure*
* Change *Column labels* **Feature** to gene\_name using the drop-down

Samples are now labeled with their *5-AZA Dose* group and column labels are Gene names (Figure 5).

<figure><img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-dcc56acc5e365f51a361d62545d8413c3c66d8b1%2Fbulk%20seq%20tut%20heatmap%20adjusted%20image.png?alt=media" alt=""><figcaption><p><em>Figure 5. Samples labeled with their 5-AZA Dose group</em></p></figcaption></figure>

Samples from the 5μM and 10μM groups are more similar to each other than to the 0μM group.

We can save the heatmap as a publication-quality image.

* Click the **Export image** icon in the top right corner of the plot <img src="https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-3b510f1f7e1013a6f66dcac2f72360665fe17651%2Fexport-image-icon.png?alt=media" alt="" data-size="original">
* Choose format, size and resolution in the *Export image* dialog (Figure 6)

![Figure 6. Choosing format, size and resolution for export](https://1384254481-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJVEESmJAPppJ3ijFq5aR%2Fuploads%2Fgit-blob-271077ec3471c0fec28a52d47b92100c3a8350af%2Fexport%20image%20dialog.png?alt=media)

* Click **Save**

The heatmap will be saved as a .png file and downloaded in your web browser.

For more information about hierarchical clustering and the *Dendrogram view*, please see the [Hierarchical Clustering](https://help.partek.illumina.com/partek-flow/user-manual/task-menu/exploratory-analysis/hierarchical-clustering) user guide.

## Additional Assistance

If you need additional assistance, please visit [our support page](http://www.partek.com/support) to submit a help ticket or find phone numbers for regional support.
