hdWGCNA icon indicating copy to clipboard operation
hdWGCNA copied to clipboard

Error in if (!(multi.group.by %in% names([email protected]))) { : argument is of length zero

Open xiaoli-gg opened this issue 3 months ago • 0 comments

When I try to construct metacells in each group, I meet the error below.

> unique(seurat_obj@misc[["tutorial"]][["wgcna_metacell_obj"]]@meta.data$cell_type)
 [1] "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
> seurat_obj <- SetDatExpr(
+   seurat_obj,
+   group_name = c("4"), # the name of the group of interest in the group.by column
+   group.by='cell_type', # the metadata column containing the cell type info. This same column should have also been used in MetacellsByGroups
+   assay = 'RNA', # using RNA assay
+   slot = 'data' # using normalized data
+ )
Error in if (!(multi.group.by %in% names([email protected]))) { : 
  argument is of length zero

I don't know how to solve this error, I will be grateful if someone tell me how to solve this issue.

xiaoli-gg avatar Nov 03 '24 13:11 xiaoli-gg