Entering edit mode
4.3 years ago
yueli7
▴
250
Hello,
I want to merge two SeuratObjects: h1 and h2, and do the integration.
https://satijalab.org/seurat/pancreas_integration_label_transfer.html
Thank you in advance for great help!
Best,
Yue
> a<-"hc_51_02.csv"
> a1<-data.frame(fread(a),check.names=FALSE, row.names=1)
|--------------------------------------------------|
|==================================================|
> h1<- CreateSeuratObject(counts = a1, project = "h1", min.cells = 3, min.features = 200)
> a<-"hc_52_02.csv"
> a1<-data.frame(fread(a),check.names=FALSE, row.names=1)
> h2<- CreateSeuratObject(counts = a1, project = "h2", min.cells = 3, min.features = 200)
> h1<-readRDS(file="h1.rds")
> h2<-readRDS(file="h2.rds")
> h12<-merge(h1,h2)
Warning message:
In CheckDuplicateCellNames(object.list = objects) :
Some cell names are duplicated across objects provided. Renaming to enforce unique cell names.
> pancreas <- CreateSeuratObject(h12, meta.data = meta.data02)
Error in as.vector(data) :
no method for coercing this S4 class to a vector
In addition: Warning message:
In CreateSeuratObject(h12, meta.data = meta.data02) :
Some cells in meta.data not present in provided counts matrix.
What are these h1.rds and h2.rds
Hello geek_y,
Thank you so much for your response! h1, and h2 are two SeuratObjects.
Thank you again!
Best,
Yue
If you are merging two seurat objects by
merge
function from Seurat, the resulting object is a Seurat object. So you dont need to create one. I am not sure what you are trying to do. The link you attached is about data integration and here you are merging.Hello geek_y, Thank you so much for your great help! Best, Yue
The following warning also appeared when I was doing the data merge。What's going on here? How to solve it?
Hello 2962873004,
Warning is not serious.
Only can create one Seurat object: h1 is already one seurat object, it can not be created twice, so it comes out error.
Best,
Yue
I don't really know what you are trying to do writting over on your
h1
andh2
variables after creating your seurat objects but you have a merge function in seurat :https://satijalab.org/seurat/v2.4/merge_vignette.html