smorabit / hdWGCNA

High dimensional weighted gene co-expression network analysis
https://smorabit.github.io/hdWGCNA/
Other
315 stars 31 forks source link

Issue with SetDatExpr() using Seurat v5 object #237

Closed sang-15 closed 1 month ago

sang-15 commented 1 month ago

Hi,

Thank you for providing this great tool! I have some issues using SetDatExpr() function now, and keep getting the same error.

mouse <- SetDatExpr(
  mouse,
  group_name = 'Astro', 
  group.by = 'predicted.subclass',
  assay = 'RNA', 
  layer = 'data' 
)

Warning: Layer 'data' is emptyError in dim(X) <- c(n, length(X)/n) : 
  dims [product 7960] do not match the length of object [9186]

Thanks!

sang-15 commented 1 month ago

So sorry I completely missed a line before mouse <- NormalizeMetacells(mouse).

This line only works for me if I turn off multithreads by plan("sequential"), otherwise I will have error like below which is probably associated to the future package, just in case someone else will have similar problem.

> mouse <- NormalizeMetacells(mouse)
Normalizing layer: counts
Warning: Cannot find a parent environment called SeuratError: MultisessionFuture (future_lapply-1) failed to call grmall() on cluster RichSOCKnode #1 (PID 2270 on localhost 'localhost'). The reason reported was 'error reading from connection'. Post-mortem diagnostic: No process exists with this PID, i.e. the localhost worker is no longer alive. The total size of the 10 globals exported is 1.28 GiB. The three largest globals are 'object' (1.28 GiB of class 'S4'), '...future.FUN' (63.70 KiB of class 'function') and 'norm.function' (2.61 KiB of class 'function')