Skip to content

Make scCODA results writable to h5mu - #1198

Merged
Zethson merged 1 commit into
mainfrom
fix-sccoda-h5mu-write
Nov 4, 2026
Merged

Zethson merged 1 commit into
mainfrom
fix-sccoda-h5mu-write

Conversation

@Zethson

@Zethson Zethson commented Nov 4, 2026

Copy link
Copy Markdown
Member

Closes #1194.
summary_prepare now returns plain float64 DataFrames instead of arviz 1.x's SummaryDataFrame subclass with nullable Float64 columns, so scCODA and tascCODA results stored in varm can be written with write_h5mu again.

arviz 1.x returns az.summary as arviz_stats' SummaryDataFrame, a pandas subclass that survives .loc and .copy, so intercept_df and the effect_df_* frames stored in varm had no anndata writer.
The numpy_nullable conversion additionally turned the float64 summary columns into Float64 extension arrays, which anndata cannot write either.
summary_prepare now returns plain float64 DataFrames; the values are unchanged.
Verified by writing and reading back a sampled haber_2017_regions MuData, which failed on main with arviz 1.3.0 and arviz-stats 1.3.3.
@Zethson
Zethson merged commit f22335a into main Nov 4, 2026
20 of 22 checks passed
@Zethson
Zethson deleted the fix-sccoda-h5mu-write branch November 4, 2026 09:27
@codecov-commenter

codecov-commenter commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.12%. Comparing base (4b52916) to head (5e9c99c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1198   +/-   ##
=======================================
  Coverage   74.12%   74.12%           
=======================================
  Files          57       57           
  Lines        8895     8895           
=======================================
  Hits         6593     6593           
  Misses       2302     2302           
Files with missing lines Coverage Δ
src/pertpy/tools/_coda/_base_coda.py 60.80% <100.00%> (ø)
🚀 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.

cannot save scCODA MuData obj

2 participants