Hi,
First of all, thank you for developing scCustomize — it’s an excellent package and very useful in my daily workflow.
I’ve noticed that several functions in the package (for example, Cluster_Stats_All_Samples) are currently limited to accepting Seurat object inputs. While this works well, many of these functions could easily operate on a data.frame that already contains the required information. When using the seurat object when sub subsets are needed, the operation takes more time. It is better to use sce@meta.data directly.
I think it would greatly improve flexibility if these functions could also support data.frame or data.table inputs. Additionally, instead of relying exclusively on seurat_object@active.ident, a new argument could be added to specify which column should be used as the cluster identity.
A simple code is attached:
if (class(object)=="Seurat"){
data <- object@meta.data
} else if (class(object)=="data.frame") {
data <- as.data.frame(object)
} else {
stop("'object' is not a Seurat object or a data frame.")
}
This small enhancement would make scCustomize more general and easier to integrate into broader R workflows beyond Seurat.
Hi,
First of all, thank you for developing
scCustomize— it’s an excellent package and very useful in my daily workflow.I’ve noticed that several functions in the package (for example,
Cluster_Stats_All_Samples) are currently limited to acceptingSeuratobject inputs. While this works well, many of these functions could easily operate on adata.framethat already contains the required information. When using theseuratobject when sub subsets are needed, the operation takes more time. It is better to usesce@meta.datadirectly.I think it would greatly improve flexibility if these functions could also support
data.frameordata.tableinputs. Additionally, instead of relying exclusively onseurat_object@active.ident, a new argument could be added to specify which column should be used as the cluster identity.A simple code is attached:
This small enhancement would make scCustomize more general and easier to integrate into broader R workflows beyond Seurat.