Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

read_h5mu() fails on files written by mudata <= 0.1.1 (encoding-type "AnnData")

Aperta
#209 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@viranovskaya ci sta già lavorando.

Dal 11/10/2026.

  • #212 di @viranovskaya — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Start with the read_h5mu reader in mudata and the existing backwards-compatibility tests, which begin at v0.1.2 files. Run the reproduction script to confirm the IORegistryError for encoding-type 'AnnData'. Done means legacy files with that spelling read correctly, and a new test covers a pre-0.1.2 file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Report

Since mudata 0.4, read_h5mu() can no longer read .h5mu files written by mudata 0.1.1 or older. Those versions stored each modality with the attribute encoding-type = "AnnData" (capital A), while mudata 0.1.2 and later write "anndata". As modality groups are now read through anndata's IO registry, which only knows the lowercase spelling, the read fails:

anndata._io.specs.registry.IORegistryError: No read method registered for
IOSpec(encoding_type='AnnData', encoding_version='0.1.0') from <class 'h5py._hl.group.Group'>.

This was found in anndataR (scverse/anndataR#511), which currently pins mudata<0.4 because its example file minipbcite.h5mu was written by an old mudata. The existing backwards-compatibility tests start at files from v0.1.2, which is why the regression wasn't caught.

Minimal reproduction, simulating an old file by setting the legacy attribute:

python
import numpy as np, anndata as ad, mudata as md, h5py

m = md.MuData({"rna": ad.AnnData(np.ones((3, 2)))})
m.write("legacy.h5mu")
with h5py.File("legacy.h5mu", "r+") as f:
f["mod/rna"].attrs["encoding-type"] = "AnnData" # as written by mudata <= 0.1.1

md.read_h5mu("legacy.h5mu") # IORegistryError

The same file reads fine with mudata 0.3.10.

A possible fix would be to treat the legacy "AnnData" encoding type as "anndata" when reading modalities, and to add a test for a pre-0.1.2 file.

Versions
mudata 0.4.2.dev19 (main at 26ddfd7); also reported with 0.4.0 and 0.4.1 in scverse/anndataR#511
anndata 0.13.4
Lingua principale
Python
Stelle
134
Fork
28
Merge medio
20h 24m
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scverse/mudata

Tutte le issue di scverse/mudata

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.