Question: Merging previously merged object in Seurat
gravatar for biostarukha
8 days ago by
biostarukha10 wrote:

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?

ADD COMMENTlink modified 6 days ago • written 8 days ago by biostarukha10
gravatar for biostarukha
6 days ago by
biostarukha10 wrote:

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'$status <-$seurat_clusters

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

ADD COMMENTlink written 6 days ago by biostarukha10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1445 users visited in the last hour