CellChat
CellChat copied to clipboard
computeCommunProb subscript out of bounds error
Hello,
I want to begin by saying that I am new to programming and this is my first time using CellChat outside of the vignette, so patience is really appreciated.
I am trying to run CellChat on an object that I created in Seurat v4 using a raw_feature_bc_matrix.h5 file that was output from CellRanger. I perform QC and remove mitochondrial reads, filter, and normalize as usual. I use this object as input for CellChat using the following code:
Extract the data from the Seurat object: library(CellChat) data.input <- GetAssayData(aaa.seurat.obj, assay = "RNA", slot = "data") # normalized data matrix labels <- Idents(aaa.seurat.obj) meta <- data.frame(group = labels, row.names = names(labels)) # create a dataframe of the cell labels meta
Create the CellChat object cellchat <- createCellChat(object = data.input, meta = meta, group.by = "group")
Set the ligand database: CellChatDB <- CellChatDB.human showDatabaseCategory(CellChatDB) cellchat@DB <- CellChatDB.human
Preprocess the data for analysis by subsetting: cellchat <- subsetData(cellchat) future::plan("multiprocess", workers = 4) # do parallel cellchat <- identifyOverExpressedGenes(cellchat) cellchat <- identifyOverExpressedInteractions(cellchat) cellchat <- projectData(cellchat, PPI.human)
then try to compute the communication probability: cellchat <- computeCommunProb(cellchat)
when I run this command I receive an error that says: Error in data.use[RsubunitsV,] : subscript out of bounds.
I am unsure of how to fix this or what I am doing wrong. Has anyone had this issue before?
Any help is very appreciated! Thank you.
same error here, please help.
same error here, please help.