[BioC] WGCNA
Martin Morgan
mtmorgan at fhcrc.org
Sun Feb 16 21:26:36 CET 2014
On 2/16/2014 12:41 AM, Peter Langfelder wrote:
> This is a common error that happens because you run a parallel
> computation from R studio. Please read the Runtime Errors section of
> WGCNA FAQ at http://labs.genetics.ucla.edu/horvath/htdocs/CoexpressionNetwork/Rpackages/WGCNA/faq.html.
>
> The upshot is that you should skip the enableWGCNAThreads() call, or
> perhaps call disableWGCNAThreads() when running an R session in
> RStudio.
I wonder what the real underlying problem is for this non-Bioconductor package?
This works for me, from ?corFast
library(WGCNA)
allowWGCNAThreads()
set.seed(10)
nrow = 100
ncol = 500
data = matrix(rnorm(nrow*ncol), nrow, ncol)
trace(.C)
x = cor(data, data)
sessionInfo()
with RStudio 0.98.501
> x = cor(data, data)
trace: .C("corFast", x = as.double(x), nrow = as.integer(nrow(x)), ncolx =
as.integer(ncol(x)),
y = as.double(y), ncoly = as.integer(ncol(y)), quick = as.double(quick),
cosineX = as.integer(cosineX), cosineY = as.integer(cosineY),
res = as.double(bi), nNA = as.integer(nNA), err = as.integer(err),
nThreads = as.integer(nThreads), verbose = as.integer(verbose),
indent = as.integer(indent), DUP = FALSE, NAOK = TRUE, PACKAGE = "WGCNA")
>
> sessionInfo()
R Under development (unstable) (2014-02-14 r65008)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] splines grid stats graphics grDevices utils
[7] datasets methods base
other attached packages:
[1] WGCNA_1.34 Hmisc_3.14-0 Formula_1.1-1
[4] survival_2.37-7 lattice_0.20-24 flashClust_1.01-2
[7] dynamicTreeCut_1.60-1
loaded via a namespace (and not attached):
[1] cluster_1.14.4 codetools_0.2-8 doParallel_1.0.6
[4] foreach_1.4.1 impute_1.37.0 iterators_1.0.6
[7] latticeExtra_0.6-26 matrixStats_0.8.14 parallel_3.1.0
[10] R.methodsS3_1.6.1 RColorBrewer_1.0-5 reshape_0.8.4
[13] tools_3.1.0
Likewise for
> x = pickSoftThreshold(data)
trace: .C("checkAvailableMemoryForR", size = as.double(size), PACKAGE = "WGCNA")
trace: .C("corFast", x = as.double(x), nrow = as.integer(nrow(x)), ncolx =
as.integer(ncol(x)),
y = as.double(y), ncoly = as.integer(ncol(y)), quick = as.double(quick),
cosineX = as.integer(cosineX), cosineY = as.integer(cosineY),
res = as.double(bi), nNA = as.integer(nNA), err = as.integer(err),
nThreads = as.integer(nThreads), verbose = as.integer(verbose),
indent = as.integer(indent), DUP = FALSE, NAOK = TRUE, PACKAGE = "WGCNA")
trace: .C("corFast", x = as.double(x), nrow = as.integer(nrow(x)), ncolx =
as.integer(ncol(x)),
y = as.double(y), ncoly = as.integer(ncol(y)), quick = as.double(quick),
cosineX = as.integer(cosineX), cosineY = as.integer(cosineY),
res = as.double(bi), nNA = as.integer(nNA), err = as.integer(err),
nThreads = as.integer(nThreads), verbose = as.integer(verbose),
indent = as.integer(indent), DUP = FALSE, NAOK = TRUE, PACKAGE = "WGCNA")
Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
1 1 0.173 -11.00 0.98400 4.02e+01 4.02e+01 4.45e+01
2 2 0.326 -8.45 0.95700 5.04e+00 5.04e+00 6.12e+00
3 3 0.241 -4.30 0.95300 8.01e-01 8.02e-01 1.05e+00
4 4 0.348 -4.04 0.95000 1.49e-01 1.49e-01 2.25e-01
5 5 0.513 -3.74 0.90400 3.15e-02 3.09e-02 5.77e-02
6 6 0.697 -3.72 0.92600 7.32e-03 6.99e-03 1.70e-02
7 7 0.811 -3.26 0.93300 1.85e-03 1.70e-03 5.55e-03
8 8 0.893 -2.92 0.95700 4.99e-04 4.32e-04 1.97e-03
9 9 0.923 -2.67 0.94400 1.43e-04 1.15e-04 7.35e-04
10 10 0.958 -2.38 0.96500 4.34e-05 3.15e-05 2.85e-04
11 12 0.910 -2.07 0.88600 4.50e-06 2.59e-06 4.55e-05
12 14 0.325 -3.02 0.21800 5.31e-07 2.29e-07 7.58e-06
13 16 0.219 -3.01 0.00942 6.88e-08 2.06e-08 1.29e-06
14 18 0.206 -3.06 0.03550 9.53e-09 1.93e-09 2.29e-07
15 20 0.227 -2.97 0.02620 1.39e-09 1.85e-10 4.11e-08
Also I don't see where the error message is coming from (who is printing "task 1
failed - " ?)
I have a vague recollection that the x[["Version"]] (which comes from
getAnywhere("print.sessionInfo")) has to do with multiple installed versions of
a package, but again it would be good to get to the bottom of this problem.
Martin
>
> HTH,
>
> Peter
>
> On Sat, Feb 15, 2014 at 5:24 PM, Jerry Cholo <jerrycholo at gmail.com> wrote:
>> Hello,
>>
>> When I ran this line:
>>> sft=pickSoftThreshold(datExprFemale,powerVector=powers)
>>
>> I got this error:
>>
>> Error in { :
>> task 1 failed - ""corFast" not available for .C() for package "WGCNA""
>>
>> May someone let me know how I could fix it?
>>
>> Thanks,
>> Jerry
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
--
Dr. Martin Morgan, PhD
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
More information about the Bioconductor
mailing list