Closed csung331 closed 3 years ago
Hi,
Not member of dev team but hopefully can be helpful. You can get this info either through Seurat or R.
cells <- c("barcode1", "barcode2", etc)
# Seurat
cluster_info <- FetchData(object = obj_name, vars = "ident", cells = cells)
# R/tidyverse
library(dplyr)
library(tibble)
cluster_info <- data.frame(Idents(obj_name)) %>%
rownames_to_column("barcodes") %>%
filter(barcodes %in% cells)
Best, Sam
I agree with Sam's solution.
I apologize for the delayed response. Thank you very much for the R code. It worked!!
I have two snRNAseq integrated datasets that were analyzed slightly differently and would like to find the cluster of cells that I have been working with in one dataset (dataset-1) in the other dataset (dataset-2).
I am able to obtain the list of cell barcodes from my cluster of interest in dataset-1. Is there an R code that I can use that when I enter one barcode (or several) that I found from dataset-1, R/Seurat will search through dataset-2 and will let me know which cluster this barcode (from dataset-1) is found in?
Thank you!