Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem merging two different Seurat objects and creating a CellChat object. Result obtained: 0 signaling genes. #301

Open
Humph18 opened this issue Jan 24, 2025 · 0 comments

Comments

@Humph18
Copy link

Humph18 commented Jan 24, 2025

I'm trying to create a cellchat with two different Seurat objects (combined_healthy and merged_seurat). First, I checked that each cell chat separately has genes once I made the Cellchat object. Then, I have been following the tutorial "Comparison analysis of multiple datasets with different cell type compositions" and based on the script I lift up the combined_healthy (with 8 idents) with the levels from merged_seurat (11 idents). However, once I merge and create the cellchat object the result is 0 signalling genes. Does anyone know how to fix it? Thanks in advance for your help!
Here I copy my script.

#Load LM seurat object
#Load Healthy seurat object

#CellChat script
rm(list=ls()[! ls() %in% c("combined_healthy","merged_seurat")])
combined_healthy <- RenameIdents(combined_healthy,
list( "0"= "Immune",
"1"="Immune",
"2"="LSECs",
"3"="HSCs",
"4"= "LSECs",
"5"="LSECs",
"6"="Immune",
"7"="Prolif",
"8"="LSECs"))

merged_seurat <- RenameIdents(merged_seurat,
list( "0"= "Kupffer",
"1"="Mix",
"2"="Immune",
"3"="Mix",
"4"= "Mix",
"5"="HSCs",
"6"="Prolif-Immune",
"7"="Immune-LSECs",
"8"="Prolif-Immune",
"9"="Endothelial",
"10"="Endothelial",
"11"="LSECs",
"12"="Immune-LSECs",
"13"="Immune"))

cellchat_healthy <- createCellChat(object = combined_healthy, group.by = "ident", assay = "RNA")
cellchat_LM <- createCellChat(object = merged_seurat, group.by = "ident", assay = "RNA")

Define the cell labels to lift up by combining both cell labels from the conditions. Due to I have different levels I used the function union

group.new = union(levels(cellchat_LM@idents), levels(cellchat_healthy@idents))
cellchat_healthy <- liftCellChat(cellchat_healthy, group.new)

object.list <- list(NL = cellchat_healthy, LS = cellchat_LM)
cellchat <- mergeCellChat(object.list, add.names = names(object.list))
cellchat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant