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

make obs names unique #133

Merged
merged 8 commits into from
Apr 24, 2024
Merged

make obs names unique #133

merged 8 commits into from
Apr 24, 2024

Conversation

melonora
Copy link
Collaborator

@melonora melonora commented Apr 2, 2024

This PR should fix the issue reported here. Also added a warning of the operation being performed. We could optionally leave that out.

@LucaMarconato
Copy link
Member

Unfortunately I don't thinks this implementation is correct because, in Visium, the obs are made unique after the old column is used to for the index of the shapes. I will change this to call obs_names_make_unique() before creating the shapes element.

Also, in Visium HD we use integers for the instance_key column, so there is no need to make the obs names unique; I will remove that.

Ideally, Visium and Visium HD should either both have integers of strings as names. But the matching between shapes and tables works in both case, and for backward compatibility it is probably better to keep things as they are now.

@LucaMarconato
Copy link
Member

@melonora if it looks good to you please proceed with merging.

@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 36.10%. Comparing base (521a24d) to head (766b5b5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #133      +/-   ##
==========================================
- Coverage   36.17%   36.10%   -0.07%     
==========================================
  Files          19       19              
  Lines        1692     1695       +3     
==========================================
  Hits          612      612              
- Misses       1080     1083       +3     
Files Coverage Δ
src/spatialdata_io/readers/visium_hd.py 21.73% <ø> (ø)
src/spatialdata_io/readers/visium.py 20.83% <0.00%> (-0.54%) ⬇️

@giovp
Copy link
Member

giovp commented Apr 24, 2024

@melonora quick release note would be great thanks!

@melonora
Copy link
Collaborator Author

pre-commit.ci run

@melonora melonora merged commit de79d25 into scverse:main Apr 24, 2024
5 checks passed
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