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

Cell_Highlight_Plot defaulting to object reduction. New behavior #216

Closed
zrlewis opened this issue Dec 11, 2024 · 2 comments
Closed

Cell_Highlight_Plot defaulting to object reduction. New behavior #216

zrlewis opened this issue Dec 11, 2024 · 2 comments

Comments

@zrlewis
Copy link

zrlewis commented Dec 11, 2024

Thanks for a great package @samuel-marsh !

I encountered a potential bug in Cell_Highlight_Plot()

It seems to no longer accept a reduction argument.

MS4A1 <- WhichCells(object = pbmc_small, expression = MS4A1 > 4)
GZMB <- WhichCells(object = pbmc_small, expression = GZMB > 4)

cells <- list("MS4A1" = MS4A1,
              "GZMB" = GZMB)

# default reduction plotted
p1 <- Cell_Highlight_Plot(seurat_object = pbmc_small, cells_highlight = cells)
# specifying reduction does not work below
p2 <- Cell_Highlight_Plot(seurat_object = pbmc_small, cells_highlight = cells, reduction = "pca")
# specifying a reduction still works for DimPlots
p3 <- DimPlot_scCustom(seurat_object = pbmc_small, cells.highlight = cells, reduction = "pca")


p1 / p2 / p3
image
> sessionInfo()
R version 4.2.3 (2023-03-15)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS/LAPACK: /opt/conda/lib/libopenblasp-r0.3.23.so

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8      
 [8] LC_NAME=C              LC_ADDRESS=C           LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

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

other attached packages:
 [1] scCustomize_3.0.0  lubridate_1.9.4    forcats_1.0.0      purrr_1.0.2        readr_2.1.5        tidyr_1.3.1        tibble_3.2.1       tidyverse_2.0.0    patchwork_1.3.0   
[10] uwot_0.2.2         Seurat_5.1.0       SeuratObject_5.0.2 sp_2.1-4           cowplot_1.1.3      Matrix_1.6-5       RColorBrewer_1.1-3 plotly_4.10.4      stringr_1.5.1     
[19] matrixStats_1.4.1  ggplot2_3.5.1      gridExtra_2.3      dplyr_1.1.4        ggsankey_0.0.99999

loaded via a namespace (and not attached):
  [1] spatstat.univar_3.1-1  spam_2.11-0            circlize_0.4.16        systemfonts_1.1.0      plyr_1.8.9             igraph_2.0.3.9038      lazyeval_0.2.2        
  [8] splines_4.2.3          RcppHNSW_0.6.0         listenv_0.9.1          scattermore_1.2        digest_0.6.37          htmltools_0.5.8.1      viridis_0.6.5         
 [15] fansi_1.0.6            magrittr_2.0.3         paletteer_1.6.0        tensor_1.5             cluster_2.1.4          ROCR_1.0-11            tzdb_0.4.0            
 [22] globals_0.16.3         R.utils_2.12.3         svglite_2.1.3          timechange_0.3.0       spatstat.sparse_3.1-0  colorspace_2.1-1       ggrepel_0.9.6         
 [29] textshaping_0.4.1      crayon_1.5.3           prismatic_1.1.2        jsonlite_1.8.9         progressr_0.15.1       spatstat.data_3.1-4    survival_3.5-5        
 [36] zoo_1.8-12             glue_1.8.0             polyclip_1.10-7        gtable_0.3.6           leiden_0.4.3.1         future.apply_1.11.3    shape_1.4.6.1         
 [43] BiocGenerics_0.44.0    abind_1.4-8            scales_1.3.0           spatstat.random_3.3-2  ggthemes_5.1.0         miniUI_0.1.1.1         Rcpp_1.0.13-1         
 [50] viridisLite_0.4.2      xtable_1.8-4           reticulate_1.40.0      dotCall64_1.2          stats4_4.2.3           htmlwidgets_1.6.4      httr_1.4.7            
 [57] ica_1.0-3              R.methodsS3_1.8.2      pkgconfig_2.0.3        farver_2.1.2           deldir_2.0-4           utf8_1.2.4             janitor_2.2.0         
 [64] tidyselect_1.2.1       labeling_0.4.3         rlang_1.1.4            reshape2_1.4.4         later_1.4.1            munsell_0.5.1          tools_4.2.3           
 [71] cli_3.6.3              ggprism_1.0.5          generics_0.1.3         ggridges_0.5.6         fastmap_1.2.0          ragg_1.2.5             goftest_1.2-3         
 [78] rematch2_2.1.2         fitdistrplus_1.2-1     RANN_2.6.2             pbapply_1.7-2          future_1.34.0          nlme_3.1-162           mime_0.12             
 [85] R.oo_1.27.0            ggrastr_1.0.2          compiler_4.2.3         rstudioapi_0.17.1      beeswarm_0.4.0         png_0.1-8              spatstat.utils_3.1-1  
 [92] stringi_1.8.4          RSpectra_0.16-2        lattice_0.21-8         vctrs_0.6.5            pillar_1.9.0           lifecycle_1.0.4        spatstat.geom_3.3-4   
 [99] lmtest_0.9-40          GlobalOptions_0.1.2    RcppAnnoy_0.0.22       data.table_1.16.4      irlba_2.3.5.1          httpuv_1.6.15          R6_2.5.1              
[106] promises_1.3.2         KernSmooth_2.23-22     vipor_0.4.7            parallelly_1.40.1      codetools_0.2-19       fastDummies_1.7.4      MASS_7.3-60           
[113] withr_3.0.2            sctransform_0.4.1      S4Vectors_0.36.2       parallel_4.2.3         hms_1.1.3              grid_4.2.3             snakecase_0.11.1      
[120] Rtsne_0.17             spatstat.explore_3.3-3 shiny_1.9.1            ggbeeswarm_0.7.2      
@samuel-marsh
Copy link
Owner

Hi @zrlewis,

Thanks for kind words and for finding this bug. I have just fixed it now in the develop branch. I'm aiming for push hotfix to CRAN by end of the week.

Thanks again!
Sam

@zrlewis
Copy link
Author

zrlewis commented Dec 11, 2024

Thanks very much!

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

No branches or pull requests

2 participants