how to merge a subset dataset back to master seurat object
Hi
I have a large dataset that has 10 clusters (cell type 1, 2...9,X), and I subset one of the clusters (cell type X) to perform another rounds of clustering and identified 3 cell types (cell type 1,2,3) which is also shown in my large dataset (NOT new cell types).
Now, I want to merge my sub-cluster back to previous data with assigned cell types, what is the best way to do it? Should I use integration?
• 4,831 views
•
link
1 answer
Why would you need integration? You're just changing cell metadata if all you're doing is updating cell type labels. Seurat has a cheatsheet for command manipulations like this. I'd probably just grab the metadata table and use merge, then reassign the metadata to the Seurat object.
• 0 views
•
link
Log in to answer this question.
You don't need to integrate. Since the small dataset is a subset of the big one, you can iterate through the values in
original@meta.data(e.gUMIs) and add the new values from thesubset@meta.data. For example, I would use a combination ofmatchandifelse.