Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

identifyOverExpressedGenes errors:subscript out of bounds #566

Closed
songeric1107 opened this issue Feb 27, 2023 · 1 comment
Closed

identifyOverExpressedGenes errors:subscript out of bounds #566

songeric1107 opened this issue Feb 27, 2023 · 1 comment

Comments

@songeric1107
Copy link

songeric1107 commented Feb 27, 2023

same problem as reported before, still no solution.

iso <- subset(x =frc.sub, subset = orig.ident == "naive")

iso.data.input = as.data.frame(GetAssayData(iso,assay = "RNA",slot = "data")) # normalized data matrix

#iso.data.input.f=iso.data.input[which(rowSums(iso.data.input)>0),]

iso.meta=[email protected]

cellchat.iso <- createCellChat(object = as.matrix(iso.data.input.f), meta = iso.meta, group.by = "rename_cluster_222")
cellchat.iso <- setIdent(cellchat.iso, ident.use = "rename_cluster-222") # set "labels" as default cell identity
levels(cellchat.iso@idents) # show factor levels of the cell labels
groupSize <- as.numeric(table(cellchat.iso@idents))

Issue identified!! Please check the official Gene Symbol of the following genes: H2-BI H2-Ea-ps

CellChatDB.use <- CellChatDB # simply
which(CellChatDB.use[["interaction"]]$ligand == "H2-BI") # 1887

CellChatDB.use[["interaction"]] <- CellChatDB.use[["interaction"]][-1887,]

which(CellChatDB.use[["interaction"]]$ligand == "H2-Ea-ps") #1900
CellChatDB.use[["interaction"]] <- CellChatDB.use[["interaction"]][-1900,]

cellchat.iso@DB <- CellChatDB.use

cellchat.iso <- subsetData(cellchat.iso)

cellchat.iso1 <- identifyOverExpressedGenes(cellchat.iso)

Error in genes.de[[i]] : subscript out of bounds

cellchat.iso <- identifyOverExpressedInteractions(cellchat.iso) ##working

Please give a clear solution on how to solve the problem.

thank you!

@songeric1107
Copy link
Author

I find the problem; there is a typo in the identities to use. problem fixed.

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

No branches or pull requests

1 participant