Subsetting from seurat object based on orig.ident? I am pretty new to Seurat. I want to subset from my original seurat object (BC3) meta.data based on orig.ident. however, when i use subset(), it returns with Error.
ER_HER_P &lt;- subset(BC3, idents = c(&quot;BC03&quot;))
Error: No cells found

table(Idents(BC3))
BC01   BC02   BC03 BC03LN   BC04   BC05   BC06   BC07 BC07LN   BC08   BC09   BC10   BC11 
21     50     33     51     42     74     15     48     52     21     55     13     11 

There are 33 cells under the identity. I checked the active.ident to make sure the identity has not shifted to any other column, but still I am getting the error?
head(BC3@active.ident)
[1] BC01 BC01 BC01 BC01 BC01 BC01
Levels: BC01 BC02 BC03 BC03LN BC04 BC05 BC06 BC07 BC07LN BC08 BC09 BC10 BC11
If you are going to use idents like that, make sure that you have told the software what your default ident category is.
This works for me, with the metadata column being called &quot;group&quot;, and &quot;endo&quot; being one possible group there.
Idents(combined.all) &lt;- &quot;group&quot;
endo_subset &lt;- subset(combined.all, idents = c(&quot;endo&quot;))

I think this is basically what you did, but I think this looks a little nicer