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

Error in createCellChat object #742

Open
TZUwang opened this issue Jan 7, 2024 · 0 comments
Open

Error in createCellChat object #742

TZUwang opened this issue Jan 7, 2024 · 0 comments

Comments

@TZUwang
Copy link

TZUwang commented Jan 7, 2024

Hello everyone, I just got into the program, so I encountered many problems
Previously I have successfully imported 10X data & set up objects
Then I integrated it with

age <- merge(ad0, y=nd0, add.cell.ids = c("AD0","ND0"), project = "Age")
Here's my code
age.anchors <- FindIntegrationAnchors(object.list = list(nd0,ad0), dims = 1:100)
age.combined.PC100 <- IntegrateData(anchorset = age.anchors, dims = 1:100)
age.combined.PC100 <- ScaleData(age.combined.PC100, verbose = FALSE)
age.combined.PC100 <- RunPCA(age.combined.PC100, npcs = 100, verbose = FALSE)
age.combined.PC100 <- JackStraw(age.combined.PC100, num.replicate = 100, dims = 100)
age.combined.PC100 <- ScoreJackStraw(age.combined.PC100, dims = 1:100)
JackStrawPlot(age.combined.PC100, dims = 1:100)
ElbowPlot(age.combined.PC100, ndims = 100)
age.combined.PC30 <- RunUMAP(age.combined.PC100, reduction = "pca", dims = 1:30)
age.combined.PC30 <- FindNeighbors(age.combined.PC30, reduction = "pca", dims = 1:30)
age.combined.PC30.r0.25 <- FindClusters(age.combined.PC30, resolution = 0.25)
DimPlot(age.combined.PC30.r0.25, reduction = "umap", label = TRUE, label.size = 7, pt.size = 0.5)
But I'm having trouble making cellchat
cellChat <- createCellChat(object = age.combined.PC30.r0.25, group.by = "clusters")
[1] "Create a CellChat object from a Seurat object"
The data slot in the default assay is used. The default assay is integrated
Error in createCellChat(object = age.combined.PC30.r0.25, group.by = "clusters") :
The data matrix contains negative values. Please ensure the normalized data matrix is used.

How do I fix it, thank you

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