Cannot resize rowlabels in aheatmap
0
0
Entering edit mode
3.1 years ago
shaden ▴ 20

Hi, I am drawing a heatmap for the top 50 DEgenes in my matrix using this code:

aheatmap(highly_variable_lcpm,col=rev(morecols(50)),main="Top 50 most variable genes",annCol=metadata[, 2:3],labCol=metadata$`sample name`, 
         scale="row", width = 5, height = 10, cexRow = 5)

I am having difficulty resizing the gene names, they are very small barely readable. I have tried using only 30 genes but they are still small. resetting the cexRow to new values does not seem to change anything at all. I have also tried what is suggested elsewhere:(width = 5, height = 10) but it also changes nothing!

Is there another way to make labels larger?

Thanks!

clustering aheatmap R • 2.3k views
ADD COMMENT
0
Entering edit mode

I have never used aheatmap, but looking to the documentation, it seems that it's just like pheatmap. If your gene names are in the rows, I think playing with fontsize_row would help making the labels larger if I understood you correctly.

ADD REPLY
0
Entering edit mode

Hi, unfortunately it's not like pheatmap

fontsize_row is not an argument in aheatmap

ADD REPLY
0
Entering edit mode

Did you try to set the fontsize_row to some bugger value? `

ADD REPLY
0
Entering edit mode

Hi, fontsize_row is not an argument in aheatmap

"unused argument (fontsize_row = 5)"

ADD REPLY
0
Entering edit mode

Ok, seems like there are different packages for aheatmap and you are using aheatmap from NMF pkg

https://rdrr.io/github/nickytong/GenAnalysis/man/aheatmap.html

If yes, then the documentation says

fontsize base fontsize for the plot

cexRow fontsize for the rownames, specified as a fraction of argument fontsize.

cexCol fontsize for the colnames, specified as a fraction of argument fontsize.

So you first need to set a bigger fontsize and then set cexRow as a fraction of the fontsize set earlier

ADD REPLY
0
Entering edit mode

Yeah I have read this but what does it mean " set cexRow as a fraction of the fontsize set earlier"? I have tried (fontsize = 9, cexRow = 8) for example. The fontsize changes the outside stuff (title for example) , ceXRow does not affect anything all values look the same.

ADD REPLY
0
Entering edit mode

try the value of cexRow between 0 and 1, and play with fontsize value (try 2-3 higher values)

ADD REPLY

Login before adding your answer.

Traffic: 1467 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6