This is a test version of Biostars. For the public version, visit https://www.biostars.org.
pheatmap cell notes

Dear All, would you please suggest me any method to integrate cell note function like in heatmap.2 function with pheatmap? I trying to make heatmap with pvalues as cell notes with pheatmap but it does not support cell not function. Is there any way out? Please see below example of heatmap i required. Thanks enter image description here

r

would these numbers be different from the ones in the matrix that is the basis of the actual heatmap? (if you wanted to display the numbers from the underlying matrix, display_numbers = TRUE should do the trick.)

Thanks! Yes that is different information. Display_numbers=TRUE will display only values (regression/correlation) values on which heatmap is based as you said. I have similar matrix with exact dimention but sort of quantitative annotation for each cell.

2 answers

Although it's not well documented, after a hard look at the pheatmap code I realized you could probably just supply a matrix of any values, too. And, indeed, that works:

test_vals <- matrix(rnorm(20), 5, 4)
test_labels <- matrix(1:20, 5, 4) 
pheatmap(test_vals, display_numbers = test_labels)

enter image description here

Log in to answer this question.