-
Notifications
You must be signed in to change notification settings - Fork 40
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
Quantile cutoffs in UMAP plots #197
Comments
Can you provide an example output plot? |
Sure, here is a UMAP with and without the quantile cutoff from the Seurat tutorial:
|
So just to be clear, the quantile cutoffs define the values at which you truncate the range of the data. ie for q10, anything below q10 is shown as being exactly q10? |
Yes, I believe that is how both Seurat and Scanpy do it. From the Scanpy docs (https://scanpy.readthedocs.io/en/stable/generated/scanpy.pl.umap.html#scanpy.pl.umap):
|
Sorry this took so long, testing of the linked PR (#215 ) appreciated |
Hi,
Both Seurat and Scanpy have a feature to pass a quantile cutoff when plotting gene expression on a UMAP. I was wondering if it would be possible to request that a similar feature be added to scater? This can be helpful to remove some cells with very low or high expression from skewing the scale bar.
In Seurat: Calculate feature-specific contrast levels based on quantiles of non-zero expression.
FeaturePlot(pbmc3k.final, features = c("MS4A1", "PTPRCAP"), min.cutoff = "q10", max.cutoff = "q90")
In Scanpy: the maximum value plotted can be adjusted using vmax (similarly vmin can be used for the minimum value). In this case we use p99, which means to use as max value the 99 percentile. The max value can be a number or a list of numbers if the vmax wants to be set for multiple plots individually.
sc.pl.umap(pbmc, color=['MS4A1', 'PTPRCAP'], vmin='p10', vmax='p99')
Thank you
The text was updated successfully, but these errors were encountered: