-
Notifications
You must be signed in to change notification settings - Fork 47
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
Adding attrs
at the SpatialData
object level
#711
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #711 +/- ##
==========================================
- Coverage 91.80% 91.78% -0.03%
==========================================
Files 45 45
Lines 6959 7045 +86
==========================================
+ Hits 6389 6466 +77
- Misses 570 579 +9
|
Thanks for the PR.
|
Hi @LucaMarconato, have you started working on your last comment? If not, do you want me to have a look (although I'm not exactly sure to understand what you want to do)? |
I noticed we are missing a feature: after we save a SpatialData object, if we add a new attr, there is currently no way to save it on disk. Something like |
Just a random note on this: I agree that having SpatialData - level attributes would be super helpful. Beyond that, I think it would be great to be able to annotate coordinate systems - these often correspond to samples, conditions, time-points etc. I can of course annotate all elements within a coordinate system through tables, but I think it would be more direct to somehow directly provide metadata for an entire coordinate system. |
I also noticed that we want to pass the The only concern is when we concatenate multiple SpatialData objects, how should we merge the duplicate keys (if any)? NB: I updated the first post with a check-list |
@quentinblampey thanks for the update. I haven't updated the format yet, we can work on it this week at the hackathon. Regarding saving to disk, I suggest to extend the |
Extremely interested in this, thanks @quentinblampey !! |
@quentinblampey I have finalized this PR, I'm going to merge it now. Thanks for your contribution! Two comments.
|
As described in issue #404, it is useful to have attributes at the
SpatialData
object level. This will also be useful in Sopa, to simplify the API.Example Usage
What do you think @LucaMarconato?
Check-list
attrs
attribute to theSpatialData
objectattrs
on disk when the data is not backedattrs
from diskattrs
to new SpatialData objectsattrs
during concatenation