Skip to content

Conversation

@MSHelm
Copy link

@MSHelm MSHelm commented Dec 10, 2025

Fixes #348

The parser now tries to use the filename stored in the tiff metadata, if it exists. This is more robust, as users typically do not modify these entries.
If this metadata doesnt exist (which is the case for older data), it falls back to the actual filename.

Since the lung dataset used for testing is using an old format, I added a newer data set that is publicy available (https://zenodo.org/records/14008816). I documented this in the tests as well.

Full disclosure: I am working for Miltenyi, but I love your work ;)

@MSHelm MSHelm changed the title Parse cycle from ame in tiff metadata, not actual filename Parse macsima cycle from name in tiff metadata, not actual filename Dec 10, 2025
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 12.29050% with 157 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.09%. Comparing base (301650e) to head (cef7170).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/spatialdata_io/readers/macsima.py 12.29% 157 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (301650e) and HEAD (cef7170). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (301650e) HEAD (cef7170)
3 2
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #349       +/-   ##
===========================================
- Coverage   55.20%   36.09%   -19.11%     
===========================================
  Files          26       26               
  Lines        2806     2970      +164     
===========================================
- Hits         1549     1072      -477     
- Misses       1257     1898      +641     
Files with missing lines Coverage Δ
src/spatialdata_io/readers/macsima.py 21.19% <12.29%> (-7.38%) ⬇️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MSHelm
Copy link
Author

MSHelm commented Dec 12, 2025

I checked the tests and the failing ones are all due to some Xenium and Visium HD readers, which I didnt touch XD Did they exist before this PR already?

@MSHelm
Copy link
Author

MSHelm commented Dec 16, 2025

Hey everyone,
with the last commits this turned into a bit of a bigger contribution. With this PR, we now solely rely on the metadata stored in the OME object. This should be significantly more robust than parsing file names, and enables us to add more metadata. In principle there would be even more information available than I currently implemented, but I think the most interesting bits are covered here.

I implemented 2 versions of the parser, as there are 2 different formats of the metadata. I removed the previously used data sets, as they are not part of the CI. Instead, I added 2 publicly available data sets, one for each version.

I tried modifying the github action to download them, but it seems that this was not really successful. If someone can give me some pointers that would be wonderful.

Cheers!

@MSHelm MSHelm changed the title Parse macsima cycle from name in tiff metadata, not actual filename Parse entire macsima metadata from OME metadata Dec 16, 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.

[MACSIMA] Parsing cycle number from filename doesnt work for renamed files

2 participants