BodenmillerGroup/imctoolkit

cell_properties export as NaN

Closed this issue · 1 comments

Cell properties (area, eccentricity etc) for an ImageSingleCellData() object display properly in
ImageSingleCellData().regionprops_table.

However, when exported to_anndata(), with...
ImageSingleCellData().to_anndata(cell_properties=True, cell_channel_properties=True)
...cell properties are exported as NaN. The cell_channel_properties to adata.layers exports work fine.

My current work around is to therefore only export cell_channel_properties and add cell_properties into my adata object as new obs columns individually

ImageSingleCellData().to_anndata(cell_properties=False, cell_channel_properties=True)
for feature in sc_data.regionprops_table.columns:
        adata.obs[feature ] = list(sc_data.regionprops_table[feature ])

Though, I suspect there is a neater solution.

Uhm, this sounds like a bug. Will fix asap!