Skip to content

fix visium_hd #138

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

Merged
merged 3 commits into from
Apr 16, 2025
Merged

fix visium_hd #138

merged 3 commits into from
Apr 16, 2025

Conversation

melonora
Copy link
Collaborator

This PR is dependent on scverse/spatialdata-plot#446. Furthermore, the gene expression data is in a different coordinate system now, namely Visium_HD_Mouse_Small_Intestine. This coordinate system does not have the image elment Visium_HD_Mouse_Small_Intestine_full_image anymore. This element is only present in global. This PR therefore uses in that case Visium_HD_Mouse_Small_Intestine_hires_image instead.

This makes it so that the notebook can run, but some of the resulting plots have changed as a result. @LucaMarconato is the change of where element live intended and thus this PR is ok, or is this actually showing an issue in the visiumhd reader?

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@melonora melonora merged commit dad79ab into scverse:main Apr 16, 2025
1 of 2 checks passed
@LucaMarconato
Copy link
Member

Thanks! I compared the latest rendered notebook (just released) and an older render (for instance this one from a few weeks ago). All the plots are identical except for one (I think that when you wrote the comment more plots were different, but then you used my fix in spatialdata-io that put back the elements in the correct coordinate systems).

The plot that is different is the following (it seems due to a change in spatialdata-plot, and not something related to Visium HD).

expected

image

we get

image

@LucaMarconato
Copy link
Member

I dug into this. There is no spatialdata-plot being called there so the problem is elsewhere and after some explorations I think it's due to a change in the defaults of imshow().

I added a call to plt.spy() in the notebook, which now shows the desired output, as shown below.

image

@LucaMarconato
Copy link
Member

I updated the notebook in this PR: #143.

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.

2 participants