Error in sizeRestrictedClusterMerge: replace is not a multiple of replacement length
3
0
Entering edit mode
@lluis-revilla-sancho
Last seen 9 hours ago
European Union

I was following the tutorials of WGCNA with a new dataset and I am getting an error about sizeRestrictedClusterMerge were the replacement is not of the same length as the values to replace:

> net <- blockwiseModules(biggermatrix, power = 7,
+                        TOMType = "signed", 
+                        networkType = "unsigned",
+                        minModuleSize = 30, reassignThreshold = 0, 
+                        mergeCutHeight = 0.25, numericLabels = TRUE, 
+                        pamRespectsDendro = FALSE, saveTOMs = TRUE,
+                        saveTOMFileBase = "DNA_RNA_TOM", verbose = 3)
 Calculating module eigengenes block-wise from all genes
   Flagging genes and samples with too many missing values...
    ..step 1
 ....pre-clustering genes to determine blocks..
   Projective K-means:
   ..k-means clustering..
   ..merging smaller clusters...
Error in clustDist[ii, ] <- if (intNetworkType == 1) 1 - abs(cr1) else 1 -  : 
  number of items to replace is not a multiple of replacement length
> traceback()
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)
1: blockwiseModules(biggermatrix, power = 7, TOMType = "signed", 
       networkType = "unsigned", minModuleSize = 30, reassignThreshold = 0, 
       mergeCutHeight = 0.25, numericLabels = TRUE, pamRespectsDendro = FALSE, 
       saveTOMs = TRUE, saveTOMFileBase = "DNA_RNA_TOM", verbose = 3)
> packageVersion("WGCNA")
[1] ‘1.67’

Is there any way to avoid this? Thanks

wgcna • 1.3k views
ADD COMMENT
1
Entering edit mode
@peter-langfelder-4469
Last seen 23 days ago
United States

I forgot to mention that you may be able to avoid this error by changing the argument maxBlockSize (which I do recommend adjusting to the largest value your machine can take). I will of course try to track it down and fix it though.

ADD COMMENT
0
Entering edit mode

The new version of WGCNA and changing the maxBlockSize worked. Thanks

ADD REPLY
0
Entering edit mode
@peter-langfelder-4469
Last seen 23 days ago
United States

Please try this development version:

https://www.dropbox.com/s/fuu73li4ajjfr3z/WGCNA_1.67-90.tar.gz?dl=0

Let me know if the problem persists.

Thanks!

ADD COMMENT
0
Entering edit mode

No, luck:

> net <- blockwiseModules(biggermatrix, power = 7,
+                        TOMType = "signed", 
+                        networkType = "unsigned",
+                        minModuleSize = 30, reassignThreshold = 0, 
+                        mergeCutHeight = 0.25, numericLabels = TRUE, 
+                        pamRespectsDendro = FALSE, saveTOMs = TRUE,
+                        saveTOMFileBase = "DNA_RNA_TOM", verbose = 3)
 Calculating module eigengenes block-wise from all genes
   Flagging genes and samples with too many missing values...
    ..step 1
 ....pre-clustering genes to determine blocks..
   Projective K-means:
   ..k-means clustering..
   ..merging smaller clusters...
Error in clustDist[ii, ] <- if (intNetworkType == 1) 1 - abs(cr1) else 1 -  : 
  number of items to replace is not a multiple of replacement length
> packageVersion("WGCNA")
[1] ‘1.67.90’

BTW, is there any public repository of the development of WGCNA? I had a couple of issues with the source code and I would like to send patches.

ADD REPLY
0
Entering edit mode
@peter-langfelder-4469
Last seen 23 days ago
United States

Could you share the problem data?

Regarding a repository, not yet, just send your patches and suggestions to me.

Peter

ADD COMMENT

Login before adding your answer.

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