This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cut one subcluster from heatmap and then paste it using R

Hello Sir/madam,

I have total 304 DEG and i have clustered them using hclust and heatmap.2 is used to plot the heatmap. heatmap so this heatmap I have, contains Upper right side block as down regulated genes in cancer (green), lower right side block as up regulated genes in cancer (red).

  1. I want to cut only the lower right side block and then paste that block separately and also want to show the gene symbols to the side of heatmap.

I have refereed to the ComplexHeatmap, for split function.

  1. How to cut this red block using R and then paste it separately. without changing the cluster pattern which i have observed in the heatmap ? (no reclustering)

A sample R code will be helpful.

Thank you so much in advance.

r heatmap clustering

Related post: A: extraction of subcluster from a hclust object in the form of matrix to plot a he

If you literally just want to keep the right side block in its current form, then literally just edit the figure in a graphics editor. You could, for example, shade over the part of the heatmap in which you are not interested, and/or highlight the interesting part with a red box.

There does not have to be code for everything, of course.

0 answers

No answers yet.

Log in to answer this question.