1
$\begingroup$

I am using WGCNA and code has worked with no problems with some of my datasets however with most recent attempt when completing gene network & identification of modules. I get following error code...

net__30= blockwiseModules(t5, power=6,
                              TOMType = "signed", minModuleSize=30,
                              reassignThreshold =0, mergeCutHeight = 0.25,
                              numericLabels = TRUE, pamRespectsDendro = FALSE,
                              saveTOMs = TRUE,
                              saveTOMFileBase = "PBCreponseTOMB",
                              verbose= 3)

I come up with error code saying:

            Number of items to replace is not a multiple of replacement length.

Does anyone please know what this indicts to? I have looked on all the WGCNA tutorial pages but cannot find this error message anywhere.

Thank you kindly

$\endgroup$
9
  • 1
    $\begingroup$ Could be a bug in the code. You will need to provide more detail. When you get the error, type traceback() and post what you get. Also, post the output of sessionInfo(). $\endgroup$ Commented May 2, 2019 at 16:13
  • $\begingroup$ Error code: Error in clustDist[ii, ] <- if (intNetworkType == 1) 1 - abs(cr1) else 1 - : number of items to replace is not a multiple of replacement length $\endgroup$
    – holly
    Commented May 3, 2019 at 8:17
  • $\begingroup$ sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.5 LTS Matrix products: default $\endgroup$
    – holly
    Commented May 3, 2019 at 8:20
  • $\begingroup$ 3: sizeRestrictedClusterMerge(datExpr, clusters = membership, clusterSizes = clusterSizes, centers = centers, maxSize = preferredSize, networkType = networkType, verbose = verbose, indent = indent) 2: projectiveKMeans(datExpr, preferredSize = maxBlockSize, checkData = FALSE, sizePenaltyPower = blockSizePenaltyPower, nCenters = nPreclusteringCenters, verbose = verbose - 2, indent = indent + 1) $\endgroup$
    – holly
    Commented May 3, 2019 at 8:22
  • $\begingroup$ 1: blockwiseModules(B_CC_4, power = 6, TOMType = "signed", minModuleSize = 10, reassignThreshold = 0, mergeCutHeight = 0.25, numericLabels = TRUE, pamRespectsDendro = FALSE, saveTOMs = TRUE, saveTOMFileBase = "PBCreponseTOMB", verbose = 3) $\endgroup$
    – holly
    Commented May 3, 2019 at 8:22

1 Answer 1

2
$\begingroup$

Looks like a bug in the code which I will try to hunt down and fix. In the meantime, I would suggest playing with maxBlockSize argument to blockwiseModules. Try increasing it as much as your available RAM allows (see the paragraph "A second word of caution concerning block size" on page 6 of WGCNA tutorial I, section 2c, for some guidance on how to set maxBlockSize). Hope this helps.

$\endgroup$
3
  • $\begingroup$ Thank you so much for looking over this for me, I very much appreciate your time and effort. I will try and play around with the maxBlockSize as suggested. Thank you kindly $\endgroup$
    – holly
    Commented May 6, 2019 at 18:19
  • $\begingroup$ I also got this error: Did you manage to solve the issue @PeterLangfelder > > sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build > 7601) Service Pack 1 > > Matrix products: default > > locale: [1] LC_COLLATE=English_New Zealand.1252 LC_CTYPE=English_New > Zealand.1252 LC_MONETARY=English_New Zealand.1252 [4] LC_NUMERIC=C > LC_TIME=English_New Zealand.1252 > > attached base packages: [1] stats graphics grDevices utils > datasets methods base > > other attached packages: [1] WGCNA_1.67 fastcluster_1.1.25 > dynamicTreeCut_1.63- $\endgroup$
    – Zoe Ward
    Commented May 28, 2019 at 0:09
  • $\begingroup$ Please try the newest version (1.68) of WGCNA from CRAN. This bug should be fixed. $\endgroup$ Commented May 29, 2019 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.