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

Feature Plot with 0 count data #1557

Closed
hugovankessel opened this issue May 17, 2019 · 4 comments
Closed

Feature Plot with 0 count data #1557

hugovankessel opened this issue May 17, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@hugovankessel
Copy link

Hi,

Since the Seurat update v2.4 to v3.0, when creating feature plots of gene sets i have the issue that the dots in the tsne are illustrating gene expression. Is this issue known and is there a fix?

valid.genes <- rownames(cells@assays[["RNA"]]@CountS)
IGK <- c(grep("^IGK", valid.genes, value = TRUE))
FeaturePlot(object = Data, features = IGK, ncol = 8, dims = c(1,2), cols = c("gray","red"), pt.size = 0.9, reduction = "tsne", combine = TRUE)

image

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] gdata_2.18.0 ggpubr_0.2 magrittr_1.5 gtable_0.3.0
[5] gridExtra_2.3 cowplot_0.9.4 reticulate_1.12 ggplot2_3.1.1
[9] readr_1.3.1 forcats_0.4.0 dplyr_0.8.1 tibble_2.1.1
[13] Seurat_3.0.0 stringi_1.4.3

loaded via a namespace (and not attached):
[1] httr_1.4.0 tidyr_0.8.3 jsonlite_1.6
[4] viridisLite_0.3.0 splines_3.5.2 lsei_1.2-0
[7] R.utils_2.8.0 gtools_3.8.1 Rdpack_0.11-0
[10] assertthat_0.2.1 ggrepel_0.8.1 globals_0.12.4
[13] pillar_1.4.0 lattice_0.20-38 glue_1.3.1
[16] digest_0.6.18 RColorBrewer_1.1-2 SDMTools_1.1-221.1
[19] colorspace_1.4-1 htmltools_0.3.6 Matrix_1.2-15
[22] R.oo_1.22.0 plyr_1.8.4 pkgconfig_2.0.2
[25] bibtex_0.4.2 tsne_0.1-3 listenv_0.7.0
[28] purrr_0.3.2 scales_1.0.0 RANN_2.6.1
[31] Rtsne_0.15 withr_2.1.2 ROCR_1.0-7
[34] pbapply_1.4-0 lazyeval_0.2.2 survival_2.43-3
[37] crayon_1.3.4 R.methodsS3_1.7.1 future_1.13.0
[40] nlme_3.1-137 MASS_7.3-51.1 gplots_3.0.1.1
[43] ica_1.0-2 tools_3.5.2 fitdistrplus_1.0-14
[46] data.table_1.12.2 hms_0.4.2 gbRd_0.4-11
[49] stringr_1.4.0 plotly_4.9.0 munsell_0.5.0
[52] cluster_2.0.7-1 irlba_2.3.3 compiler_3.5.2
[55] rsvd_1.0.0 caTools_1.17.1.2 rlang_0.3.4
[58] ggridges_0.5.1 htmlwidgets_1.3 igraph_1.2.4.1
[61] labeling_0.3 bitops_1.0-6 npsurv_0.4-0
[64] codetools_0.2-15 reshape2_1.4.3 R6_2.4.0
[67] zoo_1.8-5 future.apply_1.2.0 KernSmooth_2.23-15
[70] metap_1.1 ape_5.3 parallel_3.5.2
[73] Rcpp_1.0.1 sctransform_0.2.0 png_0.1-7
[76] tidyselect_0.2.5 lmtest_0.9-37

I have the same issue when running the latest version of R

@yuhanH
Copy link
Collaborator

yuhanH commented May 17, 2019

Currently, if you really want to visualize this gene only containing 0, you could try
FeaturePlot(object = Data, features = IGK, ncol = 8, dims = c(1,2), cols = c("gray","gray"), pt.size = 0.9, reduction = "tsne", combine = TRUE)
We will fix it soon.

@yuhanH yuhanH closed this as completed May 17, 2019
@andrewwbutler andrewwbutler reopened this May 17, 2019
@andrewwbutler andrewwbutler added the enhancement New feature or request label May 17, 2019
@andrewwbutler
Copy link
Collaborator

Hi,

In the development version, FeaturePlot has been updated to check if all values of a feature are the same and if so throws a warning message and only colors cells based on the first value provided to the cols parameter.

To install the development version of Seurat, please see the instructions here.

@cdias86
Copy link

cdias86 commented Oct 28, 2021

It seems that the color returned in this case does not match with the rest of the plots gradient. See https://www.biostars.org/p/9467039/
I have this same issue with my dataset- the color that gets chosen for the zero entries is not the same as the zero on other plots (should be grey). It makes it look like there is intermediate expression in all cells instead of zero. Any fix to this aside from plotting that sample/condition separately and changing parameters to grey grey as described here?
Thank you!

@apal6
Copy link

apal6 commented Mar 27, 2024

Hi,

I am still getting the same error. Warning message: All cells have the same value (0) of “Il22ra1”

Screenshot 2024-03-27 at 1 17 00 PM

Could you advice on this?

Thank you,
Aastha

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

5 participants