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

the " SpatialDimPlot()" is picture have a problem?---Spatial Data #9

Closed
jinyuanchun opened this issue Sep 8, 2022 · 4 comments
Closed

Comments

@jinyuanchun
Copy link

i follow the "Estimating Microenvironment from Spatial Data" doc. , but SpatialDimPlot() have a problem
image

@jcyang34
Copy link
Collaborator

I am not able to reproduce this. Can you provide your sessionInfo()? It could be a similar issue mentioned in satijalab/seurat#4102, I wonder if the workarounds there work for you.

@jinyuanchun
Copy link
Author

info is

R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /storeData/BioLab/software/miniconda3/envs/R-4.1.0/lib/libopenblasp-r0.3.21.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] viridis_0.6.2 viridisLite_0.4.1
[3] NICHES_1.0.0 SeuratWrappers_0.3.0
[5] dplyr_1.0.10 patchwork_1.1.2
[7] cowplot_1.1.1 ggplot2_3.3.6
[9] stxBrain.SeuratData_0.1.1 SeuratData_0.2.2
[11] sp_1.5-0 SeuratObject_4.1.1
[13] Seurat_4.1.1

loaded via a namespace (and not attached):
[1] uuid_1.1-0 backports_1.4.1 plyr_1.8.7
[4] igraph_1.3.4 repr_1.1.4 lazyeval_0.2.2
[7] splines_4.1.3 listenv_0.8.0 scattermore_0.8
[10] digest_0.6.29 htmltools_0.5.3 fansi_1.0.3
[13] magrittr_2.0.3 tensor_1.5 cluster_2.1.3
[16] ROCR_1.0-11 remotes_2.4.2 globals_0.16.1
[19] matrixStats_0.62.0 R.utils_2.12.0 spatstat.sparse_2.1-1
[22] colorspace_2.0-3 rappdirs_0.3.3 ggrepel_0.9.1
[25] crayon_1.5.1 jsonlite_1.8.0 progressr_0.11.0
[28] spatstat.data_2.2-0 survival_3.4-0 zoo_1.8-10
[31] glue_1.6.2 polyclip_1.10-0 gtable_0.3.1
[34] leiden_0.4.2 car_3.1-0 future.apply_1.9.0
[37] abind_1.4-5 scales_1.2.1 rstatix_0.7.0
[40] spatstat.random_2.2-0 miniUI_0.1.1.1 Rcpp_1.0.9
[43] xtable_1.8-4 reticulate_1.26 spatstat.core_2.4-4
[46] rsvd_1.0.5 htmlwidgets_1.5.4 httr_1.4.4
[49] RColorBrewer_1.1-3 ellipsis_0.3.2 ica_1.0-3
[52] pkgconfig_2.0.3 R.methodsS3_1.8.2 farver_2.1.1
[55] uwot_0.1.14 deldir_1.0-6 utf8_1.2.2
[58] tidyselect_1.1.2 labeling_0.4.2 rlang_1.0.5
[61] reshape2_1.4.4 later_1.3.0 munsell_0.5.0
[64] tools_4.1.3 cli_3.3.0 generics_0.1.3
[67] broom_1.0.1 ggridges_0.5.3 evaluate_0.16
[70] stringr_1.4.1 fastmap_1.1.0 goftest_1.2-3
[73] fitdistrplus_1.1-8 purrr_0.3.4 RANN_2.6.1
[76] pbapply_1.5-0 future_1.28.0 nlme_3.1-159
[79] mime_0.12 R.oo_1.25.0 compiler_4.1.3
[82] plotly_4.10.0 png_0.1-7 ggsignif_0.6.3
[85] spatstat.utils_2.3-1 tibble_3.1.8 stringi_1.7.8
[88] rgeos_0.5-9 lattice_0.20-45 IRdisplay_1.1
[91] Matrix_1.4-1 vctrs_0.4.1 pillar_1.8.1
[94] lifecycle_1.0.1 BiocManager_1.30.18 spatstat.geom_2.4-0
[97] lmtest_0.9-40 RcppAnnoy_0.0.19 data.table_1.14.2
[100] irlba_2.3.5 httpuv_1.6.5 R6_2.5.1
[103] promises_1.2.0.1 KernSmooth_2.23-20 gridExtra_2.3
[106] parallelly_1.32.1 codetools_0.2-18 MASS_7.3-58.1
[109] withr_2.5.0 sctransform_0.3.4 mgcv_1.8-40
[112] parallel_4.1.3 grid_4.1.3 rpart_4.1.16
[115] IRkernel_1.3 tidyr_1.2.0 carData_3.0-5
[118] Rtsne_0.16 ggpubr_0.4.0 pbdZMQ_0.3-7
[121] shiny_1.7.2 base64enc_0.1-3

@jcyang34
Copy link
Collaborator

Ok, I am able to reproduce the bug. It appears to be a bug of SpatialDimPlot() in Seurat v4.1.1 and onwards when group.by is set to metadata other than idents, as mentioned in satijalab/seurat#6179.

Since here the idents is also seurat_clusters, a workaround is to just remove the group.by = seurat_clusters in SpatialDimPlot() and it should solve the problem. I think the Seurat team will soon fix this bug.

@jinyuanchun
Copy link
Author

thanks, it ok

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