Hello,

I am trying to follow along with the network generation/cluster generation part of the WGCNA tutorial: https://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/FemaleLiver-02-networkConstr-blockwise.pdf

I am getting the same error regardless of whether I use data for the tutorial or my own RNA-Seq data (both are data frames).

The command that throws the error is (this is the version using tutorial data):

    bwnet = blockwiseModules(datExpr, power = 6,
    +                        TOMType = "unsigned", minModuleSize = 30,
    +                        reassignThreshold = 0, mergeCutHeight = 0.25,
    +                        numericLabels = TRUE,
    +                        maxBlockSize = 2000,
    +                        saveTOMs = TRUE,
    +                        saveTOMFileBase = "tstTOM",
    +                        verbose = 3)

The output I get is: 

 

    Calculating module eigengenes block-wise from all genes
       Flagging genes and samples with too many missing values...
        ..step 1
    Cluster size 3600 broken into 2133 1467 
    Cluster size 2133 broken into 1221 912 
    Done cluster 1221 
    Done cluster 912 
    Done cluster 2133 
    Done cluster 1467 
     ....pre-clustering genes to determine blocks..
       Projective K-means:
      projectiveKMeans: imputing missing data in 'datExpr'.
    To reproduce older results, use 'imputeMissing = FALSE'. 
    Cluster size 3600 broken into 2133 1467 
    Cluster size 2133 broken into 1221 912 
    Done cluster 1221 
    Done cluster 912 
    Done cluster 2133 
    Done cluster 1467 
       ..k-means clustering..
       ..merging smaller clusters...
    Block sizes:
    gBlocks
       1    2 
    1973 1627 
     ..Working on block 1 .
        TOM calculation: adjacency..
        ..will not use multithreading.
         Fraction of slow calculations: 0.426707
        ..connectivity..
        ..matrix multiplication (system BLAS)..
        ..normalization..
        ..done.
       ..saving TOM for block 1 into file cnv16pTOM-block.1.RData
     ....clustering..
     ....detecting modules..
     ....calculating module eigengenes..
     ....checking kME in modules..
         ..removing 6 genes from module 1 because their KME is too low.
     ..Working on block 2 .
        TOM calculation: adjacency..
        ..will not use multithreading.
         Fraction of slow calculations: 0.358721
        ..connectivity..
        ..matrix multiplication (system BLAS)..
        ..normalization..
        ..done.
       ..saving TOM for block 2 into file cnv16pTOM-block.2.RData
     ....clustering..
     ....detecting modules..
     ....calculating module eigengenes..
     ....checking kME in modules..
         ..removing 1 genes from module 1 because their KME is too low.

    Error in (function (x, y = NULL, use = "everything", method = c("pearson",  : 
      unused arguments (weights.x = NULL, weights.y = NULL, cosine = FALSE)

As far as I can tell, the WGCNA library is installed correctly. Can anyone identify what might be causing this "Error in (function..." error? Any ideas as to how to start fixing it?

Thank you!
It looks like some namespace issue. If you close R Studio, restart your computer, and then reinstall WGCNA as the first thing that you do when you re-open R Studio, then I think that that may resolve it.
