相关文章推荐
精彩文章免费看

【pheatmap热图scale报错】Error in hclust(d, method = method):NA/NaN/Inf in foreign function call (arg 11)

初始数据类似如下:

直接取log绘制不报错,但做 scale 时报错:

Error in hclust(d, method = method) : 
  NA/NaN/Inf in foreign function call (arg 11)

原因是数据中有标准差sd为0的行,做归一化时报错。pheatmap中做归一化采用的是scale方法:

https://stackoverflow.com/questions/30350438/pheatmap-scale-row-giving-error-in-hclustd-method-method-na-nan-inf-in
https://zhuanlan.zhihu.com/p/30518877

 
推荐文章