Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run FindAllMarkers() #5441

Closed
jctac opened this issue Jan 3, 2022 · 26 comments
Closed

Unable to run FindAllMarkers() #5441

jctac opened this issue Jan 3, 2022 · 26 comments
Labels
bug Something isn't working

Comments

@jctac
Copy link

jctac commented Jan 3, 2022

Hello,

I have been trying to run FindAllMarkers on an SCTransform'd dataset that has 6 clusters. Below is the error message I get in every R session I tried to run the code. However, I can run FindAllMarkers() on the pbmc3k dataset without any problems. I would really appreciate your help.

Thank you,
jctac

ERROR MESSAGE:

Calculating cluster 0

Done!
Calculating cluster 1

Done!
Calculating cluster 2

Done!
Calculating cluster 3

Done!
Calculating cluster 4

Done!
Calculating cluster 5

Done!
Warning: No DE genes identified
Warning: The following tests were not performed:
Warning: When testing 0 versus all:
$ operator is invalid for atomic vectors
Warning: When testing 1 versus all:
$ operator is invalid for atomic vectors
Warning: When testing 2 versus all:
$ operator is invalid for atomic vectors
Warning: When testing 3 versus all:
$ operator is invalid for atomic vectors
Warning: When testing 4 versus all:
$ operator is invalid for atomic vectors
Warning: When testing 5 versus all:
$ operator is invalid for atomic vectors

CODE:

s45neg <- RunPCA(s45neg, verbose = FALSE)
ElbowPlot(s45neg, ndims = 50) 
s45neg <- RunUMAP(s45neg, reduction = "pca", dims = 1:16)
s45neg <- RunTSNE(s45neg, reduction = "pca", dims = 1:16)
s45neg <- FindNeighbors(s45neg, reduction = "pca", dims = 1:16)
s45neg <- FindClusters(s45neg, resolution = 0.5)
UMAPPlot(s45neg) 

s45neg.markers <- FindAllMarkers(s45neg, assay = "SCT", test.use = "MAST", only.pos = TRUE, min.pct = 0.10, logfc.threshold = 0.25)
@jctac jctac added the bug Something isn't working label Jan 3, 2022
@txemapamundi9l
Copy link

jctac, this is a bug with MAST in Seurat 4.0.6. See this issue: #5419

You can either use a previous version of Seurat, like 4.0.5, or a statistical test other than MAST.

@saketkc
Copy link
Collaborator

saketkc commented Jan 14, 2022

This should have been fixed in develop branch. Can you try it from there?
https://satijalab.org/seurat/articles/install.html

Feel free to reopen if there are followup issues.

@saketkc saketkc closed this as completed Jan 14, 2022
@jctac
Copy link
Author

jctac commented Jan 19, 2022

Thank you. MAST works with v4.0.5!

@chasepagani
Copy link

Hello. I am using Seurat 5 and am facing this issue. I have integrated data, but I am using the RNA assay. Can you please assist?

diffgenes.d1 <- FindAllMarkers(sets, assay="RNA", logfc.threshold = 0.4, test.use="negbinom", min.diff.pct=0.25, return.thresh=0.05)

returns this error:
Calculating cluster 0
Calculating cluster 1
Calculating cluster 2
Calculating cluster 3
Calculating cluster 4
Calculating cluster 5
Calculating cluster 6
Calculating cluster 7
Calculating cluster 8
Calculating cluster 9
Calculating cluster 10
Calculating cluster 11
Calculating cluster 12
Calculating cluster 13
Calculating cluster 14
Calculating cluster 15
Calculating cluster 16
Calculating cluster 17
Warning: No DE genes identifiedWarning: The following tests were not performed: Warning: When testing 0 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 1 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 2 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 3 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 4 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 5 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 6 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 7 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 8 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 9 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 10 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 11 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 12 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 13 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 14 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 15 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 16 versus all:
Cells in one or both identity groups are not present in the data requestedWarning: When testing 17 versus all:
Cells in one or both identity groups are not present in the data requested

@zheng-sc
Copy link

Hello. I am using Seurat 5 and am facing this issue. I have integrated data, but I am using the RNA assay. Can you please assist?

diffgenes.d1 <- FindAllMarkers(sets, assay="RNA", logfc.threshold = 0.4, test.use="negbinom", min.diff.pct=0.25, return.thresh=0.05)

returns this error: Calculating cluster 0 Calculating cluster 1 Calculating cluster 2 Calculating cluster 3 Calculating cluster 4 Calculating cluster 5 Calculating cluster 6 Calculating cluster 7 Calculating cluster 8 Calculating cluster 9 Calculating cluster 10 Calculating cluster 11 Calculating cluster 12 Calculating cluster 13 Calculating cluster 14 Calculating cluster 15 Calculating cluster 16 Calculating cluster 17 Warning: No DE genes identifiedWarning: The following tests were not performed: Warning: When testing 0 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 1 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 2 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 3 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 4 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 5 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 6 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 7 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 8 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 9 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 10 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 11 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 12 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 13 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 14 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 15 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 16 versus all: Cells in one or both identity groups are not present in the data requestedWarning: When testing 17 versus all: Cells in one or both identity groups are not present in the data requested

is this solved? I got the same issue on Seurat5

@csu06gnauh
Copy link

I've tried Seurat v4.3.1 with different tests, but I still got the issue.

@Jorges1000
Copy link

Same here

@khpark00
Copy link

khpark00 commented Nov 28, 2023

same here, not working both in R 4.3-x86_64, R-4.3-arm64 and R 4.2-arm64. Seurat v5 and Seurat v4.4.0. MAST and other tests gave me the same issue. Anyone who solve this issue?

@zahramesri
Copy link

Anyone solved this issue?

@codingcane
Copy link

If you're okay with using MAST I was finding explicit definition of group.by and test.use to circumvent this error, e.g.
Seurat::FindAllMarkers(seu, group.by = "cellType", test.use = "MAST")
I had thought the active.ident would be used as the group.by by default but I'm not seeing that.

@mjcamerino
Copy link

I am still having this same problem with Seurat V5.0.1.

@alexey858
Copy link

same here

@Ruth-hals
Copy link

same here - cannot run find all markers.

Warning: No DE genes identified
Warning: The following tests were not performed:
Warning: When testing 0 versus all:
Cells in one or both identity groups are not present in the data requested

Not sure if this is a related issue, but I am also not able to rename identities;
Warning messages:
1: Cannot find cells provided

R version 4.3.2, Seurat_5.0.0

@alexey858
Copy link

Just in case this could help. I realized that the active.ident should be assigned by Ident() instead of [email protected] <- if we want to change it manually. Then I solved this problem and calculated the markers.

@alexey858
Copy link

seurat v5.0.1 and R for 4.3.2

@Ruth-hals
Copy link

Just in case this could help. I realized that the active.ident should be assigned by Ident() instead of [email protected] <- if we want to change it manually. Then I solved this problem and calculated the markers.

Yes! this worked for me too! thanks for sharing!

@CHEN1671
Copy link

I still don't know in which step to do this:
the active.ident should be assigned by Ident() instead of [email protected]

@alexey858
Copy link

alexey858 commented Jan 28, 2024 via email

@ygq556
Copy link

ygq556 commented Mar 26, 2024

in fact, you do not have to do this cause the active.ident would be assigned automatically when you run findcluster() function : )

---Original--- From: @.> Date: Sat, Jan 27, 2024 22:45 PM To: @.>; Cc: @.@.>; Subject: Re: [satijalab/seurat] Unable to run FindAllMarkers() (Issue #5441) I still don't know in which step to do this: the active.ident should be assigned by Ident() instead of @.*** — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

The default setting was to analyze the differential expressed genes(DEGs) in clusters, but i want to analyze the DEGs in my annoted celltypes. So i want to change the active.ident to the celltypes~

@alexey858
Copy link

in fact, you do not have to do this cause the active.ident would be assigned automatically when you run findcluster() function : )

---Original--- From: @.> Date: Sat, Jan 27, 2024 22:45 PM To: _@**._>; Cc: _@.@._>; Subject: Re: [satijalab/seurat] Unable to run FindAllMarkers() (Issue #5441) I still don't know in which step to do this: the active.ident should be assigned by Ident() instead of _@_.* — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

The default setting was to analyze the differential expressed genes(DEGs) in clusters, but i want to analyze the DEGs in my annoted celltypes. So i want to change the active.ident to the celltypes~

just after the findcluster()

@nitinmahajan20
Copy link

Not working and I am having the same issue

@apal6
Copy link

apal6 commented Mar 29, 2024

Hi,
I got the same error. Any updates?

@anayan321
Copy link

Hello,
I'm using Seurat 5 and FindAllMarkers function seems to work fine, until I merge a new data frame with the [email protected] with merge function. After that I got the very same error. It would seem that the row number was lost.

I loaded the object before merging the metadata and the function worked fine again. I guess left_join function might work better.

@urual
Copy link

urual commented Apr 6, 2024

Hello, i know you may have many way to solve this problem.But, i also want to share the way that solves the trouble by "joinlaryers()" function.You can solves this wrong by running "object <- joinlaryers(object)" after using FindAllMarkers.
P.S. object is your scRNA-seq data of Seurat.

@vasisci
Copy link

vasisci commented Apr 8, 2024

Hi I recently was able to fix it by doing this:
seurat_object <- PrepSCTFindMarkers(seurat_object )
seurat_object <- JoinLayers(seurat_object )
And then run Findallmarkers

@SiwakornP
Copy link

seurat_object <- JoinLayers(seurat_object )

I experienced the same issue with Seurat 5.0.3 and R 4.3.3. I had several datasets, which then merged with merge() similar to @anayan321. The issue is solved by JoinLayers().
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests