WGCNA::cor namespace issue
1
2
Entering edit mode
5.8 years ago
arjunsbaghela ▴ 170

Hello,

I am getting this error when running WGCNA's blockwiseModules function:

Error in (new("standardGeneric", .Data = function (x, y = NULL, use = "everything", : unused arguments (weights.x = NULL, weights.y = NULL, cosine = FALSE)

I am pretty sure the problem is that the stats::cor function is being used under the hood, rather than WGCNA::cor. I have not found a fix to this issue and it seems many people are experiencing it. Can anyone recommend a workaround.

I have tried loading WGCNA package last, but this does not work either.

Thanks, Arjun

WGCNA cor • 6.5k views
ADD COMMENT
0
Entering edit mode

Yes, this issue has been reported before: Error in (function...) thrown by WGCNA tutorial (R)

As mentioned, it's some namespace issue. I had suggested that the cor function that WGCNA wants to use is now outdated, which causes some conflict. WGCNA is not really maintained anymore. Please see if you can find the answer in the other thread to which I have linked you.

ADD REPLY
13
Entering edit mode
5.8 years ago
arjunsbaghela ▴ 170

I think I found a solution when working in RStudio... from the "Session" pulldown, press restart R.

Then run library(WGCNA).

Run search(): ".GlobalEnv", "package:WGCNA" should be the first and second characters in the vector.

Then run the blockwiseModules function.

Hope this works for other people.

Arjun

ADD COMMENT

Login before adding your answer.

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