Determining number of genes in each module based on color in WGCNA package
0
0
Entering edit mode
schum266 • 0
@88316ec7
Last seen 13 days ago
United States

Hello,

I would like to determine the number of genes contained within each module based on the module color. I realize that it is possible to determine this based on the ordering of the modules (see below), but I would like to know how to convert these numerical labels back into module colors. Is there a way to do this?

Thank you.

> table(net$colors)

#   0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28 
# 3444 4158 4139 2575 1873 1837  991  905  859  856  677  496  492  488  476  423  414  411  362  300  281  261  256  212  210  196  186  181 176 
#  29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56   57 
# 170  168  161  161  113   99   99   99   98   98   92   91   91   90   82   82   76   66   64   62   62   61   61   60   60   54   49   45   41 
#  58   59   60 
#  40   38   30
WGCNA • 107 views
ADD COMMENT
0
Entering edit mode

For anyone who might be interested. I was able to figure this out. It's very easy.... just set numericLabels = FALSE. (sigh)

net = blockwiseModules(datExpr, power = 6,
TOMType = "unsigned", minModuleSize = 30,
reassignThreshold = 0, mergeCutHeight = 0.25,
numericLabels = FALSE, pamRespectsDendro = FALSE,
saveTOMs = TRUE,
saveTOMFileBase = "femaleMouseTOM",
verbose = 3)

# From a different dataset than in OP

table(net$colors)

#  black           blue          brown           cyan      darkgreen       darkgrey    darkmagenta darkolivegreen     darkorange 
#          1290           2833           2427            727            242            159            115            119            152 
#      darkred  darkturquoise          green    greenyellow           grey         grey60      lightcyan     lightgreen    lightyellow 
#           303            195           1800            850           6328            434            551            357            327 
#       magenta   midnightblue         orange  paleturquoise           pink         purple            red      royalblue    saddlebrown 
#           970            653            155            126           1235            969           1419            323            136 
#       salmon        sienna3        skyblue       skyblue3      steelblue            tan      turquoise         violet          white 
#           756            111            138             73            130            812           3073            126            147 
#       yellow    yellowgreen 
#         2181            106
ADD REPLY

Login before adding your answer.

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