Subsetting of object existing of two samples I have a Seurat object existing of an aggregate of two samples namely; RD1 and RD2. I am trying to make a subset of each sample. But it's not really working. I manage to make a subset of the cells but I don't manage to make a subset of the whole object. Isn't there a way to do this, based on the subset from cell names a subset to make from the whole object. 

seuratObj$orignal_1 &lt;- seuratObj@meta.data$orig.ident
seuratObj$orignal_2 &lt;- seuratObj@meta.data$orig.ident
seuratObj$orignal_1 &lt;- gsub("RD1", "TRUE",seuratObj$orignal_1 )
seuratObj$orignal_1  &lt;- gsub("RD2", "False",seuratObj$orignal_1  )
seuratObj$orignal_2  &lt;- gsub("RD1k", "TRUE",seuratObj$orignal_2  )
seuratObj$orignal_2  &lt;- gsub("RD2", "False",seuratObj$orignal_2  )

subset_DR1 &lt;- data.frame(orignal_1 = seuratObj$orignal_1)
subset_DR1 &lt;- subset(subset_DR1, orignal_1 == TRUE,select = c("orignal_1"))

subset_DR2 &lt;- data.frame(orignal_2 = seuratObj$orignal_2)
subset_DR2 &lt;- subset(subset_DR2 , orignal_2 == TRUE,select = c("orignal_2"))

SubsetData(seuratObj, cells = rownames(subset_DR1), subset.name = seuratObj$orignal_1)


I just started to work with seurat packages. I think I am missing something.
I think your issue is simply not assigning the newly-subset object in to a new object.

Assuming rownames(subset_DR1) is indeed a list of cell names

seuratObj_subset_dr1 &lt;- SubsetData(seuratObj, cells=rownames(subset_DR1))


will work.