Hello everyone,
I am conducting a cell chat analysis and want to compare the interactions of cell type A with four other cell types under different conditions, both healthy and diseased. The disease condition is stored in the 'orig.ident' variable, and the cell types are stored in the 'cell_clusters' variable. My code looks like this:
seu.adj <- seu[,seu$condition %in% "adjacent"]
seu.heal <- seu[,seu$condition %in% "healthy"]
cellchat.A <- createCellChat(object = seu.adj@assays$RNA@data,
meta = seu.adj@meta.data, group.by = "orig.ident")
cellchat.B <- createCellChat(object = seu.heal@assays$RNA@data,
meta = seu.heal@meta.data, group.by = "orig.ident")
object.list <- list(adjacent = cellchat.A, healthy = cellchat.B)
cellchat <- mergeCellChat(object.list, add.names = names(object.list))
I believe there is something wrong with my code because I encountered an error later on. This part of the code is the only part that differs from the official website, and at the end of the analysis, I received null rownames in cellchat. The other parts of my code are exactly the same as the official website, so I suspect that I may have made a mistake in this section.
Really appreciate everyone's support. Best Andy
My intention is doing a cell chat comparison analysis.
can you provide the error message? It's really difficult to help troubleshoot without that additional information.
Yes.
I checked the row names, I got:
What I am thinking is for the comparison cell chat analysis, the example code from official website from two different dataset. But mine from same, I am not sure if I wrote my code in correct way.