aristoteleo / spateo-release

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

about cell segmentation #274

Open Mollyx06 opened 1 month ago

Mollyx06 commented 1 month ago

Hi developers! Thanks for such a thorough tutorial. I'm experimenting with different cell segmentation methods, and the previous process has yielded good tissue segmentation images. I see that spateo performs cell segmentation inputting the most primitive UMI count matrix, is there a way to start with a gef/gem file, or even a tissue segmentation image, and then combine it with a stained image of ssDNA for further cell segmentation? Or is there any way to start directly from Anndata format?

Sichao25 commented 3 weeks ago

Hi, thanks for raising this discussion. If your gef/gem files contain columns like geneID, x, y, MIDCount, ExonCount, I feel like the workflow will be similar to how we use st.io.read_bgi_agg in the tutorial. Additionally, it's always possible to start from AnnData. If you take a look at the code in spateo/io, you'll see that most data-loading functions simply read a DataFrame from the source file and then construct an AnnData object. You can follow the same process to create AnnData from any type of data. Glad to help if you have specific questions when processing your data.