CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

computeCommunProb subscript out of bounds error

Open kmb9547 opened this issue 1 year ago • 2 comments

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.

kmb9547 avatar Apr 28 '23 20:04 kmb9547

same error here, please help.

tingxie2020 avatar Jul 04 '23 20:07 tingxie2020

same error here, please help.

wxx-dor avatar Oct 16 '23 15:10 wxx-dor