msraredon / NICHES

Niche Interactions and Cellular Heterogeneity in Extracellular Signaling
https://msraredon.github.io/NICHES/
49 stars 15 forks source link

SpatialDimPlot not showing spots #44

Closed Kennyluo4 closed 2 months ago

Kennyluo4 commented 2 months ago

Hello, I have an issue with Seurat plotting the spatial data. I have analyzed the data long time ago, and when I tried to load the saved object and make some plots, it won't show the spots on the image. However, the DimPlot function is working. Same thing happened with SpatialFeaturePlot vs FeaturePlot.

I also tried to adjust the image.alpha and group.by parameters, but still no luck.

I was using Seurat v4, I update it to v5 hoping to solve this issue, but it didn't work.

When I use the LinkedDimPlot and move my mouse over the tissue image, it will show the spots barcode information. have tried several processed spatial objects from different samples, and they all have the same issue.

image

The figure I generated before:

image

Here is the sessioninfo

R version 4.3.3 (2024-02-29)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

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

other attached packages:
 [1] shiny_1.8.1.1         ComplexHeatmap_2.18.0 cowplot_1.1.3         scCustomize_2.1.2     harmony_1.2.0         Rcpp_1.0.12           patchwork_1.2.0      
 [8] dplyr_1.1.4           qs_0.26.3             ggplot2_3.5.1         Seurat_5.1.0          SeuratObject_5.0.2    sp_2.1-4             

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3     rstudioapi_0.16.0      jsonlite_1.8.8         shape_1.4.6.1          magrittr_2.0.3         spatstat.utils_3.0-4   ggbeeswarm_0.7.2      
  [8] farver_2.1.2           ragg_1.3.2             GlobalOptions_0.1.2    vctrs_0.6.5            ROCR_1.0-11            memoise_2.0.1          spatstat.explore_3.2-7
 [15] paletteer_1.6.0        janitor_2.2.0          htmltools_0.5.8.1      forcats_1.0.0          sass_0.4.9             sctransform_0.4.1      parallelly_1.37.1     
 [22] bslib_0.7.0            KernSmooth_2.23-24     htmlwidgets_1.6.4      ica_1.0-3              plyr_1.8.9             cachem_1.1.0           lubridate_1.9.3       
 [29] plotly_4.10.4          zoo_1.8-12             igraph_2.0.3           iterators_1.0.14       mime_0.12              lifecycle_1.0.4        pkgconfig_2.0.3       
 [36] Matrix_1.6-5           R6_2.5.1               fastmap_1.2.0          clue_0.3-65            snakecase_0.11.1       fitdistrplus_1.1-11    future_1.33.2         
 [43] digest_0.6.35          colorspace_2.1-0       rematch2_2.1.2         S4Vectors_0.40.2       tensor_1.5             RSpectra_0.16-1        irlba_2.3.5.1         
 [50] textshaping_0.4.0      labeling_0.4.3         progressr_0.14.0       timechange_0.3.0       fansi_1.0.6            spatstat.sparse_3.0-3  httr_1.4.7            
 [57] polyclip_1.10-6        abind_1.4-5            compiler_4.3.3         doParallel_1.0.17      withr_3.0.0            fastDummies_1.7.3      MASS_7.3-60.0.1       
 [64] rjson_0.2.21           tools_4.3.3            vipor_0.4.7            lmtest_0.9-40          beeswarm_0.4.0         httpuv_1.6.15          future.apply_1.11.2   
 [71] goftest_1.2-3          glue_1.7.0             nlme_3.1-165           promises_1.3.0         Rtsne_0.17             cluster_2.1.6          reshape2_1.4.4        
 [78] generics_0.1.3         gtable_0.3.5           spatstat.data_3.0-4    tidyr_1.3.1            data.table_1.15.4      RApiSerialize_0.1.3    stringfish_0.16.0     
 [85] utf8_1.2.4             BiocGenerics_0.48.1    spatstat.geom_3.2-9    RcppAnnoy_0.0.22       foreach_1.5.2          ggrepel_0.9.5          RANN_2.6.1            
 [92] pillar_1.9.0           stringr_1.5.1          spam_2.10-0            RcppHNSW_0.6.0         ggprism_1.0.5          later_1.3.2            circlize_0.4.16       
 [99] splines_4.3.3          lattice_0.22-6         survival_3.7-0         deldir_2.0-4           tidyselect_1.2.1       miniUI_0.1.1.1         pbapply_1.7-2         
[106] gridExtra_2.3          IRanges_2.36.0         scattermore_1.2        stats4_4.3.3           matrixStats_1.3.0      stringi_1.8.4          lazyeval_0.2.2        
[113] codetools_0.2-20       tibble_3.2.1           cli_3.6.2              uwot_0.2.2             RcppParallel_5.1.7     systemfonts_1.1.0      xtable_1.8-4          
[120] reticulate_1.37.0      jquerylib_0.1.4        munsell_0.5.1          globals_0.16.3         spatstat.random_3.2-3  png_0.1-8              ggrastr_1.0.2         
[127] parallel_4.3.3         dotCall64_1.1-1        listenv_0.9.1          viridisLite_0.4.2      scales_1.3.0           ggridges_0.5.6         crayon_1.5.2          
[134] leiden_0.4.3.1         purrr_1.0.2            GetoptLong_1.0.5       rlang_1.1.4        
Kennyluo4 commented 2 months ago

the spots are showing after I set pt.size.factor = 100, I didn't change anything after initial analysis. Not sure what went wrong.