This is a test version of Biostars. For the public version, visit https://www.biostars.org.
WGCNA Intramodular Connectivity

Hi everyone-Im having some trouble with figuring out what value to use for the "colors" argument below. Im following the standard Horvath tutorial. I tried using the "moduleColors" as the argument but it does not seem to be working:

adjMat = adjacency(datExpr, 
      selectCols = NULL, 
      type = "unsigned", 
      power = 6,
      corFnc = "cor", corOptions = list(use = "p"),
      weights = NULL,
      distFnc = "dist", distOptions = "method = 'euclidean'")
intramodularConnectivity = intramodularConnectivity(adjMat, colors = moduleColors, scaleByMax = TRUE)
write.csv(intramodularConnectivity, file = "intramodularConnectivity.csv")
wgcna rna-seq next-gen r

1 answer

Hi Reara. I've been using a similar approach with intramodularConnectivity, with colors being the module assignments from a corresponding network made with blockwiseModules. I believe "moduleColors" in the Horvath tutorials is just what the authors named an object containing module assignments for genes going into the network and adjacency matrix.

net = blockwiseModules(datExpr_log_N2, power = 12, corType="bicor", deepSplit = 1, networkType = "signed", mergeCutHeight = 0.1,
                                TOMType = "signed", minModuleSize = 50,
                                numericLabels = TRUE,
                                pamStage = TRUE, pamRespectsDendro = TRUE,
                                saveTOMs = FALSE,
                                verbose = 3,
                                maxBlockSize = 12706)

moduleColors = labels2colors(net$colors)

Log in to answer this question.