scverse/spatialdata

Detach SpatialData object from its Zarr store

Opened this issue · 3 comments

Is there an easy way to detach a SpatialData object from its Zarr store? Say I have a smallish object that fits into memory and I want to make some experimental changes without possibly changing the data on disk, what is the recommended workflow? Thanks in advance!

hmm could do something like this:

#sdata here is your backed sdata
sdata = sd.SpatialData(
            images=sdata.images,
            labels=sdata.labels ,
            points=sdata.points,
            shapes=sdata.shapes,
            tables=sdata.tables,
        )

Unfortunately this will not work. The code above would still lead to a Dask-backed object, and now the object would stop being "self-contained". What you would need is what is described in this comment, which is not currently implemented. We could work on this in the end of November, after some deadlines are past. #293 (comment)

Unfortunately this will not work. The code above would still lead to a Dask-backed object, and now the object would stop being "self-contained". What you would need is what is described in this comment, which is not currently implemented. We could work on this in the end of November, after some deadlines are past. #293 (comment)

Something like this would be really cool. Looking forward! :)