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

Disable warning of rasterization after 100k points in DimPlot, FeaturePlot etc. #7745

Closed
Peter-bbh opened this issue Aug 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Peter-bbh
Copy link

When number of points to plot exceeds 100,000, the plot is defaulted to rasterization and a warning is issued, "Rasterizing points since number of points exceeds 100,000. To disable this behavior set raster=FALSE".

First time it is great, but always is anoying. It can be removed by suppressWarnings(), see #6802, but it clutters the code.

An easy fix seems to be to change the preceeding condition in "visualization.R" (three places) from
"if ((nrow(x = data) > 1e5) & !isFALSE(raster)){" to "if ((nrow(x = data) > 1e5) & is.null(raster)){"

In this way, only if the raster option is not already specified, the warning will appear. So setting "raster = TRUE" will produce the same plot, but without the warning.

@samuel-marsh
Copy link
Collaborator

@Peter-bbh this is now to be implemented in Seurat v4.4 (release soon). See #7842.

Best,
Sam

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

No branches or pull requests

2 participants