seurat
seurat copied to clipboard
Nanostring CosMx data error: "No compatible spatial coordinates present"
Hello, I'm trying to make an ImageDimPlot of Nanostring CosMx data using v5, and keep getting the error "No compatible spatial coordinates present". I followed the vignette but used unsupervised clustering rather than Azimuth results.. Seems I'm missing a step to associate the coordinates data, but it's not clear to me how to do that? I figured when you Load Nanostring to create the object it would pull that info?
Hi @Ikey2, could you please provide some code and your sessionInfo()
?
Hi @AustinHartman,
I believe I am having the same issue with my own nanostring cosmx data. ImageDimPlot works with the full object, but fails when I specify a FOV as in the vignette. Please see below some code, a few relevant lines from str(object), and session info. Thank you in advance for your help.
Best,
Kellen
fullSeurat <- readRDS(fullSeuratPath) fullSeurat
An object of class Seurat 1012 features across 39992 samples within 1 assay Active assay: Nanostring (1012 features, 0 variable features) 2 dimensional reductions calculated: pca, umap 1 spatial field of view present: Skin
str(fullSeurat)
..@ meta.data :'data.frame': 39992 obs. of 33 variables: .. ..$ fov : int [1:39992] 1 1 1 1 1 1 1 1 1 1 ...
..@ images :List of 1 .. ..$ Skin:Formal class 'FOV' [package "SeuratObject"] with 4 slots
ImageFeaturePlot(fullSeurat, fov = '1', features = "KRT14", max.cutoff = "q95")
Error in ImageFeaturePlot(fullSeurat, fov = "1", features = "KRT14", : No compatible spatial coordinates present Traceback:
- ImageFeaturePlot(fullSeurat, fov = "1", features = "KRT14", . max.cutoff = "q95")
- stop("No compatible spatial coordinates present")
sessionInfo()
R version 4.2.3 (2023-03-15) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)
Matrix products: default BLAS/LAPACK: /home/kecavagn/miniconda3/envs/seurat4/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] SeuratObject_4.1.3 Seurat_4.3.0
loaded via a namespace (and not attached):
[1] Rtsne_0.16 colorspace_2.1-0 deldir_1.0-9
[4] ellipsis_0.3.2 ggridges_0.5.4 IRdisplay_1.1
[7] base64enc_0.1-3 spatstat.data_3.0-1 leiden_0.4.3
[10] listenv_0.9.0 farver_2.1.1 ggrepel_0.9.3
[13] fansi_1.0.4 codetools_0.2-19 splines_4.2.3
[16] polyclip_1.10-4 IRkernel_1.3.2 jsonlite_1.8.4
[19] ica_1.0-3 cluster_2.1.4 png_0.1-8
[22] uwot_0.1.14 shiny_1.7.4 sctransform_0.3.5
[25] spatstat.sparse_3.0-1 compiler_4.2.3 httr_1.4.6
[28] Matrix_1.5-4 fastmap_1.1.1 lazyeval_0.2.2
[31] cli_3.6.1 later_1.3.1 htmltools_0.5.5
[34] tools_4.2.3 igraph_1.4.2 gtable_0.3.3
[37] glue_1.6.2 RANN_2.6.1 reshape2_1.4.4
[40] dplyr_1.1.2 Rcpp_1.0.10 scattermore_1.1
[43] vctrs_0.6.2 spatstat.explore_3.2-1 nlme_3.1-162
[46] progressr_0.13.0 lmtest_0.9-40 spatstat.random_3.1-5
[49] stringr_1.5.0 globals_0.16.2 mime_0.12
[52] miniUI_0.1.1.1 lifecycle_1.0.3 irlba_2.3.5.1
[55] goftest_1.2-3 future_1.32.0 MASS_7.3-60
[58] zoo_1.8-12 scales_1.2.1 promises_1.2.0.1
[61] spatstat.utils_3.0-3 parallel_4.2.3 RColorBrewer_1.1-3
[64] reticulate_1.28 pbapply_1.7-0 gridExtra_2.3
[67] ggplot2_3.4.2 stringi_1.7.12 repr_1.1.6
[70] rlang_1.1.1 pkgconfig_2.0.3 matrixStats_0.63.0
[73] evaluate_0.21 lattice_0.21-8 ROCR_1.0-11
[76] purrr_1.0.1 tensor_1.5 patchwork_1.1.2
[79] htmlwidgets_1.6.2 labeling_0.4.2 cowplot_1.1.1
[82] tidyselect_1.2.0 parallelly_1.35.0 RcppAnnoy_0.0.20
[85] plyr_1.8.8 magrittr_2.0.3 R6_2.5.1
[88] generics_0.1.3 pbdZMQ_0.3-9 pillar_1.9.0
[91] withr_2.5.0 fitdistrplus_1.1-11 survival_3.5-5
[94] abind_1.4-5 sp_1.6-0 tibble_3.2.1
[97] future.apply_1.10.0 crayon_1.5.2 uuid_1.1-0
[100] KernSmooth_2.23-21 utf8_1.2.3 spatstat.geom_3.2-1
[103] plotly_4.10.1 grid_4.2.3 data.table_1.14.8
[106] digest_0.6.31 xtable_1.8-4 tidyr_1.3.0
[109] httpuv_1.6.11 munsell_0.5.0 viridisLite_0.4.2
Were you able to solve this problem? I'm having the same issue. Thanks
I'm getting this error when using cosmx data. Has there been a fix for this issue? Thanks!
Hi, I am having the same issues with Cosmx data. Both for ImageDimPlot and ImageFeaturePlot. I've resorted to extracting the XY data myself and using ggplot, as it is available in the meta.data, but this doesn't solve the problems I encounter with the mentioned functions.
colnames([email protected])
[1] "fov" "Area" "AspectRatio" "Width"
[5] "Height" "Mean.Histone" "Max.Histone" "Mean.CD68"
[9] "Max.CD68" "Mean.rRNA" "Max.rRNA" "Mean.GFAP"
[13] "Max.GFAP" "Mean.DAPI" "Max.DAPI" "cell_id"
[17] "assay_type" "version" "Run_Tissue_name" "Panel"
[21] "slide_ID_numeric" "cell_ID" "unassignedTranscripts" "nCount_RNA"
[25] "nFeature_RNA" "nCount_negprobes" "nFeature_negprobes" "nCount_falsecode"
[29] "nFeature_falsecode" "Area.um2" "x_FOV_px" "y_FOV_px"
[32] "x_slide_mm" "y_slide_mm"
Use SpatialDimPlot(spe2, label = TRUE, ) # label.size = 2,pt.size.factor = 3
But I don't know why it happened. So, just avoid those function.
Any solution on this, please? having the same issue with CosMx data
Hi, is there any solutions on this? I am also having the same issue.
you can do something like:
cosmx=LoadNanostring('/cosmx_folder/', fov='slide1') DefaultBoundary(cosmx@images$slide1) <- 'segmentation'
and then you can do ImageDimPlot(cosmx, fov = 'slide1', axes = TRUE, border.color=NA) without any issue