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

Enable propagating obs columns to individual modalities #2

Closed
mffrank opened this issue Oct 21, 2021 · 1 comment
Closed

Enable propagating obs columns to individual modalities #2

mffrank opened this issue Oct 21, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@mffrank
Copy link
Contributor

mffrank commented Oct 21, 2021

There is currently no way of propagating columns in the global .obs slot of a mudata object to all modalities. This could be a useful feature, e.g. when you have metadata that you want to be present in all modalites (for example when unimodal methods depend on that metadata).

I think the easiest solution would be to have a mdata.propagate_obs() method that looks through the columns of the mudata.obs table and writes columns not currently present in the individual modalites to their respective .obs in 2 ways:

  • columns without without a modname: prefix are written to all modalities
  • columns with modname:xxx are written to the .obs of modname

This would enable something like this:

mdata.obs.merge(metadata)
mdata.propagate_obs()
@mffrank mffrank added the enhancement New feature or request label Oct 21, 2021
@mffrank mffrank mentioned this issue Oct 21, 2021
@gtca
Copy link
Collaborator

gtca commented Jul 3, 2024

This is now implemented with the pull/push interface in #56

@gtca gtca closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants