aristoteleo / spateo-release

Spatiotemporal modeling of spatial transcriptomics
https://spateo-release.readthedocs.io/
BSD 2-Clause "Simplified" License
205 stars 29 forks source link

How to transfer xenium dataset to Anndata which could be used for 3D visualization #257

Open Yifan-debug opened 3 months ago

Yifan-debug commented 3 months ago

Hi developer.

I'm wondering how to transfer the xenium dataset to anndata which could be used for 3D visualization. And also for the example, where we can downalod the "E7-9h_cellbin_h5ad.zip"

Sichao25 commented 3 months ago

Hi, is the data a .h5 file or something? Anndata has a variety of data reading functions like read_hdf(). They are also available in Spateo.

About the sample data, I feel like the link could be expired. I've opened a separate issue for this. Feel free to report any related issues.

Yifan-debug commented 3 months ago

I actually wanna try the reconsturct the 3D models based on my Xenium dataset. We have cell_feature_matrix.h5. But, I don't know how to load this data to spateo, and how to 3d visualize it.

Sichao25 commented 3 months ago

You could use sc.read_10x_h5(file) if you have scanpy installed. Other options include using st.read_hdf(file, key) from Spateo or the h5py package to extract the necessary information.

Yifan-debug commented 3 months ago

Thank you so much for the suggestion. I'm sorry. I'm not familiar with the hdf5 file format. is this format containing of the the morphology.image. Or any methods to add morphology, and transcripts to the data.

Yifan-debug commented 3 months ago

In addition, I'm wondering what kind of data should be in side of the anndata for 3D construction. or what the E7_8h_cellbin.h5ad including.

Sichao25 commented 2 months ago

HDF5 is just a binary format used for storing large numerical datasets. Personally, I'm not familiar with Xenium datasets, so I can't say for sure what they include. If anyone has insights on this, feel free to share!

Spateo focuses on spatial transcriptomics, so spatial information is essential. To fully take advantage of Spateo's capabilities, it is also recommended to include splicing information (e.g. spliced, unpliced).