2015-04-16 19 views
0

我正嘗試使用NMF包中的aheatmap函數創建一個heatmap。下面是我的數據幀的細節:無法調整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列,但我已經證明只能用頭頂行。當我更改fontsize時,列標籤會相應地調整大小,但問題在於行標籤沒有。無論增加字體大小或cexRow值,它們在pdf中看起來都很小。有人可以建議如何增加行標籤的大小?附加是我的陰謀&,你可以看到我已經使用cexRow & cexCol相同的值,但行標籤與col標籤相比非常小。

enter image description here

回答

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)