Question: Error in sizeRestrictedClusterMerge: replace is not a multiple of replacement length
0
gravatar for Lluís Revilla Sancho
4 weeks ago by
European Union
Lluís Revilla Sancho480 wrote:

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 • 100 views
ADD COMMENTlink modified 28 days ago by Peter Langfelder2.1k • written 4 weeks ago by Lluís Revilla Sancho480
Answer: Error in sizeRestrictedClusterMerge: replace is not a multiple of replacement le
1
gravatar for Peter Langfelder
28 days ago by
United States
Peter Langfelder2.1k wrote:

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 COMMENTlink modified 28 days ago • written 28 days ago by Peter Langfelder2.1k

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

ADD REPLYlink written 27 days ago by Lluís Revilla Sancho480
Answer: Error in sizeRestrictedClusterMerge: replace is not a multiple of replacement le
0
gravatar for Peter Langfelder
4 weeks ago by
United States
Peter Langfelder2.1k wrote:

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 COMMENTlink written 4 weeks ago by Peter Langfelder2.1k

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 REPLYlink written 4 weeks ago by Lluís Revilla Sancho480
Answer: Error in sizeRestrictedClusterMerge: replace is not a multiple of replacement le
0
gravatar for Peter Langfelder
4 weeks ago by
United States
Peter Langfelder2.1k wrote:

Could you share the problem data?

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

Peter

ADD COMMENTlink written 4 weeks ago by Peter Langfelder2.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 195 users visited in the last hour