CFeregrino/scWGCNA

error when running run.scWGCNA

Opened this issue · 2 comments

Hello, I am running scWGCNA on my own dataset, everything seems fine to generate a pseudocell dataset, and it stucks withthe next step.

here is my dataset:

> c5
An object of class Seurat 
24950 features across 2449 samples within 3 assays 
Active assay: integrated (3000 features, 3000 variable features)
2 other assays present: RNA, SCT
3 dimensional reductions calculated: pca, tsne, umap

This dataset was integrated with CCA, and only the "integrated assay" can be used to produce the pseudo cell dataset.

here is my pseudo cell dataset:

> c5.pcells
An object of class Seurat 
24950 features across 489 samples within 3 assays 
Active assay: integrated (3000 features, 0 variable features)
 2 other assays present: RNA, SCT

and here is the running message:

> c5.scWGCNA = run.scWGCNA(p.cells = c5.pcells, # Pseudocells (recommended), or Seurat single cells
+                                  s.cells = c5, # single cells in Seurat format
+                                  is.pseudocell = T, # We are using single cells twice this time
+                                  features = rownames(c5)) # Recommended: variable genes
[1] "The following variable genes were not found expressed in the pseudocell object:  "
[1] "We have 3000 genes in the variable genes object"
   Power SFT.R.sq slope truncated.R.sq  mean.k. median.k.  max.k.
1      1  0.00603 -1.10          0.875 1.64e+03  1.65e+03 1900.00
2      2  0.11500 -2.51          0.890 9.10e+02  9.16e+02 1230.00
3      3  0.27600 -2.81          0.924 5.11e+02  5.15e+02  816.00
4      4  0.43200 -2.84          0.947 2.91e+02  2.92e+02  553.00
5      5  0.54100 -2.81          0.938 1.68e+02  1.67e+02  381.00
6      6  0.63200 -2.81          0.944 9.79e+01  9.67e+01  268.00
7      7  0.69700 -2.80          0.967 5.79e+01  5.65e+01  191.00
8      8  0.73900 -2.65          0.960 3.47e+01  3.33e+01  139.00
9      9  0.78900 -2.66          0.934 2.10e+01  1.98e+01  103.00
10    10  0.84600 -2.76          0.914 1.29e+01  1.18e+01   76.90
11    12  0.95300 -2.84          0.964 5.03e+00  4.31e+00   45.30
12    14  0.96200 -2.67          0.953 2.06e+00  1.61e+00   28.30
13    16  0.96700 -2.42          0.958 8.85e-01  6.20e-01   18.80
14    18  0.94800 -2.19          0.935 4.01e-01  2.43e-01   13.20
15    20  0.43900 -2.74          0.340 1.92e-01  9.74e-02    9.67
16    22  0.43700 -2.47          0.341 9.78e-02  3.96e-02    7.35
17    24  0.32800 -2.50          0.141 5.31e-02  1.65e-02    5.75
18    26  0.43500 -2.09          0.351 3.08e-02  6.93e-03    4.61
19    28  0.39400 -2.34          0.328 1.91e-02  2.98e-03    3.78
20    30  0.39600 -2.21          0.334 1.26e-02  1.30e-03    3.14
[1] "Or power is 12"
TOM calculation: adjacency..
..will not use multithreading.
 Fraction of slow calculations: 0.000000
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
[1] "my.height:  0.9993  .... my.Clsize:  15"
202 genes not assigned to any module.
2606 genes excluded due to significance.TOM calculation: adjacency..
..will not use multithreading.
 Fraction of slow calculations: 0.000000
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
[1] "my.height:  0.9995  .... my.Clsize:  15"
25 genes not assigned to any module.
144 genes excluded due to significance.TOM calculation: adjacency..
..will not use multithreading.
 Fraction of slow calculations: 0.000000
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
[1] "my.height:  0.9989  .... my.Clsize:  21"
2 genes not assigned to any module.
13 genes excluded due to significance.TOM calculation: adjacency..
..will not use multithreading.
 Fraction of slow calculations: 0.000000
..connectivity..
..matrix multiplication (system BLAS)..
..normalization..
..done.
Error in seq.default(cutheight - 5e-04, cutheight + 5e-04, 1e-04) : 
  'from' must be of length 1

I googled and cannot find a solution to this error. Any help will be appreciated.

Best,
Xue

Hello, sorry that I am only coming back to this. I've been rather busy.
I think I see what the problem is, it looks like your modules might be all to similar. I'll try to reproduce the error and fix it.

Is there a reason why the tutorial is able to run on SCT assays and here we (I also face same problem which limits the assay type I can run on) have to run on integrated datasets?