Skip to content

Deconcatenate SpatialData to a list of SpatialData objects#1089

Draft
gboscagli wants to merge 2 commits intoscverse:mainfrom
gboscagli:main
Draft

Deconcatenate SpatialData to a list of SpatialData objects#1089
gboscagli wants to merge 2 commits intoscverse:mainfrom
gboscagli:main

Conversation

@gboscagli
Copy link

Following issue scverse/spatialdata-io#318, I created a deconcatenate() function, alongside a comprehensive test.

This function takes as input a SpatialData object with >1 regions and returns one (or more) SpatialData objects populated only with data from a specific region and transformed to a given coordinate system. Briefly, this function is a wrapper of match_sdata_to_table().

We can also think of an optional parameter controlling the conversion to AnnData. However, to_legacy_anndata() lives inside spatialdata-io, so @LucaMarconato and other users suggested to add the centroids directly in the AnnData table of SpatialData.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant