Splitting Seurat object by sample layers
Hello,
I have this seurat object:
An object of class Seurat
16143 features across 29645 samples within 1 assay
Active assay: RNA (16143 features, 2000 variable features)
5 layers present: counts.control, counts.treated, data.control, data.treated, scale.data
2 dimensional reductions calculated: pca, umap
I would like to split this by sample layer so I will have 2 separate Seurat objects, one of which such as:
An object of class Seurat
15143 features across 19645 samples within 1 assay
Active assay: RNA (16143 features, 2000 variable features)
3 layers present: counts.control (or named just "counts"), data.control, scale.data
2 dimensional reductions calculated: pca, umap
Do you know how to do that?
• 1,493 views
•
link
1 answer
You can do the following-
Idents(SeuratObj) <- "orig.ident"
control_set <- subset(SeuratObj, idents = c("counts.control","data.control"))
#for treated data, you can do the following-
treated_set <- subset(SeuratObj, idents = c("counts.treated","data.treated"))
• 0 views
•
link
Log in to answer this question.