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

FindMarkers with the 'lr' test uses all cores despite changing future::plan() #8818

Open
jmrussell opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jmrussell
Copy link

FindMarkers is defaulting to use all cores when running using the 'LR' test (and poisson for that matter) which is probably fine except on shared resources. The future vignette hasn't been updated since 2019, but presumably FindMarkers should respect future::plan("sequential") or setting the number of workers with future::plan("multisession", workers = 12) when called before invoking the function and that doesn't appear to be the case.

Is there another function in differential_expression.R that uses parallel cores outside of the future_sapply in LRDETest()? If so, it would be nice to know what it is and how to prevent it from using all cores.

This is on Seurat 4.30, which loads future 1.33.0, future.apply 1.11.0 and

library(future)
future::plan("sequential")

plan()
#  sequential:
# - args: function (..., envir = parent.frame())
# - tweaked: FALSE
# - call: future::plan("sequential")

markers <- FindMarkers(obj, ident.1 = 147, only.pos = TRUE,
  test.use = 'LR',latent.vars = 'atac_peak_region_fragments',
  logfc.threshold = 2, min.pct=0.05)
@jmrussell jmrussell added the bug Something isn't working label Apr 24, 2024
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

1 participant