Hello, I am very interested in the CHOIR you have developed. Currently, I am trying to use plotCHOIR to show the prediction accuracy scores of my clusters, but I have encountered some issues and would like to seek your help. I have already run the code and here is the error:
tmp=select(seu@meta.data,"seurat_cluster.rpca_GSE_c5_c14_c6_c18_c21_c22_c36_sub")
cluster_labels=tmp$seurat_cluster.rpca_GSE_c5_c14_c6_c18_c21_c22_c36_sub
names(cluster_labels)=rownames(tmp)
reduction=as.matrix(seu@reductions$umap.rpca_GSE@cell.embeddings)
reduction=reduction[names(cluster_labels),]
cluster_tree=inferTree(cluster_labels, ## A named vector of cluster IDs. Names must correspond to cell IDs.
dist_matrix = NULL, ## An optional distance matrix of cell to cell distances (based on dimensionality reduction cell embeddings).
reduction = reduction, ## An optional matrix of dimensionality reduction cell embeddings to be used for distance calculations.
verbose = TRUE)
input_matrix <- as.matrix(GetAssayData(seu, assay = "RNA", slot = "data"))
seu=pruneTree(
seu,
cluster_tree = cluster_tree,
input_matrix = input_matrix,
nn_matrix = as(seu@graphs$RNA_nn, "dgCMatrix"),
snn_matrix = as(seu@graphs$RNA_snn, "dgCMatrix"),
reduction = reduction,
n_cores = 4,
verbose = TRUE
)
All the above steps have been successfully completed.
plotCHOIR(seu_sampled,
reduction = "umap.rpca_GSE",
group_by = "seurat_cluster.rpca_GSE_c5_c14_c6_c18_c21_c22_c36_sub",
accuracy_scores = TRUE,
plot_nearest = FALSE)
Error in .validInput(reduction, "reduction", list("plotCHOIR", object, : Input value 'umap.rpca_GSE' for 'reduction' was not found in the provided object, please supply valid input!
Traceback:
- .validInput(reduction, "reduction", list("plotCHOIR", object,
. key))
- stop("Input value '", input, "' for '", name, "' was not found in the provided object, please supply valid input!")
- .handleSimpleError(function (cnd)
. {
. watcher$capture_plot_and_output()
. cnd <- sanitize_call(cnd)
. watcher$push(cnd)
. switch(on_error, continue = invokeRestart("eval_continue"),
. stop = invokeRestart("eval_stop"), error = NULL)
. }, "Input value 'umap.rpca_GSE' for 'reduction' was not found in the provided object, please supply valid input!",
. base::quote(.validInput(reduction, "reduction", list("plotCHOIR",
. object, key))))
Hello, I am very interested in the CHOIR you have developed. Currently, I am trying to use plotCHOIR to show the prediction accuracy scores of my clusters, but I have encountered some issues and would like to seek your help. I have already run the code and here is the error:
tmp=select(seu@meta.data,"seurat_cluster.rpca_GSE_c5_c14_c6_c18_c21_c22_c36_sub")
cluster_labels=tmp$seurat_cluster.rpca_GSE_c5_c14_c6_c18_c21_c22_c36_sub
names(cluster_labels)=rownames(tmp)
reduction=as.matrix(seu@reductions$umap.rpca_GSE@cell.embeddings)
reduction=reduction[names(cluster_labels),]
cluster_tree=inferTree(cluster_labels, ## A named vector of cluster IDs. Names must correspond to cell IDs.
dist_matrix = NULL, ## An optional distance matrix of cell to cell distances (based on dimensionality reduction cell embeddings).
reduction = reduction, ## An optional matrix of dimensionality reduction cell embeddings to be used for distance calculations.
verbose = TRUE)
input_matrix <- as.matrix(GetAssayData(seu, assay = "RNA", slot = "data"))
seu=pruneTree(
seu,
cluster_tree = cluster_tree,
input_matrix = input_matrix,
nn_matrix = as(seu@graphs$RNA_nn, "dgCMatrix"),
snn_matrix = as(seu@graphs$RNA_snn, "dgCMatrix"),
reduction = reduction,
n_cores = 4,
verbose = TRUE
)
All the above steps have been successfully completed.
plotCHOIR(seu_sampled,
reduction = "umap.rpca_GSE",
group_by = "seurat_cluster.rpca_GSE_c5_c14_c6_c18_c21_c22_c36_sub",
accuracy_scores = TRUE,
plot_nearest = FALSE)
Error in .validInput(reduction, "reduction", list("plotCHOIR", object, : Input value 'umap.rpca_GSE' for 'reduction' was not found in the provided object, please supply valid input!
Traceback:
. key))
. {
. watcher$capture_plot_and_output()
. cnd <- sanitize_call(cnd)
. watcher$push(cnd)
. switch(on_error, continue = invokeRestart("eval_continue"),
. stop = invokeRestart("eval_stop"), error = NULL)
. }, "Input value 'umap.rpca_GSE' for 'reduction' was not found in the provided object, please supply valid input!",
. base::quote(.validInput(reduction, "reduction", list("plotCHOIR",
. object, key))))