Merging previously merged object in Seurat
1
1
Entering edit mode
3.4 years ago
fifty_fifty ▴ 60

I have two Seurat objects that were made by merging of samples:

object1 <-merge(A, y=B, add.cell.ids=c("A","B"))
object2 <-merge(C, y=D, add.cell.ids=c("C","D"))

For each object I did all preprocessing, PCA, and clustering. Now I want to merge cluster 1 from object1 and cluster 3 from object2

cluster1<-subset(object1, ident=1)
cluster3<-subset(object2, ident=1)

clusters1_3<-merge(cluster1, y=cluster3, add.cell.ids=c("1","3"))

however, when I cluster the cluster1_3 object, it would cluster to A, B, C, D initial clusters. What am I doinng wrong?

scRNA-seq Seurat single-cell R RNA-Seq • 1.3k views
ADD COMMENT
0
Entering edit mode
3.4 years ago
fifty_fifty ▴ 60

Well, I found the solution. Clustering creates seurat_clusters column in metadata and it messes up with a previous seurat_clusters came from cluster1 and cluster3. So, after merging cluster1 and cluster3, I renamed the seurat_clusters column to 'status'

clusters1_3@meta.data$status <- clusters1_3@meta.data$seurat_clusters

Then I used 'status' as orig.ident for downstream analysis

ADD COMMENT

Login before adding your answer.

Traffic: 2611 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6