Hello everyone

I am doing network analyses by using WGCNA, I got error message when I am setting the soft threshold. Here is what I got.

I am following these commands:

    > library(WGCNA)
    
    disableWGCNAThreads()
    > library(cluster)
    > options(stringsAsFactors = FALSE)
    > femData = read.csv("gene.csv")
    > names(femData)
     [1] "gene_id"           "gene"              "locus"             "log2.fold_change."
     [5] "test_stat"         "p_value"           "q_value"           "AF"               
     [9] "AF.1"              "AF.2"              "AD"                "AD.1"             
    [13] "AD.2"             
    > dim(femData)
    [1] 6765   13
    > datExprFemale=as.data.frame(t(femData[, -c(1:7)]))
    > names(datExprFemale)=femData$gene
    > rownames(datExprFemale)=names(femData)[-c(1:7)]
    > powers=c(1:10)
    > sft=pickSoftThreshold(datExprFemale,powerVector=powers)
    Error in summary(lm1)$coefficients[2, 1] : subscript out of bounds

In addition: Warning message:

    executing %dopar% sequentially: no parallel backend registered

I tried to find similar questions in archive, but I could not.

Please I need help with this issue if anyone able to help.

Best

Shaima

The error means you're trying to access an element outside the array; this usually means one your indices is greater than the last available index of the array.

As for the warning, check the [doParallel docs][1]: "Remember:  unless registerDoMC is called, foreach will not run in parallel. Simply loading the doParallel package is not enough."


  [1]: https://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf