smorabit / hdWGCNA

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

Error of SetDatExpr: wgcna_genes obtained from SetupForWGCNA contains "NA" #210

Closed yizhang-zoey closed 2 months ago

yizhang-zoey commented 4 months ago

I got an Error when using SetDatExpr:

Error in .subscript.2ary(x, i, j, drop = TRUE): subscript out of bounds
Traceback:

1. SetDatExpr(CD4, wgcna_name = ct, group_name = ct, group.by = "meta.cluster", 
 .     assay = "originalexp", slot = "data", )
2. as.data.frame(Seurat::GetAssayData(s_obj, assay = assay, slot = slot)[genes_use, 
 .     cells])
3. Seurat::GetAssayData(s_obj, assay = assay, slot = slot)[genes_use, 
 .     cells]
4. Seurat::GetAssayData(s_obj, assay = assay, slot = slot)[genes_use, 
 .     cells]
5. .subscript.2ary(x, i, j, drop = TRUE)
6. stop("subscript out of bounds")

By inspection, I think the error may originate from the abnormal wgcna_genes obtained from SetupForWGCNA. Because there are some abnormal 'NA' in wgcna_genes.

seurat_obj@misc$share

image

smorabit commented 3 months ago

Hi,

Can you please send the rest of the relevant hdWGCNA code that you ran? I have personally never seen NA values showing up in the wgcna_genes.

smorabit commented 2 months ago

Closing this issue due to inactivity.