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
The new version of WGCNA and changing the maxBlockSize worked. Thanks