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

Fixed min.cells.group issue in FindConservedMarkers() #8910

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hamelyz
Copy link

@hamelyz hamelyz commented May 17, 2024

Problem

FindConservedMarkers throws an error on too few cells even when parameter min.cells.group is lower than number of cells.

Distinct but related PR: #5079

The current behavior of FindConservedMarkers is the following:
If a group has greater than number of min.cells.group but less than 3 (the default for min.cells.group in function FindMarkers()) you get an error from ValidateCellGroups within FindMarkers because it is less than the threshold.

This is because the parameter min.cells.group, when used in FindConservedMarkers, was not passed down to FindMarkers

The error is as follows:


Error in `map()`:
ℹ In index: 4.
Caused by error in `ValidateCellGroups()`:
! Cell group 1 has fewer than 3 cells
Backtrace:
  1. ... 
 11. Seurat::FindConservedMarkers(...)
 13. Seurat:::FindMarkers.Seurat(...)
 15. Seurat:::FindMarkers.StdAssay(...)
 17. Seurat:::FindMarkers.default(...)
 18. Seurat:::ValidateCellGroups(...)
 19. base::stop("Cell group 1 has fewer than ", min.cells.group, " cells")
 

Implementation

I added the parameter to min.cells.group the FindMarkers() function that is run within FindConservedMarkers() so that that setting is passed down

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

Successfully merging this pull request may close these issues.

1 participant