WGCNA: net$colors and module colors don't match up; module assignments are different
0
0
Entering edit mode
cats_dogs ▴ 20
@cats_dogs-15904
Last seen 5.7 years ago

Hi all,

I have run blockwiseConsensusModules() on my data, and the resulting list contains a list of colors per gene.

When making the module-trait correlation table, module colors are assigned thus in the tutorial:

MEColors = labels2colors(as.numeric(substring(names(net$multiMEs[[1]]$data), 3)))

however, running labels2colors(net$colors)results in different module color assignments. The module called 'light yellow' in MEColors is grey according to labels2colors, for example. Both have the same number of modules but differ in their module assignment and color designation. For instance, there are 1004 genes matching MEgrey, but approximately 11,000 genes match module '0'. The labels2colors(net$colors) module assignments make sense; the grey module is the biggest and not enriched for anything, in contrast labels2colors() on the labeled modules in net$multiMES[[set]]$data.

According to the documentation, blockwiseConsensusModules() uses colors to assign the modules, so I don't understand why they're different. (My call to blockwiseConsensusModules() is linked above). Could someone please clarify? Thank you (for following the saga of this data).

For now, I ended up making the heat map using unique(labels2colors(net$colors)).

Here's sessionInfo() just in case.

R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] plyr_1.8.4                  ggpubr_0.2                  magrittr_1.5               
 [4] colorspace_1.4-0            cowplot_0.9.4               forcats_0.3.0              
 [7] stringr_1.4.0               dplyr_0.8.0.1               purrr_0.3.0                
[10] readr_1.3.1                 tidyr_0.8.2                 tibble_2.0.1               
[13] ggplot2_3.1.0               tidyverse_1.2.1             WGCNA_1.66-90              
[16] fastcluster_1.1.25          dynamicTreeCut_1.63-1       DESeq2_1.22.2              
[19] SummarizedExperiment_1.12.0 DelayedArray_0.8.0          BiocParallel_1.16.6        
[22] matrixStats_0.54.0          Biobase_2.42.0              GenomicRanges_1.34.0       
[25] GenomeInfoDb_1.18.2         IRanges_2.16.0              S4Vectors_0.20.1           
[28] BiocGenerics_0.28.0        

loaded via a namespace (and not attached):
  [1] htmlTable_1.13.1         XVector_0.22.0           base64enc_0.1-3         
  [4] rstudioapi_0.9.0         bit64_0.9-7              AnnotationDbi_1.44.0    
  [7] mvtnorm_1.0-8            lubridate_1.7.4          xml2_1.2.0              
 [10] codetools_0.2-16         splines_3.5.3            doParallel_1.0.14       
 [13] impute_1.56.0            robustbase_0.93-3        geneplotter_1.60.0      
 [16] knitr_1.21               Formula_1.2-3            jsonlite_1.6            
 [19] Rsamtools_1.34.1         broom_0.5.1              annotate_1.60.0         
 [22] cluster_2.0.7-1          GO.db_3.7.0              rrcov_1.4-7             
 [25] compiler_3.5.3           httr_1.4.0               backports_1.1.3         
 [28] assertthat_0.2.0         Matrix_1.2-16            lazyeval_0.2.1          
 [31] cli_1.0.1                acepack_1.4.1            htmltools_0.3.6         
 [34] prettyunits_1.0.2        tools_3.5.3              gtable_0.2.0            
 [37] glue_1.3.0               GenomeInfoDbData_1.2.0   Rcpp_1.0.0              
 [40] cellranger_1.1.0         Biostrings_2.50.2        preprocessCore_1.44.0   
 [43] nlme_3.1-137             rtracklayer_1.42.1       iterators_1.0.10        
 [46] xfun_0.4                 rvest_0.3.2              XML_3.98-1.17           
 [49] DEoptimR_1.0-8           zlibbioc_1.28.0          MASS_7.3-51.1           
 [52] scales_1.0.0             hms_0.4.2                RColorBrewer_1.1-2      
 [55] yaml_2.2.0               memoise_1.1.0            gridExtra_2.3           
 [58] biomaRt_2.38.0           rpart_4.1-13             latticeExtra_0.6-28     
 [61] stringi_1.3.1            RSQLite_2.1.1            genefilter_1.64.0       
 [64] pcaPP_1.9-73             foreach_1.4.4            checkmate_1.9.1         
 [67] GenomicFeatures_1.34.3   rlang_0.3.1              pkgconfig_2.0.2         
 [70] bitops_1.0-6             evaluate_0.13            lattice_0.20-38         
 [73] labeling_0.3             GenomicAlignments_1.18.1 htmlwidgets_1.3         
 [76] bit_1.1-14               tidyselect_0.2.5         robust_0.4-18           
 [79] R6_2.4.0                 generics_0.0.2           Hmisc_4.2-0             
 [82] fit.models_0.5-14        DBI_1.0.0                withr_2.1.2             
 [85] pillar_1.3.1             haven_2.0.0              foreign_0.8-71          
 [88] survival_2.43-3          RCurl_1.95-4.11          nnet_7.3-12             
 [91] modelr_0.1.3             crayon_1.3.4             rmarkdown_1.11          
 [94] progress_1.2.0           readxl_1.3.0             locfit_1.5-9.1          
 [97] grid_3.5.3               data.table_1.12.0        blob_1.1.1              
[100] digest_0.6.18            xtable_1.8-3             munsell_0.5.0
WGCNA • 752 views
ADD COMMENT

Login before adding your answer.

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