Skip to content

Conversation

@quentinblampey
Copy link
Contributor

@quentinblampey quentinblampey commented Jul 31, 2023

Hello,

I made a few improvements and fixes for the merscope reader:

  • previously, the table was not kept when subsetting a SpatialData object. This is something I discussed with @LucaMarconato to better understand what was called "region" in the TableModel.parse. Now, region=f"{dataset_id}_polygons", and I create another variable (vizgen_region) to denote the region name used by vizgen, and not mix the two. It now works as intended.
  • The Merscope cell shapes are MultiPolygons with only one polygon. Even though this is not throwing any error, shapes will not be displayed by spatialdata-plot. Now, I use the first (and only) polygon from the MultiPolygon for each cell.
  • Except for the toy dataset, I couldn't save any image to .zarr, because I was not making chunks. I used the same logic as in the xenium reader with the imread_kwargs and image_models_kwargs variables.
  • I now use the micron space by default (instead of the pixels space), which feels more natural because we use to deal with distances in microns.

NB: sorry the 19 first commits shouldn't have been shown (commits from the first PR). Only the last two commits are new

Let me know!

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2023

Codecov Report

Merging #73 (137fe8a) into main (755d475) will decrease coverage by 0.38%.
The diff coverage is 15.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
- Coverage   41.92%   41.54%   -0.38%     
==========================================
  Files          16       16              
  Lines         854      869      +15     
==========================================
+ Hits          358      361       +3     
- Misses        496      508      +12     
Files Changed Coverage Δ
src/spatialdata_io/readers/merscope.py 25.00% <8.33%> (-2.03%) ⬇️
src/spatialdata_io/_constants/_constants.py 100.00% <100.00%> (ø)

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.

Looks great to me, thanks for the refinement!

@LucaMarconato LucaMarconato merged commit f6af2fb into scverse:main Jul 31, 2023
lucas-diedrich pushed a commit to lucas-diedrich/spatialdata-io that referenced this pull request Nov 26, 2024
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.

4 participants