无法在aheatmap中调整行标签的大小

时间:2015-04-16 14:48:29

标签: r label heatmap

我正在尝试使用NMF包中的aheatmap函数创建热图。以下是我的数据框的详细信息:

> dim(mirs)
[1] 249  10

> dput(head(mirs))
structure(list(Ctrl.1 = c(6.16181305031523, 7.1487208026042, 
5.62305791288953, 6.48859753175019, 5.86448920099041, 7.54685590953394
), Ctrl.1 = c(6.01374431772049, 6.72364369422584, 5.94212799544158, 
6.49697673701072, 6.27001491471232, 7.34423932678338), Ctrl.1 = c(6.08391877575544, 
6.39383949993274, 5.9014256751437, 6.25322722017054, 6.02433921913527, 
7.46048761260105), Ctrl.2 = c(6.05861842019582, 7.13778005751039, 
6.07807310866636, 6.27799281508687, 5.9134130919514, 7.63249818573085
), Ctrl.3 = c(6.08966189744544, 7.50580543734962, 6.22308072664994, 
6.50948356694844, 5.85467671344847, 7.69872387512424), KO.1 = c(6.01642055995834, 
7.40800030898938, 5.76546680318882, 6.61403760055652, 5.94451005808497, 
7.24179808413933), KO.1 = c(6.14954015244869, 7.35556286637155, 
5.97997384889883, 6.63097271768056, 6.00315186944306, 7.4492860653164
), KO.1 = c(5.94805813320882, 6.84281163223775, 5.80410165075893, 
6.34540217272193, 5.75166634057481, 7.47062580379961), KO.2 = c(5.97334370529652, 
7.41685185578274, 6.09298712573127, 6.14896460752862, 6.03396383178639, 
7.41543958735736), KO.3 = c(6.23339353310102, 7.8101475680467, 
5.89241431063385, 6.35967585549527, 5.87334378152986, 7.62655831252478
)), .Names = c("Ctrl.1", "Ctrl.1", "Ctrl.1", "Ctrl.2", "Ctrl.3", 
"KO.1", "KO.1", "KO.1", "KO.2", "KO.3"), row.names = c(24L, 29L, 
243L, 290L, 309L, 499L), class = "data.frame")

> aheatmap(x = as.matrix(mirs), scale = 'row', distfun = dist2, legend = F, fontsize = 12, cexRow = .9, cexCol = .9, main = 'miRNA Expression Profile (n=249)', filename = 'plot.pdf', width = 5, height = 10)

有249行&我的数据中有10列,但我只显示了使用head的顶行。当我更改 fontsize 时,列标签会相应地调整大小,但问题是行标签没有。无论我多少增加fontsize或cexRow值,它们在pdf中看起来都很小。有人可以建议如何增加行标签的大小?随附的是我的情节&正如你所看到的,我对cexRow&使用了相同的值。 cexCol但与col标签相比,行标签非常小。

enter image description here

1 个答案:

答案 0 :(得分:0)

行标签的计算字体大小确实存在问题。 这已经修复了。 请参阅:https://github.com/renozao/NMF/issues/38

以下内容应为您提供与height一起增加的行标签:

aheatmap(x = as.matrix(dat), scale = 'row', legend = F
        , main = 'Heatmap', filename = 'plot.pdf'
        , width = 5, height = 10) 
相关问题