limma::topTable with adjust.method=NULL is not BH corrected (manual is inconsistent with behavior?)
1
0
Entering edit mode
ningyuan • 0
@ningyuan-23757
Last seen 13 months ago
Singapore

I called topTable with the following arguments:

orig <- fit_with_contrasts %>%
      topTable(n=Inf, coef=.contr, adjust.method=NULL)

The documentation says that 'A NULL value will result in the default adjustment method, which is "BH"' (limma 3.17 reference manual). So, I expect that the adj.P.Val is BH-adjusted. In actuality, it is holm/hochberg/hommel-adjusted.

orig <- select(P.Value, adj.P.Val)
> for (m in p.adjust.methods) orig[[m]] <- p.adjust(orig$P.Value, method=m); glimpse(orig)
Rows: 11,736
Columns: 10
$ P.Value    <dbl> 5.285413e-14, 5.358058e-14, 2.123710e-13, 2.471529e-13, 3.7...
$ adj.P.Val  <dbl> 6.202961e-10, 6.287681e-10, 2.491962e-09, 2.899845e-09, 4.4...
$ holm       <dbl> 6.202961e-10, 6.287681e-10, 2.491962e-09, 2.899845e-09, 4.4...
$ hochberg   <dbl> 6.202961e-10, 6.287681e-10, 2.491962e-09, 2.899845e-09, 4.4...
$ hommel     <dbl> 6.202432e-10, 6.287681e-10, 2.491537e-09, 2.899598e-09, 4.4...
$ bonferroni <dbl> 6.202961e-10, 6.288217e-10, 2.492386e-09, 2.900587e-09, 4.4...
$ BH         <dbl> 3.144108e-10, 3.144108e-10, 7.251467e-10, 7.251467e-10, 8.9...
$ BY         <dbl> 3.127657e-09, 3.127657e-09, 7.213523e-09, 7.213523e-09, 8.8...
$ fdr        <dbl> 3.144108e-10, 3.144108e-10, 7.251467e-10, 7.251467e-10, 8.9...
$ none       <dbl> 5.285413e-14, 5.358058e-14, 2.123710e-13, 2.471529e-13, 3.7...

This is probably because the default behavior for p.adjust when method=NULL is also holm/hochberg/hommel, not BH.

> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /data/behmoaras/home/e0175719/miniconda3/envs/xtlr7/lib/libopenblasp-r0.3.23.so;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_SG.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_SG.UTF-8        LC_COLLATE=en_SG.UTF-8    
 [5] LC_MONETARY=en_SG.UTF-8    LC_MESSAGES=en_SG.UTF-8   
 [7] LC_PAPER=en_SG.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_SG.UTF-8 LC_IDENTIFICATION=C       

time zone: Asia/Singapore
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] lubridate_1.9.2 forcats_1.0.0   stringr_1.5.0   dplyr_1.1.2    
 [5] purrr_1.0.2     readr_2.1.4     tidyr_1.3.0     tibble_3.2.1   
 [9] ggplot2_3.4.3   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] bit_4.0.5        gtable_0.3.4     compiler_4.3.1   crayon_1.5.2    
 [5] tidyselect_1.2.0 parallel_4.3.1   scales_1.2.1     R6_2.5.1        
 [9] generics_0.1.3   munsell_0.5.0    pillar_1.9.0     tzdb_0.4.0      
[13] rlang_1.1.1      utf8_1.2.3       stringi_1.7.12   bit64_4.0.5     
[17] timechange_0.2.0 cli_3.6.1        withr_2.5.0      magrittr_2.0.3  
[21] grid_4.3.1       vroom_1.6.3      hms_1.1.3        lifecycle_1.0.3 
[25] vctrs_0.6.3      glue_1.6.2       fansi_1.0.4      colorspace_2.1-0
[29] tools_4.3.1      pkgconfig_2.0.3
Bioconductor biocon limma • 1.2k views
ADD COMMENT
2
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

Yes, you're right, setting adjust.method=NULL for topTable does give Holm's method instead of BH, so the limma documentation is wrong in that respect. And you are also right that the adjust.method=NULL behaviour is determined by p.adjust().

I will fix the behaviour to be as documentated.

ADD COMMENT

Login before adding your answer.

Traffic: 556 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