bnprks / BPCells

Scaling Single Cell Analysis to Millions of Cells
https://bnprks.github.io/BPCells
Other
150 stars 17 forks source link

"data layers are not joined. Please run JoinLayers" #56

Open alice90alice opened 10 months ago

alice90alice commented 10 months ago

I took a seq dataset into Seurat to find markers. I run this code:FindMarkers(pbmc, ident.1 = 2, min.pct = 0.25) Result in:Error in FindMarkers.StdAssay(object = data.use, slot = slot, cells.1 = cells$cells.1, : data layers are not joined. Please run JoinLayers

How to solve this problem?

bnprks commented 10 months ago

Hi, are you sure this error is being caused by BPCells code? Everything you've written above looks like it is Seurat code, and an error output by Seurat suggesting that you run the Seurat function JoinLayers.

I can help with issues caused by BPCells, but that will require you confirm the issue is in fact caused by BPCells, and provide a reproducible example I could use for debugging (i.e. a minimal dataset + code example to trigger the error)

Subhajitbotany commented 8 months ago

Even I am also getting similar error with Seurat (version 5.0.1) to find marker genes. Error in FindMarkers.StdAssay(object = data.use, slot = slot, cells.1 = cells$cells.1, : data layers are not joined. Please run JoinLayers

Please suggest a solution to this!

bnprks commented 8 months ago

@Subhajitbotany, if you can provide some example code that hits this error, then I can look into this. See this issue for a good example of how to write up an example using datasets from the SeuratData package (generally the most convenient way to make an easily-runnable example).

I appreciate the report that there is a problem, but until I have a way to easily reproduce the problem on my computer, I won't be able to find and fix whatever might be causing it.

AngelGuan0907 commented 3 weeks ago

Hi, I am having the same error.

What I am trying to do is run FindAllMarker() with the ADT assay:

Idents(obj) <- "celltype" DefaultAssay(obj) <- "ADT" markers_ADT <- FindAllMarkers(obj, only.pos = TRUE, logfc.threshold = 0.25, min.pct = 0.2)

When running for RNA assay, everything is fine. I don't know if is relevant: my RNA assay is an S4 object of class Assay, and the ADT assay is an S4 object of class Assay5.

Does Assay5 mean this is a v5 object?

I am using Seurat v5, because if I use Seurat v4, I have other errors.

bnprks commented 2 weeks ago

Hi @AngelGuan0907, thanks for your question. Would you be able to share a bit more code to include how you constructed obj starting from matrix objects? Even better would be if you are able to include some actual sample data as well (this example I lined to above shows a good way to do this with sample data)

Since the code and the error message here are all from Seurat, I am not sure if there's some part of this that is related/caused by BPCells code. So I'll need to be able to run a full example on my computer in order to diagnose the error.

Although I am not certain of the internals of Seurat, I am pretty sure Assay5 objects are definitely up-to-date for v5. I'm not sure whether or not objects of class Assay are compatible with v5 -- that might be a question for the Seurat maintainers.

Let me know if you can provide this additional information, and hopefully that will enable me to investigate your problem

-Ben