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

Issues using CellChat for Rat #284

Open
shiave opened this issue Dec 27, 2024 · 0 comments
Open

Issues using CellChat for Rat #284

shiave opened this issue Dec 27, 2024 · 0 comments

Comments

@shiave
Copy link

shiave commented Dec 27, 2024

Hi, I'm trying to run CellChat on one Seurat object with 2 conditions, with rat as the subject. I am using the database that was created for rat specifically for this package from this paper: at this github link.

I updated the database as shown below:

interaction_input <- CellChatDB$interaction
complex_input <- CellChatDB$complex
cofactor_input <- CellChatDB$cofactor
geneInfo <- CellChatDB$geneInfo
CellChatDB.rat <- list(
    interaction = interaction_input,
    complex = complex_input,
    cofactor = cofactor_input,
    geneInfo = geneInfo
)

CellChatDB <- CellChatDB.rat

then I read in my seurat object and did the following:

data.input <- seurat_object[["SCT"]]$data
labels <- Idents(seurat_object)
meta <- data.frame(labels = labels, row.names = names(labels)) # create a dataframe of the cell labels
colnames([email protected])[colnames([email protected]) == "sample"] <- "samples"

[1] "Create a CellChat object from a Seurat object"
The meta.data slot in the Seurat object is used as cell meta information
Warning in createCellChat(object = seurat_object, group.by = "ident", assay = "SCT") :
The 'meta$samples' is not a factor. We now force it as a factor!

Set cell identities for the new CellChat object
The cell groups used for CellChat analysis are Oligodendrocytes, Excitatory Neurons, Inhibitory Neurons, Oligodendrocyte Precursors, Microglia, Astrocytes, Endothelial

cellChat <- createCellChat(object = seurat_object, group.by = "ident", assay = "SCT")
CellChatDB.use <- subsetDB(CellChatDB, search = "Secreted Signaling", key = "annotation")
cellChat@DB <- CellChatDB.use

When I get here: cellChat <- subsetData(cellChat) # This step is necessary even if using the whole database
I get this error:
Issue identified!! Please check the official Gene Symbol of the following genes:
NA
Issue identified!! Please check the official Gene Symbol of the following genes:
NA

Can you provide any clarity about what SubsetData does exactly?

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