ckmah / bento-tools

A Python toolkit for subcellular analysis of spatial transcriptomics data
https://bento-tools.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
56 stars 6 forks source link

Loading in Merfish geopandas .parquet segmentation mask #100

Closed pakiessling closed 1 year ago

pakiessling commented 1 year ago

Thank you for the tool, exited to try it out.

Could you give a humble biologist some pointers on how to load in Merfish output data? The segmentation is saved as geopandas in a .parquet file.

I assume I need to use bento.io.prepare and rasteriofor this, but it is not entirely clear to me.

ckmah commented 1 year ago

Hi @pakiessling , we are working on a workflow with the recently announced SpatialData data structure, which we think is an effective way to store large spatial omics datasets with support for storing molecule and cell segmentation data we use in Bento. I would look at SpatialData-IO for ingesting datasets. Stay tuned for updates 😄

If you can't wait and want to get your hands dirty, we started writing some functions that deal with parsing parquet files from Xenium data for shapes but they are not available yet. You can find them here, but it is messy. Hope that helps for now. https://github.com/ckmah/bento-tools/blob/0021f59b9c644cfdf9bba1143e06f8bdfadc3541/bento/io/_io.py#L470

pakiessling commented 1 year ago

@ckmah Perfect, thanks a lot