satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.26k stars 906 forks source link

Unable to flip VlnPlot #7527

Closed aphbt closed 1 year ago

aphbt commented 1 year ago

The flip argument in VlnPlot does not flip my violin plots for either T or F

Example with the pbmc_small dataset: image image

Session info:

R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

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

other attached packages: [1] EnhancedVolcano_1.16.0 ggrepel_0.9.2 scCustomize_1.1.1 writexl_1.4.2 lubridate_1.9.2
[6] forcats_1.0.0 stringr_1.5.0 dplyr_1.0.10 purrr_0.3.5 readr_2.1.4
[11] tidyr_1.2.1 tibble_3.1.8 tidyverse_2.0.0 ggplot2_3.4.1 Seurat_4.3.0
[16] SeuratObject_4.1.3 sp_1.5-1

loaded via a namespace (and not attached): [1] ggbeeswarm_0.7.1 Rtsne_0.16 colorspace_2.0-3 deldir_1.0-6
[5] ellipsis_0.3.2 ggridges_0.5.4 snakecase_0.11.0 circlize_0.4.15
[9] GlobalOptions_0.1.2 rstudioapi_0.14 spatstat.data_3.0-1 farver_2.1.1
[13] leiden_0.4.3 listenv_0.9.0 fansi_1.0.3 codetools_0.2-18
[17] splines_4.2.2 knitr_1.42 polyclip_1.10-4 jsonlite_1.8.3
[21] ica_1.0-3 cluster_2.1.4 png_0.1-8 uwot_0.1.14
[25] ggprism_1.0.4 shiny_1.7.4 sctransform_0.3.5 spatstat.sparse_3.0-0 [29] compiler_4.2.2 httr_1.4.5 Matrix_1.5-3 fastmap_1.1.0
[33] lazyeval_0.2.2 cli_3.4.1 later_1.3.0 htmltools_0.5.4
[37] tools_4.2.2 igraph_1.3.5 gtable_0.3.3 glue_1.6.2
[41] RANN_2.6.1 reshape2_1.4.4 Rcpp_1.0.9 scattermore_0.8
[45] vctrs_0.5.0 spatstat.explore_3.0-5 nlme_3.1-160 progressr_0.13.0
[49] lmtest_0.9-40 spatstat.random_3.0-1 xfun_0.36 globals_0.16.2
[53] timechange_0.2.0 mime_0.12 miniUI_0.1.1.1 lifecycle_1.0.3
[57] irlba_2.3.5.1 goftest_1.2-3 future_1.32.0 MASS_7.3-58.1
[61] zoo_1.8-11 scales_1.2.1 hms_1.1.3 promises_1.2.0.1
[65] spatstat.utils_3.0-2 parallel_4.2.2 rematch2_2.1.2 RColorBrewer_1.1-3
[69] prismatic_1.1.1 yaml_2.3.7 reticulate_1.26 pbapply_1.7-0
[73] gridExtra_2.3 ggrastr_1.0.1 stringi_1.7.8 paletteer_1.5.0
[77] shape_1.4.6 rlang_1.1.0 pkgconfig_2.0.3 matrixStats_0.63.0
[81] evaluate_0.20 lattice_0.20-45 ROCR_1.0-11 tensor_1.5
[85] labeling_0.4.2 patchwork_1.1.2 htmlwidgets_1.6.2 cowplot_1.1.1
[89] tidyselect_1.2.0 parallelly_1.35.0 RcppAnnoy_0.0.20 plyr_1.8.8
[93] magrittr_2.0.3 R6_2.5.1 generics_0.1.3 DBI_1.1.3
[97] pillar_1.9.0 withr_2.5.0 fitdistrplus_1.1-8 survival_3.4-0
[101] abind_1.4-5 future.apply_1.10.0 janitor_2.2.0 KernSmooth_2.23-20
[105] utf8_1.2.2 spatstat.geom_3.0-3 plotly_4.10.1 tzdb_0.3.0
[109] rmarkdown_2.21 grid_4.2.2 data.table_1.14.4 digest_0.6.30
[113] xtable_1.8-4 httpuv_1.6.7 munsell_0.5.0 beeswarm_0.4.0
[117] viridisLite_0.4.1 vipor_0.4.5

yuhanH commented 1 year ago

hi @aphbt This flip parameter works only when stack = T.

VlnPlot(pbmc_small, features = c('GNLY', 'PPBP'), flip = F, stack = T)
VlnPlot(pbmc_small, features = c('GNLY', 'PPBP'), flip = T, stack = T)