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

Can't get a dimplot overlapped by tissue image (Error in object[[img]]) #9590

Open
rouninnomi opened this issue Jan 2, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@rouninnomi
Copy link

Hi, I want to get a dimplot overlapped by tissue image. I ran a code below,

ImageDimPlot(wt.obj, cols = "polychrome", size = 0.75, axes = TRUE, overlap = TRUE)

And I recieved the error message below,

Warning: No FOV associated with assay 'SCT', using global default FOV
Error in `object[[img]]`:
! ‘’ not found in this Seurat object

Given wt.obj was a Seurat object produced by,

# Only these codes were run on a Google Colaboratory Notebook, since Xenium data was heavy
dirname <- "/content/drive/Shareddrives/MY_GOOGLE_DRIVE_FOLDER"
wt.obj <- LoadXenium(dirname, fov = "fov") %>%
    subset(subset = nCount_Xenium > 0)

wt.obj <- SCTransform(wt.obj, assay = "Xenium")
wt.obj <- RunPCA(wt.obj, npcs = 30, features = rownames(wt.obj))
wt.obj <- RunUMAP(wt.obj, dims = 1:30)
wt.obj <- FindNeighbors(wt.obj, reduction = "pca", dims = 1:30)
wt.obj <- FindClusters(wt.obj, resolution = 0.3)

overlap = FALSE works normally. How can I fix it?

R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so

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

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

other attached packages:
 [1] shiny_1.8.0        fs_1.6.3           lubridate_1.9.2    forcats_1.0.0     
 [5] stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2        readr_2.1.4       
 [9] tidyr_1.3.0        tibble_3.2.1       ggplot2_3.4.4      tidyverse_2.0.0   
[13] Seurat_5.0.1       SeuratObject_5.0.1 sp_2.1-2          

loaded via a namespace (and not attached):
  [1] Rtsne_0.17             colorspace_2.1-0       deldir_2.0-2           ellipsis_0.3.2        
  [5] ggridges_0.5.4         RcppHNSW_0.5.0         rstudioapi_0.14        spatstat.data_3.0-3   
  [9] farver_2.1.1           leiden_0.4.3.1         listenv_0.9.0          ggrepel_0.9.4         
 [13] RSpectra_0.16-1        fansi_1.0.6            codetools_0.2-18       splines_4.2.2         
 [17] knitr_1.45             polyclip_1.10-6        spam_2.10-0            jsonlite_1.8.8        
 [21] ica_1.0-3              cluster_2.1.4          png_0.1-8              uwot_0.1.16           
 [25] sctransform_0.4.1      spatstat.sparse_3.0-3  compiler_4.2.2         httr_1.4.7            
 [29] Matrix_1.6-4           fastmap_1.1.1          lazyeval_0.2.2         cli_3.6.2             
 [33] later_1.3.2            htmltools_0.5.7        tools_4.2.2            igraph_1.6.0          
 [37] dotCall64_1.1-1        gtable_0.3.4           glue_1.6.2             RANN_2.6.1            
 [41] reshape2_1.4.4         Rcpp_1.0.11            scattermore_1.2        vctrs_0.6.5           
 [45] spatstat.explore_3.2-5 nlme_3.1-161           progressr_0.14.0       lmtest_0.9-40         
 [49] spatstat.random_3.2-2  xfun_0.41              globals_0.16.2         timechange_0.2.0      
 [53] mime_0.12              miniUI_0.1.1.1         lifecycle_1.0.4        irlba_2.3.5.1         
 [57] pacman_0.5.1           goftest_1.2-3          future_1.33.0          MASS_7.3-58.1         
 [61] zoo_1.8-12             scales_1.3.0           hms_1.1.3              promises_1.2.1        
 [65] spatstat.utils_3.0-4   parallel_4.2.2         RColorBrewer_1.1-3     yaml_2.3.8            
 [69] reticulate_1.34.0      pbapply_1.7-2          gridExtra_2.3          stringi_1.8.3         
 [73] fastDummies_1.7.3      rlang_1.1.2            pkgconfig_2.0.3        matrixStats_1.2.0     
 [77] evaluate_0.23          lattice_0.20-45        ROCR_1.0-11            tensor_1.5            
 [81] labeling_0.4.3         patchwork_1.1.3        htmlwidgets_1.6.4      cowplot_1.1.1         
 [85] tidyselect_1.2.0       parallelly_1.36.0      RcppAnnoy_0.0.21       plyr_1.8.9            
 [89] magrittr_2.0.3         R6_2.5.1               generics_0.1.3         withr_2.5.2           
 [93] pillar_1.9.0           fitdistrplus_1.1-11    survival_3.5-0         abind_1.4-5           
 [97] future.apply_1.11.0    KernSmooth_2.23-20     utf8_1.2.4             spatstat.geom_3.2-7   
[101] plotly_4.10.3          rmarkdown_2.25         tzdb_0.3.0             grid_4.2.2            
[105] data.table_1.14.10     digest_0.6.33          xtable_1.8-4           httpuv_1.6.13         
[109] munsell_0.5.0          viridisLite_0.4.2     
@rouninnomi rouninnomi added the bug Something isn't working label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant