0

I have two lists of p-values (~ 1000 rows in a data.frame of two columns) whose distribution is highly skewed towards significant p-values. Here the output of quantile and additional information that could be useful.

      0%             25%           50%           75%          100%           
 2.700000e-163   2.715000e-30  5.380000e-09  4.384107e-02  1.000000e+00

  min(list_pVal1= 3.77e-146)
  max(list_pVal1= 1)
  median(list_pVal1= 1.11e-06)


  min(list_pVal2= 2.7e-163)
  max(list_pVal2= 1)
  median(list_pVal2= 2.16e-10)

Around 20% of values in each list are >0.05. I would like to plot a heatmap of the data. Since the p-values of my interest are the non significant ones I would like to highlight them in the heatmap. However they are few and hence they are "masked" (i.e.they are a narrow bar in the figure) because of the high amount of significant values. I already tried to transform the p-value using the log(p-value) but this does not solve the problem because it depends on the size (number) of not-significant p-values. How can I solve this problem?

Thank you in advance

NewUsr_stat
  • 2,351
  • 5
  • 28
  • 38
  • 1
    When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. You also need to be much more specific about what you want to do so we know when an answer solves the problem. – MrFlick Mar 12 '18 at 18:01
  • Just edited hoping it could be better. – NewUsr_stat Mar 12 '18 at 18:12

1 Answers1

1

You could do something like this.

m <- matrix(rnorm(200), ncol = 10)
mp <- matrix("", nrow=nrow(m), ncol=ncol(m))
mp[m>1] <- "*"

gplots::heatmap.2(m, trace="none", cellnote = mp, notecol="black")

enter image description here

emilliman5
  • 5,816
  • 3
  • 27
  • 37