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

VisiumHD: detect full-res image when path is relative #230

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

quentinblampey
Copy link
Contributor

There is a minor bug in the Visium HD reader. When we provide a relative path to the data, e.g. "data/Visium_HD_Mouse_Small_Intestine", then it will search for the microscopy image inside "data/Visium_HD_Mouse_Small_Intestine/data/Visium_HD_Mouse_Small_Intestine/microscope_image".

This is because it was using path / fullres_image_file instead of simply fullres_image_file.

I also did some minor updates to use pathlib everywhere instead of a combination of pathlib and os (it makes the code more readable I think).

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 45.30%. Comparing base (ed60d9f) to head (b08eb59).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/spatialdata_io/readers/visium_hd.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #230      +/-   ##
==========================================
- Coverage   45.31%   45.30%   -0.01%     
==========================================
  Files          22       22              
  Lines        2143     2141       -2     
==========================================
- Hits          971      970       -1     
+ Misses       1172     1171       -1     
Files with missing lines Coverage Δ
src/spatialdata_io/readers/visium.py 19.67% <ø> (ø)
src/spatialdata_io/readers/visium_hd.py 18.29% <0.00%> (-0.39%) ⬇️

@quentinblampey
Copy link
Contributor Author

I also set the transformation to the global coordinate system for all elements

@LucaMarconato
Copy link
Member

LucaMarconato commented Nov 29, 2024

Perfect, and thanks for the fix with the paths! I extended the new coordinate system mapping also to Visium data, merging now.

@LucaMarconato LucaMarconato merged commit 82ff327 into scverse:main Nov 29, 2024
5 checks passed
@LucaMarconato LucaMarconato changed the title Detect VisiumHD full-res image when path is relative VisiumHD: detect full-res image when path is relative Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants