Skip to content

Conversation

@berombau
Copy link
Contributor

Redo of previous work in #156.

This tries to solve #155.

Lung_adc_demo

from spatialdata_io import macsima
sdata = macsima('./Lung_adc_demo', subset=1000)
sdata

Note that now the cycle information is added to a table and that the coordinate systems are named after the dataset.

SpatialData object
├── Images
│     └── 'Lung_adc_demo_image': DataTree[cyx] (116, 1000, 1000), (116, 500, 500)
└── Tables
      └── 'Lung_adc_demo_table': AnnData (0, 116)
with coordinate systems:
    ▸ 'Lung_adc_demo', with elements:
        Lung_adc_demo_image (Images)

For the LiverCellAtlas data, it stores all middle cycle nuclei channels in a different image and table.

SpatialData object
├── Images
│     ├── 'HumanLiverH36_image': DataTree[cyx] (102, 5772, 6621), (102, 2886, 3310), (102, 1443, 1655), (102, 721, 827)
│     └── 'HumanLiverH36_nuclei_image': DataTree[cyx] (50, 5772, 6621), (50, 2886, 3310), (50, 1443, 1655), (50, 721, 827)
└── Tables
      ├── 'HumanLiverH36_nuclei_table': AnnData (0, 50)
      └── 'HumanLiverH36_table': AnnData (0, 102)
with coordinate systems:
    ▸ 'HumanLiverH36', with elements:
        HumanLiverH36_image (Images), HumanLiverH36_nuclei_image (Images)

Parsing of raw data should be another PR. It differs in the handling of metadata for channels and cycles from https://gustaveroussy.github.io/sopa/api/io/#sopa.io.macsima @quentinblampey.

The channel naming is different (R{cycle} {marker} instead of {marker}{ (duplicate_number if duplicate markers)). I like both styles, so I'll try to add later style as well and add a parameter.

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 27.35849% with 154 lines in your changes missing coverage. Please review.

Project coverage is 43.68%. Comparing base (ed60d9f) to head (c4f6cf7).
Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
src/spatialdata_io/readers/macsima.py 28.97% 125 Missing ⚠️
src/spatialdata_io/readers/_utils/_utils.py 17.14% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #224      +/-   ##
==========================================
- Coverage   45.31%   43.68%   -1.63%     
==========================================
  Files          22       23       +1     
  Lines        2143     2353     +210     
==========================================
+ Hits          971     1028      +57     
- Misses       1172     1325     +153     
Files with missing lines Coverage Δ
src/spatialdata_io/__init__.py 100.00% <100.00%> (ø)
src/spatialdata_io/readers/_utils/_utils.py 31.46% <17.14%> (-9.29%) ⬇️
src/spatialdata_io/readers/macsima.py 28.97% <28.97%> (ø)

@berombau berombau changed the title [WIP] add macsima reader add macsima reader Oct 22, 2024
@LucaMarconato LucaMarconato requested a review from Copilot December 6, 2024 14:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 suggestion.

@LucaMarconato LucaMarconato linked an issue Dec 6, 2024 that may be closed by this pull request
12 tasks
Copy link
Member

@LucaMarconato LucaMarconato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @berombau! And it was a nice sprint today. Ready to merge!

@LucaMarconato LucaMarconato merged commit 5d537d6 into scverse:main Dec 6, 2024
5 checks passed
@LucaMarconato LucaMarconato changed the title add macsima reader MACSima: added reader Jan 20, 2025
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.

Support for MACSima data

3 participants