-
Notifications
You must be signed in to change notification settings - Fork 140
Issue in cellchat <- identifyOverExpressedGenes(cellchat) #200
Comments
@superman2412 It looks ok. Can you show me the [email protected] and unique(cellchat@idents)? |
@sqjin Thank you for your prompt response. Yes, here you go. One thing to bear in mind would be that my Seurat object (inside R environment) is 7.8GB. That shouldn't make any difference right? As long as as I have enough RAM? |
@sqjin Would be fantastic if you could see what the issue is here and why it isn't running. |
@sqjin Some more information on this error. |
@superman2412 The data matrix looks good. The error information you posted is not much informative. Can you run the source code of this function line by line to give more error information? |
@sqjin . Managed to fix this error by changing the syntax of a code chunk found in the source code. FROM:
TO:
The code chunk belongs to the identifyOverexpressedGenes and identifyOverExpressedInteractions functions. Also, I ran the edited source code itself in my script and the function ran successfully. Why do you think changed syntax is fixing the error? Also, do you mind uploading updated version of the CellChat package so the error is fixed globally (i.e. in case such a code chuck appears any other function)? |
@superman2412 Can you please check the edited codes you shared? There is an error when running on my computer. |
@sqjin Not sure what's going on here. So for the functions changing this code chunk:
TO, the following code chunk
Makes the code run properly, without any error.
What changes do I need to make here to the following code chunk of the computeCommunProb function to make the code run?
|
CHANGING THIS:
TO:
in all the files of the source code fixes the errors. Huge thank you to @sqjin for helping me through this. If anyone wants the modified package (i.e. with the changed source code) you can find it here: https://github.com/superman2412 @sqjin you can close the issue now. |
Thanks for this discussion. I just wanted to point out that I'm also encountering the same issue (even when running the tutorial vignette) and replacing the ifelse loop by what @superman2412 suggested solves the issue. It might have to do with an update of the future package. The command EDIT: the same issue also arises in |
@YitengDang and @superman2412 thanks for the info! I am still running into this issue due to a future update (I think) for the
For those that don't know, you can easily edit Edit: Just to specify, I used the same recommendations as @YitengDang and the code works now. |
Hi, I am facing troubles in identifyOverExpressedGenes(cellchat) and identifyOverExpressedInteractions(cellchat) functions.
I get the same error for both functions:
Error in rep(no, length.out = len) : attempt to replicate an object of type 'closure' 2. ifelse(test = future::nbrOfWorkers() == 1, yes = pbapply::pbsapply, no = future.apply::future_sapply) 1. identifyOverExpressedGenes(cellchat)
Can you please suggest what to do? I am really struggling to finish my analysis.
I am using the following code to complete previous functions:
`lung_carcinoma_seurat <- readRDS("../Output/Lung_adenocarcinoma_seurat_CellChat_NormalizedOnly.rds")
data.input = GetAssayData(lung_carcinoma_seurat, assay = "RNA", slot = "data") # normalized data matrix
labels = [email protected]$Cell_subtype
meta = data.frame(group = labels, row.names = names(labels)) # create a dataframe of the cell labels
cellchat <- createCellChat(object = data.input, meta = meta, group.by = 'group')
#Create a CellChat object from a data matrix
The cell barcodes in 'meta' is 1 2 3 4 5 6
The cell barcodes in 'meta' is different from those in the used data matrix.
We now simply assign the colnames in the data matrix to the rownames of 'mata'!Set cell identities for the new CellChat object
The cell groups used for CellChat analysis are Activated DCs Alveolar Mac AT1 AT2 CD141+ DCs CD163+CD14+ DCs CD1c+ DCs CD207+CD1a+ LCs CD4+ Th CD8 low T CD8+/CD4+ Mixed Th Ciliated Club COL13A1+ matrix FBs COL14A1+ matrix FBs Cytotoxic CD8+ T EPCs Exhausted CD8+ T Exhausted Tfh FB-like cells Follicular B cells GC B cells in the DZ GC B cells in the LZ GrB-secreting B cells Lymphatic ECs Malignant cells MALT B cells MAST Mesothelial cells Microglia/Mac mo-Mac Monocytes Myofibroblasts Naive CD4+ T Naive CD8+ T NK pDCs Pericytes Plasma cells Pleural Mac Smooth muscle cells Stalk-like ECs Tip-like ECs Treg tS1 tS2 tS3 Tumor ECs Undetermined
CellChatDB <- CellChatDB.human # use CellChatDB.mouse if running on mouse data
showDatabaseCategory(CellChatDB)
Show the structure of the database
dplyr::glimpse(CellChatDB$interaction)
use a subset of CellChatDB for cell-cell communication analysis
CellChatDB.use <- subsetDB(CellChatDB, search = "Secreted Signaling")
use Secreted Signaling
use all CellChatDB for cell-cell communication analysis
CellChatDB.use <- CellChatDB # simply use the default CellChatDB
set the used database in the object
cellchat@DB <- CellChatDB.use
subset the expression data of signaling genes for saving computation cost
project gene expression data onto PPI network (optional)
cellchat <- projectData(cellchat, PPI.human)
#HERE IS THE ERROR
`
Am I even uploading the Seurat object correctly? Please help, thank you so much.
The text was updated successfully, but these errors were encountered: