#spatial-interoperability
2023-06-07
Lambda Moses (13:36:59): > @Lambda Moses has joined the channel
Kevin Yamauchi (13:37:30): > @Kevin Yamauchi has joined the channel
Nils Eling (13:37:44): > @Nils Eling has joined the channel
Laura Luebbert (13:37:54): > @Laura Luebbert has joined the channel
Helena L. Crowell (13:37:57): > @Helena L. Crowell has joined the channel
Luca Marconato (13:37:57): > @Luca Marconato has joined the channel
Lambda Moses (13:38:57): > https://github.com/HelenaLC/SpatialDatahttps://r-spatial.github.io/sf/https://github.com/HelenaLC/SpatialData/blob/devel/R/readShapes.Rhttps://spatialdata.scverse.org/en/latest/design_doc.htmlhttps://github.com/ArtifactDB/alabaster.sce - Attachment (r-spatial.github.io): Simple Features for R > Support for simple features, a standardized way to > encode spatial vector data. Binds to GDAL for reading and writing > data, to GEOS for geometrical operations, and to PROJ for > projection conversions and datum transformations. Uses by default the s2 > package for spherical geometry operations on ellipsoidal (long/lat) coordinates.
Kevin Yamauchi (13:39:56): > Nice meeting everybody. Super excited about R <-> Python interoperability!
Lambda Moses (13:45:14): > https://github.com/pachterlab/SpatialFeatureExperiment
Lambda Moses (13:45:26): > https://github.com/pachterlab/voyager
Lambda Moses (13:45:56): > https://github.com/pmelsted/voyagerpy
Kayla Jackson (13:49:19): > @Kayla Jackson has joined the channel
2023-06-09
Aedin Culhane (17:25:42): > @Aedin Culhane has joined the channel
Ahmad Alkhan (17:26:30): > @Ahmad Alkhan has joined the channel
2023-06-13
Giovanni Palla (11:22:17): > @Giovanni Palla has joined the channel
2023-06-27
Lambda Moses (16:04:23): > Anyone here also going to the Bioconductor conference in August? Will there be a presentation on SpatialData?
Helena L. Crowell (16:20:04) (in thread): > Re SD: Short answer: I think not (see also online program).The only ones involved from the R/Bioc end here are/were@Constantin Ahlmann-Eltzeand myself. Not sure about Constantin, but I won’t be able to make it to Boston, unfortunately (relocating countries…). Pushing developments is on the radar, but a “production-ready version” will still need time (and work). Happy to discuss independently of Bioc conf:pray:
Luca Marconato (16:23:29): > Btw, I will start working on creating the artificial datasets to foster interoperability in a few days, after I finish another thing, I will keep you posted.
2023-06-28
Giovanni Palla (08:26:17): > @Lambda MosesI am not planning to go but I’m in boston during that time so happy to catch up/meet sometime during the conference.
Lambda Moses (13:35:38) (in thread): > I look forward to seeing you in person then.
2023-07-23
Lambda Moses (04:29:23): > https://www.biorxiv.org/content/10.1101/2023.07.20.549945v1?ct= - Attachment (bioRxiv): Voyager: exploratory single-cell genomics data analysis with geospatial statistics > Exploratory spatial data analysis (ESDA) can be a powerful approach to understanding single-cell genomics datasets, but it is not yet part of standard data analysis workflows. In particular, geospatial analyses, which have been developed and refined for decades, have yet to be fully adapted and applied to spatial single-cell analysis. We introduce the Voyager platform, which systematically brings the geospatial ESDA tradition to (spatial) -omics, with local, bivariate, and multivariate spatial methods not yet commonly applied to spatial -omics, united by a uniform user interface. Using Voyager, we showcase biological insights that can be derived with its methods, such as biologically relevant negative spatial autocorrelation. Underlying Voyager is the SpatialFeatureExperiment data structure, which combines Simple Feature with SingleCellExperiment and AnnData to represent and operate on geometries bundled with gene expression data. Voyager has comprehensive tutorials demonstrating ESDA built on GitHub Actions to ensure reproducibility and scalability, using data from popular commercial technologies. Voyager is implemented in both R/Bioconductor and Python/PyPI, and features compatibility tests to ensure that both implementations return consistent results. > > ### Competing Interest Statement > > The authors have declared no competing interest.
Luca Marconato (15:21:46) (in thread): > Congratulations!
Lambda Moses (15:37:54) (in thread): > Thanks!
2023-07-28
Kevin Yamauchi (02:14:29) (in thread): > Nice work! Congratulations:slightly_smiling_face:
2023-08-11
Lambda Moses (01:05:05): > Will the SpatialData R package be released in Bioc 3.18 this October?
Helena L. Crowell (02:40:48) (in thread): > No. My previous response (see above) still holds… I’m expecting this to take many many more months, as the class is fairly complex, still under development on the Python end, and (at least at the moment) only worked on in my free time, alone…perhaps EuroBioc will be an opportunity to discuss. And@Nils Elingand I are planning to meet before than as well.Also, Rarr came out only recently, and we’re still lacking a delayed backend for Zarr, so I believe that anything we put out now would not be very useful in the wild. So let’s be patient.Better something useful than rushed and broken…
Lambda Moses (02:47:29) (in thread): > As it’s still in development, I wonder if you can implement a feature to use vector geometries in sf dataframes to extract features in the SpatialData images. The terra package can do that, but because it’s designed for geospatial, I think it will limit the applications of image processing.
Helena L. Crowell (02:49:37) (in thread): > And perhaps to add, the Python version is also still fairly buggy, and undergoing active development.In addition, Zarr and OME-NGFF are changing, and SD authors are figuring out how to store things consistently, so…yeah.This is not something we can just wrap up in a couple months:woman-bowing:
Lambda Moses (02:50:42) (in thread): > Thanks, that’s good to know. I really look forward to the first release!
Lambda Moses (02:52:02) (in thread): > Maybe I can help implementing the sf data extraction feature when the time comes, though I’m busy with the next release of Voyager and SFE right now.
Helena L. Crowell (02:54:18) (in thread): > Sounds interesting.But anything like that will be outside the SD (class) package.My vision for the future would be that we’ll have complementary visualization and analysis package for things like this.So yeah, when the time comes, you’re most welcomed to implement anything you find useful or to aid interoperability:blush:
Lambda Moses (02:58:28) (in thread): > Right, what goes in SD and what goes in SFE is up to discussion. But vector representation of cell segmentation may be more efficient than raster masks in some cases, like more memory efficient. It remains to see if GEOS or sedona (on disk) geometric operations are more efficient than raster logical operations. I haven’t benchmarked, but I think interoperability with vector geometries is worth considering.
Helena L. Crowell (03:08:07) (in thread): > I dont know what you mean by raster, but SD stores masks as Zarr. So they are high-dimensional arrays for us… and (with a delayed backend) would not sit in memory I guess… in fact, everything but points are Zarr (points are stored as parquet files), so that’s what we get; what one then does (eg, pull out a SCE or friends) is flexible, and another layer in between eg SD and SFE. Perhaps have a look at the SD design doc so understand how different data layers are stored. Aaanyways, Im also not an expert here. So maybe the Python guys know better.
Lambda Moses (03:14:06) (in thread): > I mean by raster something like images, where you have an array whose pixels take values. Vector means coordinates of points and vertices of line strings and polygons. Polygons are represented with fewer vertices than raster pixels. What I’m interested in is interoperability between sf and the points, labels, and shapes layers in SD if those can extract data from images, or if the vector geometries can be directly used to extract image data. I wonder how the polygons are represented. I also wonder how on disk vector geometric operations with sedona compares to raster operations within OME-NGFF.
Nils Eling (05:19:51) (in thread): > SpatialData stores images as multi-scale, chunked arrays and masks as arrays (potentially already multi-scale and chunked). The in-memory representation of both would be arrays (so raster data). Raster masks are the most common way of storing segmentations as they best represent pixel information. So generating polygons out of segmentation masks for efficient in-memory representation imo should be an analysis tasks and not directly included in a future SpatialData package.
2023-08-12
Lambda Moses (00:12:08): > I still think vector raster interoperability is relevant because sometimes cell segmentation results are polygons like from StarDist and it’s more intuitive to draw polygons when annotating histological regions. Anyway, however the interoperability goes, I may write methods for SpatialData in Voyager.
2023-08-14
Josh Moore (09:39:40): > @Josh Moore has joined the channel
2023-08-23
Luca Marconato (18:41:52): > Hi all, here is a set of lightweight datasets that can be used to aid the development of methods interoperable with spatialdata. The resource will be improved over time but it can be already used. Sorry if it took long to share it with you.https://github.com/scverse/spatialdata-notebooks/blob/dev_notebooks/notebooks/developers_resources/storage_format/Readme.md
2023-08-24
Nils Eling (04:26:54) (in thread): > Do you know if there is something similar for OME-NGFF based on the current specs? So something likehttps://idr.github.io/ome-ngff-samples/but more for development purposes? - Attachment (IDR OME-NGFF Samples): Catalog of IDR images formatted as OME-NGFF > A collection of OME-NGFF filesets converted from IDR data
Luca Marconato (07:27:18) (in thread): > I am not aware of such a resource,@Josh Mooredo you know? It would be nice to have it for ome-zarr-py. > > Anyway, a good approximation would be to look the examples in the NGFF repo:https://github.com/ome/ngff/tree/main/latest/examples.
Josh Moore (07:30:09) (in thread): > @Nils Eling: Sorry, I’m not following what you want. Examples of the upcoming 0.5 spec (as “current”)?
Nils Eling (07:36:37) (in thread): > Just very small datasets containing all relevant dimensions (t,c,z,y,x) and metadata for testing purposes. I’ll soon try to provide OME-Zarr support forcytomapper
and ideally would like to include a tiny dataset (a few Mb) in the package itself. But I guess accessing larger example data from a cloud storage would also do.
Josh Moore (09:58:02) (in thread): > Intersting. The IDR collection is intended to cover each of the specs since we chose ones that would test whatever spec we were currently working on, but you’re right they aren’t particularlysmall. Interestingly, (for many purposes) you can just copy all the filesexceptthe chunks and still have valid OME-Zarrs in case that helps. But:+1:for the suggestion. In my world, that would probably best live underhttps://downloads.openmicroscopy.org/images
Nils Eling (10:01:50) (in thread): > Yes, I have been testing the package on different datasets from the IDR collection and that’s perfectly fine. And it’s also easy to subset the array to the required size - so it’s easy to do on my side. I was just wondering if there are tiny datasets for developmental purposes. Thanks for the input!
2023-09-12
Jiwoon Park (21:49:40): > @Jiwoon Park has joined the channel
2023-09-13
Ruben Dries (10:57:31): > @Ruben Dries has joined the channel
Christopher Chin (17:05:19): > @Christopher Chin has joined the channel
2023-09-20
Alik Huseynov (04:22:02): > @Alik Huseynov has joined the channel
Jaykishan (05:29:54): > @Jaykishan has joined the channel
2023-11-28
Helena L. Crowell (01:37:26): > :eyes:https://www.biorxiv.org/content/10.1101/2023.11.26.568752v1 - Attachment (bioRxiv): Giotto Suite: a multi-scale and technology-agnostic spatial multi-omics analysis ecosystem > Emerging spatial omics technologies continue to advance the molecular mapping of tissue architecture and the investigation of gene regulation and cellular crosstalk, which in turn provide new mechanistic insights into a wide range of biological processes and diseases. Such technologies provide an increasingly large amount of information content at multiple spatial scales. However, representing and harmonizing diverse spatial datasets efficiently, including combining multiple modalities or spatial scales in a scalable and flexible manner, remains a substantial challenge. Here, we present Giotto Suite, a suite of open-source software packages that underlies a fully modular and integrated spatial data analysis toolbox. At its core, Giotto Suite is centered around an innovative and technology-agnostic data framework embedded in the R software environment, which allows the representation and integration of virtually any type of spatial omics data at any spatial resolution. In addition, Giotto Suite provides both scalable and extensible end-to-end solutions for data analysis, integration, and visualization. Giotto Suite integrates molecular, morphology, spatial, and annotated feature information to create a responsive and flexible workflow for multi-scale, multi-omic data analyses, as demonstrated here by applications to several state-of-the-art spatial technologies. Furthermore, Giotto Suite builds upon interoperable interfaces and data structures that bridge the established fields of genomics and spatial data science, thereby enabling independent developers to create custom-engineered pipelines. As such, Giotto Suite creates an immersive ecosystem for spatial multi-omic data analysis. > > ### Competing Interest Statement > > The authors have declared no competing interest.
Jiaji George Chen (15:38:23): > @Jiaji George Chen has joined the channel
Joselyn Chávez (15:52:47): > @Joselyn Chávez has joined the channel
Joselyn Chávez (15:54:17) (in thread): > Thanks a lot for sharing@Helena L. Crowellif someone has any questions,@Jiaji George Chenand I would be happy to help:smiley:
2023-11-29
Alik Huseynov (12:46:25) (in thread): > Hi there, I haven’t tried Giotto and thought to give it try to load Xenium data. > Does thecreateGiottoXeniumObject
load themorphology_mip.ome.tif
and/ormorphology_focus.ome.tif
as well? Thanks
2023-11-30
Alik Huseynov (11:40:50) (in thread): > Since Xenium output has only.ome.tif
images, what would be the best way to read/add those images to Giotto object? > I haven’t found anything related to that.
Jiaji George Chen (11:42:43) (in thread): > Hi Alik, we’re currently working on some of this since we noticed that there are now affine transforms in the xenium outputs folder since the last time we looked.
Jiaji George Chen (11:46:58) (in thread): > For the image formats, is .tif also an expected output format? I see them in the xenium outs bundles. We work with our images by sampling using GDAL right now, so we have been converting .ome.tiff to .tiff. Not the best solution
Alik Huseynov (11:47:08) (in thread): > Hei Jiaji. yeah, when I implementedreadXenium
for SpatialFeatureExperiement, I noticed that the there is some shift between image and cell or nuclei segmentation polygons for new Xenium datasets. Things do match perfectly on some older datasets.
Alik Huseynov (11:54:03) (in thread): > there are onlyome.tif
files in output, no standard.tif
. So we ended up usingRBioFormats
basically it would read the ome tif file and store it as.tif
in the Xenium output folder. Since we are also usingterra
, that works to load that converted.tif
Alik Huseynov (11:54:47) (in thread): > do you have any details on current affine transforms Xenium does? Thanks
Jiaji George Chen (11:58:04) (in thread): > Not too much, just noticed them yesterday, after not checking for a while. I think they’re new. They don’t seem to be part of the standard output bundle which makes them a bit sketchy to rely on, but they are in the supplemental files of this dataset at least, along with a set of .tif files.https://www.10xgenomics.com/products/xenium-in-situ/preview-dataset-human-breast
Alik Huseynov (15:08:42) (in thread): > yeah, seem strange to have image alignment files as supp. files, we don’t get those as part of standard XeniumRangerouts
, they seems to come from XeniumExplorer ->https://www.10xgenomics.com/support/software/xenium-explorer/tutorials/xe-image-alignmentI used that standardXenium_FFPE_Human_Breast_Cancer_Rep1_outs
output as well. That dataset’s ome tif image files seem fine. > this one is not alignedhttps://www.10xgenomics.com/resources/datasets/xenium-human-brain-preview-data-1-standardyou can take a look at some of the polygons & image overlays here:https://github.com/pachterlab/SpatialFeatureExperiment/issues/10#issuecomment-1819195530https://github.com/pachterlab/SpatialFeatureExperiment/issues/10#issuecomment-1830769323it might be that the affine transforms are stored in the metadata of ome tif, say inmorphology_mip.ome.tif
Junxiang Xu (16:10:20): > @Junxiang Xu has joined the channel
2023-12-06
Alik Huseynov (05:48:34) (in thread): > FYI, regarding misalignment between low resolution images frommorphology_mip.ome.tif
and actual segmentation polygons ->https://github.com/pachterlab/SpatialFeatureExperiment/issues/10#issuecomment-1842627199Not sure, if you had exactly the same issue of misalignment.
2024-01-04
Artür Manukyan (05:42:32): > @Artür Manukyan has joined the channel
2024-02-01
Benjamin Rombaut (08:03:02): > @Benjamin Rombaut has joined the channel
Benjamin Rombaut (08:15:28): > Hi everyone! We’re organising a three-dayhackathonthis June in Ghent, before ourVIB Spatial Omics conferencelater that week. The topic is development ofspatial omics tools and methods.There is a focus on Python, but other languages such as R and JavaScript are of course also welcome! SomeanndataRdevelopers are joining for example. Clickthis linkfor more details on the workgroups and topics. > Please promote this event in your institution and fill in the application form if you’re interested. Early registration is recommended as seats are limited. The application deadline is March 8th. - Attachment (vibconferences.be): Spatial Omics > 13-14 June 2024, Ghent, Belgium A VIB Tools and Technologies conference - Attachment (HackMD): VIB Hackathon June 2024 on spatial omics - HackMD > Last updated: 22th January 2024
2024-03-02
Bishoy Wadie (08:49:01): > @Bishoy Wadie has joined the channel
2024-03-06
Michael Lynch (08:00:33): > @Michael Lynch has joined the channel
2024-04-17
Chenyue Lu (10:59:46): > @Chenyue Lu has joined the channel
2024-04-19
Lambda Moses (01:59:03): > https://r-spatial.org/r/2022/09/13/zarr.html
2024-04-29
Lambda Moses (17:37:32): > https://duckdb.org/docs/extensions/spatial.html - Attachment (DuckDB): Spatial Extension > The spatial extension provides support for geospatial data processing in DuckDB. For an overview of the extension, see our blog post. Installing and Loading To install and load the spatial extension, run: INSTALL spatial; LOAD spatial; GEOMETRY Type The core of the spatial extension is the GEOMETRY type. If you’re unfamiliar with geospatial data and GIS tooling, this type probably works very different from what you’d expect. In short, while the GEOMETRY type is a binary representation of “geometry” data made up out of sets of vertices (pairs of X and Y double precision floats), it actually stores one of…
2024-05-10
Robert Castelo (12:30:20): > @Robert Castelo has joined the channel
Robert Castelo (12:33:49): > Hi, I’d like to convert thisAnnData (.h5ad) objectinto an SpatialExperiment object, I’ve been googling for this and only foundzellkonverter::AnnData2SCE()
, which converts to aSingleCellExperiment
object. Is there somewhere such a conversion function or workflow? Thanks!
2024-05-11
Artür Manukyan (13:42:30) (in thread): > anndataR repo still doesn’t have this utility right ? perhaps could be a milestone in the upcoming VIB hackathon ?https://github.com/scverse/anndataR
Artür Manukyan (13:43:14) (in thread): > Should be easy considering SPE inherits SCE
2024-05-12
Robert Castelo (05:38:22) (in thread): > I see, another question then, I tried the routeAnnData
->Seurat
->SpatialExperiment
, but I get an error in the conversion fromAnnData
toSeurat
, which I thought at least that one should work, any hint would be highly appreciated, here is the code and the error: > > library(Seurat) > library(SeuratDisk) > > Convert("GSE171351_combined_visium.h5ad", dest = "h5seurat") > Warning: Unknown file type: h5ad > Warning: 'assay' not set, setting to 'RNA' > Creating h5Seurat file for version 3.1.5.9900 > Adding X as data > Adding X as counts > Adding meta.features from var > Adding spatial as cell embeddings for spatial > Adding miscellaneous information for spatial > seuobj <- LoadH5Seurat('GSE171351_combined_visium.h5seurat', misc=FALSE) > Validating h5Seurat file > Initializing RNA with data > Adding counts for RNA > Adding feature-level metadata for RNA > Adding reduction spatial > Adding cell embeddings for spatial > Adding miscellaneous information for spatial > Error in if (!x[[i]]$dims) { : the condition has length > 1 > traceback() > 16: .local(x, ...) > 15: as.list(x = x[[i]], ...) > 14: as.list(x = x[[i]], ...) > 13: .local(x, ...) > 12: as.list(x = x[[i]], ...) > 11: as.list(x = x[[i]], ...) > 10: .local(x, ...) > 9: as.list(x = reduc.group[["misc"]]) > 8: as.list(x = reduc.group[["misc"]]) > 7: AssembleDimReduc(reduction = reduc, file = x, verbose = verbose) > 6: as.Seurat.h5Seurat(x = file, assays = assays, reductions = reductions, > graphs = graphs, neighbors = neighbors, images = images, > meta.data = meta.data, commands = commands, misc = misc, > tools = tools, verbose = verbose, ...) > 5: as.Seurat(x = file, assays = assays, reductions = reductions, > graphs = graphs, neighbors = neighbors, images = images, > meta.data = meta.data, commands = commands, misc = misc, > tools = tools, verbose = verbose, ...) > 4: LoadH5Seurat.h5Seurat(file = hfile, assays = assays, reductions = reductions, > graphs = graphs, neighbors = neighbors, images = images, > meta.data = meta.data, commands = commands, misc = misc, > tools = tools, verbose = verbose, ...) > 3: LoadH5Seurat(file = hfile, assays = assays, reductions = reductions, > graphs = graphs, neighbors = neighbors, images = images, > meta.data = meta.data, commands = commands, misc = misc, > tools = tools, verbose = verbose, ...) > 2: LoadH5Seurat.character("GSE171351_combined_visium.h5seurat", > misc = FALSE) > 1: LoadH5Seurat("GSE171351_combined_visium.h5seurat", misc = FALSE) > sessionInfo() > R version 4.4.0 (2024-04-24) > Platform: x86_64-pc-linux-gnu > Running under: Ubuntu 20.04.5 LTS > > Matrix products: default > BLAS: /home/rcastelo/Soft/R/R-4.4.0/lib/R/lib/libRblas.so > LAPACK: /home/rcastelo/Soft/R/R-4.4.0/lib/R/lib/libRlapack.so; LAPACK version 3.12.0 > > 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 > > time zone: Europe/Madrid > tzcode source: system (glibc) > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: [17/124] > [1] SeuratDisk_0.0.0.9021 Seurat_5.0.3 SeuratObject_5.0.2 > [4] sp_2.1-4 nvimcom_0.9-28 colorout_1.3-0.2 > > loaded via a namespace (and not attached): > [1] deldir_2.0-4 pbapply_1.7-2 gridExtra_2.3 > [4] rlang_1.1.3 magrittr_2.0.3 RcppAnnoy_0.0.22 > [7] matrixStats_1.3.0 ggridges_0.5.6 compiler_4.4.0 > [10] spatstat.geom_3.2-9 png_0.1-8 vctrs_0.6.5 > [13] reshape2_1.4.4 hdf5r_1.3.10 stringr_1.5.1 > [16] crayon_1.5.2 pkgconfig_2.0.3 fastmap_1.1.1 > [19] utf8_1.2.4 promises_1.3.0 bit_4.0.5 > [22] purrr_1.0.2 jsonlite_1.8.8 goftest_1.2-3 > [25] later_1.3.2 spatstat.utils_3.0-4 irlba_2.3.5.1 > [28] parallel_4.4.0 cluster_2.1.6 R6_2.5.1 > [31] ica_1.0-3 stringi_1.8.4 RColorBrewer_1.1-3 > [34] spatstat.data_3.0-4 reticulate_1.36.1 parallelly_1.37.1 > [37] lmtest_0.9-40 scattermore_1.2 Rcpp_1.0.12 > [40] tensor_1.5 future.apply_1.11.2 zoo_1.8-12 > [43] sctransform_0.4.1 httpuv_1.6.15 Matrix_1.7-0 > [46] splines_4.4.0 igraph_2.0.3 tidyselect_1.2.1 > [49] abind_1.4-5 spatstat.random_3.2-3 codetools_0.2-20 > [52] miniUI_0.1.1.1 spatstat.explore_3.2-7 listenv_0.9.1 > [55] lattice_0.22-6 tibble_3.2.1 plyr_1.8.9 > [58] withr_3.0.0 shiny_1.8.1.1 ROCR_1.0-11 > [61] Rtsne_0.17 future_1.33.2 fastDummies_1.7.3 > [64] survival_3.6-4 polyclip_1.10-6 fitdistrplus_1.1-11 > [67] pillar_1.9.0 KernSmooth_2.23-22 plotly_4.10.4 > [70] generics_0.1.3 RcppHNSW_0.6.0 ggplot2_3.5.1 > [73] munsell_0.5.1 scales_1.3.0 globals_0.16.3 > [76] xtable_1.8-4 glue_1.7.0 lazyeval_0.2.2 > [79] tools_4.4.0 data.table_1.15.4 RSpectra_0.16-1 > [82] RANN_2.6.1 leiden_0.4.3.1 dotCall64_1.1-1 > [85] cowplot_1.1.3 grid_4.4.0 tidyr_1.3.1 > [88] colorspace_2.1-0 nlme_3.1-164 patchwork_1.2.0 > [91] cli_3.6.2 spatstat.sparse_3.0-3 spam_2.10-0 > [94] fansi_1.0.6 viridisLite_0.4.2 dplyr_1.1.4 > [97] uwot_0.2.2 gtable_0.3.5 digest_0.6.35 > [100] progressr_0.14.0 ggrepel_0.9.5 htmlwidgets_1.6.4 > [103] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 > [106] mime_0.12 bit64_4.0.5 MASS_7.3-60.2 >
Artür Manukyan (14:39:22) (in thread): > it seems your h5ad is violating an assumption ofSeuratDisk::Convert
. I must admit that how people treating Visium datasets are a bit wild west (no consensus yet). Can you also tryto_Seurat()
fromanndataR
(https://github.com/scverse/anndataR), otherwise you may need to go manual on this, or are there other suggestions ?
2024-05-13
Robert Castelo (04:43:27) (in thread): > hi, thanks for the suggestion, let me clarify that this is not an h5ad file that I’ve produced myself, this data from a publication deposited at GEO (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE171351). I’ve triedanndataR
, but it chokes when reading the file: > > library(anndataR) > > adat <- read_h5ad("GSE171351_combined_visium.h5ad", to="InMemoryAnnData") > Error in initialize(...) : > H5AD encoding information is missing. This file may have been created with Python anndata<0.8.0. >
> apparently because the file was created with an “old” version (probably 3 to 4 yr old as the data at GEO has a publication date from 2021) ofanndata
. Without reading the file into an object, I cannot callto_Seurat()
. It’s a pity that an object serialization parser or format is not backwards compatible at least for 5 to 10 years, specially for publicly available scientific data. Incidentally, I can read this h5ad file with the CRAN package anndata: > > library(anndata) > > adobj <- read_h5ad("GSE171351_combined_visium.h5ad") > adobj > AnnData object with n_obs × n_vars = 4086 × 33538 > obs: 'in_tissue', 'array_row', 'array_col', 'sampleID', 'Patient', 'n_genes_by_counts', 'log1p_n_genes_by_counts', 'total_counts', 'log1p_total_counts', 'pct_counts_in_top_50_genes', 'pct_counts_in_top_100_genes', 'pct_counts_in_top_200_genes', 'pct_counts_in_top_500_genes', 'total_counts_mt', 'log1p_total_counts_mt', 'pct_counts_mt', 'n_counts' > var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells_by_counts', 'mean_counts', 'log1p_mean_counts', 'pct_dropout_by_counts', 'total_counts', 'log1p_total_counts' > uns: 'spatial' > obsm: 'spatial' >
> but, I don’t know how to proceed from this point to built anSpatialExperiment
object, or at least aSeurat
object. You mention that I may to go manual on this, do you know of any URL with hints on how to do that?
Artür Manukyan (08:10:34) (in thread): > Ah yes you have already shared the h5ad file. Since SPE directly inherits from SCE, the only thing that SPE has in addition are the coordinates and the images, I was wondering if you can parse em and insert to a SPE yourself … I would suggest converting the h5ad into an SCE, then manually export and import the coordinates and raster images yourself
Artür Manukyan (08:12:11) (in thread): > I would also love it if anybody from the anndataR project shares opinion here
Artür Manukyan (13:11:18) (in thread): > For those who are interested this is how Robert has solved it:https://github.com/theislab/zellkonverter/issues/61https://github.com/drighelli/SpatialExperiment/pull/122 - Attachment: #61 conversion between AnnData and SpatialExperiment object. - Attachment: #122 Rebased the SpatialImage classes on Annotated.
2024-06-11
Niklas Beumer (01:52:52): > @Niklas Beumer has joined the channel
2024-06-24
Charlotte Soneson (03:03:38): > @Charlotte Soneson has joined the channel
2024-08-04
sunnyday (14:58:48): > @sunnyday has joined the channel
2024-08-14
Kylie Bemis (22:37:58): > @Kylie Bemis has joined the channel
2024-11-11
Harry Mueller (18:08:13): > @Harry Mueller has joined the channel
2024-11-15
Louise (14:59:31): > @Louise has joined the channel
2025-01-09
Ammar Sabir Cheema (11:41:02): > @Ammar Sabir Cheema has joined the channel
2025-01-10
Brian Repko (09:27:26): > @Brian Repko has joined the channel
2025-03-18
Julien Roux (05:09:22): > @Julien Roux has joined the channel