Skip to content

basic support for AnnData accessors#147

Open
ilia-kats wants to merge 1 commit intoscverse:mainfrom
ilia-kats:accessor_support
Open

basic support for AnnData accessors#147
ilia-kats wants to merge 1 commit intoscverse:mainfrom
ilia-kats:accessor_support

Conversation

@ilia-kats
Copy link
Copy Markdown
Collaborator

The main point of this is to still be able to pass MuData objects to scanpy's plotting functions. This is currently possible due to MuData's implementation of obs_vector and var_vector, but if I understand the scanpy changes correctly (e.g. here) this will stop working as soon as anndata 0.13 is released.

The logic is based on the current _attr_vector implementation, which will go away at some point when obs_vector and var_vector are removed.

I'd appreciate some feedback on where else scanpy has switched to accessors. For example, it is currently possible to run sc.pp.neighbors and sc.tl.umap on a MuData object. Have these also switched to using accessors to access .obsm/obsp?

this should keep scanpy plotting working with MuData objects
@ilia-kats ilia-kats requested review from gtca and ilan-gold May 7, 2026 09:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.86%. Comparing base (61f35d2) to head (86fed09).

Files with missing lines Patch % Lines
src/mudata/_core/mudata.py 7.69% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
- Coverage   91.54%   90.86%   -0.69%     
==========================================
  Files          10       10              
  Lines        1585     1598      +13     
==========================================
+ Hits         1451     1452       +1     
- Misses        134      146      +12     
Files with missing lines Coverage Δ
src/mudata/_core/mudata.py 92.09% <7.69%> (-1.30%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant