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

TypeError: bt.io.prepare #110

Closed nynkekatinka closed 3 months ago

nynkekatinka commented 10 months ago

Dear team,

I am trying to use your bt.io.prepare function to transform my annotated pictures into an AnnData object. I load the molecules as a np.df, cell_seg and other_seg (DAPI stain) are both np.ndarray. When I run the bt.io.prepare function I get the following error:

image

Seems a bit weird to me given that np.array and np.ndarray are in principle the same, and np.array is asked as input for the cell segmentation.

Looking forward to hear your thoughts.

ckmah commented 10 months ago

Hi @nynkekatinka, thanks for giving this a try! We don't have any tutorials on this yet, we are actually in the middle of refactoring to use SpatialData instead of AnnData, stay tuned for that. It supports ingesting standard output formats from other platforms e.g. Xenium, CosMx, Vizgen, etc.

For your error, try passing a dictionary like so: other_seg={'DAPI': DAPI}. But fair warning we are reworking IO at the moment.

nynkekatinka commented 10 months ago

Hi @ckmah that indeed solved the current issue at hand. I was wondering whether you have any timeline for when you hope to have finished the transition from AnnData to SpatialData?

ckmah commented 3 months ago

Hi @nynkekatinka , I am closing this issue as we have officially transitioned to SpatialData with v2.1. Check out the revamped tutorials and look out for tutorials for major platforms soon!