# 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](../../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.
