小编Sam*_*gen的帖子

pheatmap 默认距离度量 R

我需要使用“pheatmap”函数制作热图,使用 UPGMA 和 1-pearson 相关性作为距离度量。我的教授声称这是默认的距离度量,尽管在我的例子中它使用“欧几里德”作为距离度量。欧几里得和 1 - 皮尔逊相关性相同还是他错了?如果他错了,我如何为我的热图使用正确的距离度量?

我的意见

ph=pheatmap(avgreltlog10, color = colorRampPalette(rev(brewer.pal(n = 7, 
name = "RdYlBu")))(100), 
kmeans_k = NA, breaks = NA, border_color = "grey60",
cellwidth = 10, cellheight=10, scale = "none", cluster_rows=TRUE,
clustering_method = "average", cutree_rows = 4, cutree_cols= 2,)
Run Code Online (Sandbox Code Playgroud)

R输出

$tree_row

Call:
hclust(d = d, method = method)

Cluster method   : average 
Distance         : euclidean 
Number of objects: 65 


$tree_col

Call:
hclust(d = d, method = method)

Cluster method   : average 
Distance         : euclidean 
Number of …
Run Code Online (Sandbox Code Playgroud)

r distance metric pheatmap

4
推荐指数
1
解决办法
4847
查看次数

标签 统计

distance ×1

metric ×1

pheatmap ×1

r ×1