Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename coordinate systems in visium #266

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Rename coordinate systems in visium #266

wants to merge 2 commits into from

Conversation

grst
Copy link
Contributor

@grst grst commented Jan 21, 2025

Hi @LucaMarconato,

here I propose to rename the coordinate systems to the dataset id as discussed on discourse. Having unique names makes it easier when working with multiple samples.

With this change reading in a visium sample with dataset_id sample2 results in the following spatialdata object:

SpatialData object
├── Images
│     ├── 'sample2_hires_image': DataArray[cyx] (3, 2000, 2000)
│     └── 'sample2_lowres_image': DataArray[cyx] (3, 600, 600)
├── Shapes
│     └── 'sample2': GeoDataFrame shape: (523, 2) (2D shapes)
└── Tables
      └── 'table': AnnData (523, 18085)
with coordinate systems:
    ▸ 'sample2', with elements:
        sample2_hires_image (Images), sample2_lowres_image (Images), sample2 (Shapes)
    ▸ 'sample2_downscaled_hires', with elements:
        sample2_hires_image (Images), sample2 (Shapes)
    ▸ 'sample2_downscaled_lowres', with elements:
        sample2_lowres_image (Images), sample2 (Shapes)

If you agree with this change, I can try to also apply it to the other readers.

@grst grst requested a review from LucaMarconato January 21, 2025 08:36
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