smorabit / hdWGCNA

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

MetaspotsByGroups : Error in `as.Graph()` #217

Closed Prakrithi-P closed 2 months ago

Prakrithi-P commented 3 months ago

Hi Sam, i get an error while runnning MetaspotsByGroups. It used to work fine but I have recently been getting this error

Error in as.Graph(): ! Please provide rownames to the matrix before converting to a Graph Traceback:

  1. MetaspotsByGroups(K12B_wgcna, group.by = c("path_anno"), ident.group = "path_anno", . assay = "Spatial", slot = "counts")
  2. lapply(groupings, function(x) { . seurat_obj[, seurat_obj$metacell_grouping == x] . })
  3. FUN(X[[i]], ...)
  4. seurat_obj[, seurat_obj$metacell_grouping == x]
  5. [.Seurat(seurat_obj, , seurat_obj$metacell_grouping == x)
  6. subset.Seurat(x = x, features = i, cells = j, ...)
  7. suppressWarnings(expr = x[[g]] <- as.Graph(x = x[[g]][cells.g, . cells.g, drop = FALSE]))
  8. withCallingHandlers(expr, warning = function(w) if (inherits(w, . classes)) tryInvokeRestart("muffleWarning"))
  9. as.Graph(x = x[[g]][cells.g, cells.g, drop = FALSE])
  10. as.Graph.Matrix(x = x[[g]][cells.g, cells.g, drop = FALSE])
  11. abort(message = "Please provide rownames to the matrix before converting to a Graph")
  12. signal_abort(cnd, .file)
smorabit commented 3 months ago

Hi,

Can you please provide the code that you used which produced this error message? Any other relevant information would also help. It would also help me to know if you are able to reproduce this in the same dataset that was used in the tutorial?

smorabit commented 2 months ago

Closing this issue for now due to inactivity.