Open victorwang123 opened 1 week ago
same error, try this instead
annotation <- seurat_obj@meta.data['seurat_clusters']
Because the input 'annotation' is required as data.frame not vector according to their code from 'plotting.R':
names(annotation)[1] <- "Phenotype"
annotation <- merge(prediction, annotation, by = "row.names", all.x = TRUE)
rownames(annotation) <- annotation$Row.names
annotation$Row.names <- NULL
Hi,great to see the new version! I followed the tutorial to do it, but when using plotData, the following error occurred. Do you know what's going on?
library(CytoTRACE2)
expression_data <- seurat_obj@assays$RNA@counts
cytotrace2_result <- cytotrace2(expression_data)
annotation <- seurat_obj$seurat_clusters
plots <- plotData(cytotrace2_result = cytotrace2_result, annotation = annotation,expression_data = expression_data)
-Error in
[.data.frame
(annotation, "Phenotype") : -undefined columns selected