Question: Heatmap of Distance Clusters
0
gravatar for genome_man
4 months ago by
genome_man10
genome_man10 wrote:

I want to create a heatmap of my different gene clusters pairwise distance relationship. The table I get is like the one below. So far, using ggplot2, I can only find methods like stat_density2d and geom_tile, which only work for displaying point density and representing evenly spaced points. I have also tried the heatmap() and heatmap.2() functions but have not been successful.

My DataFrame

data=data.frame(x=c(1,1,2,2,3,4,5,6,7,7,8,9),
y=c(2,4,5,1,3,8,4,8,1,1,6,9),
distance=c(66,84,93,76,104,29,70,19,60,50,46,36),
association = c("Positive", "Negative","Positive","Negative","Negative",
"Negative","Positive","Random","Random","Random","Positive","Positive"))

I want to create a color coded heatmap that has it's intensity based on the distance metric between x and y. Additionally I would like to annotate my labels based on my

enter image description here

or a heatmap like the one below: enter image description here

heatmap dataframe ggplot2 R • 184 views
ADD COMMENTlink modified 3 months ago by N15120 • written 4 months ago by genome_man10
1
gravatar for ATpoint
4 months ago by
ATpoint36k
Germany
ATpoint36k wrote:

Use https://jokergoo.github.io/ComplexHeatmap-reference/book/. Offers extensive code examples, highly recommended tool.

ADD COMMENTlink written 4 months ago by ATpoint36k
0
gravatar for N15
3 months ago by
N15120
N15120 wrote:

pheatmap allows euclidean distance clusters among rows/columns

https://davetang.org/muse/2018/05/15/making-a-heatmap-in-r-with-the-pheatmap-package/

ADD COMMENTlink modified 3 months ago • written 3 months ago by N15120
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1380 users visited in the last hour