read_h5mu() fails on files written by mudata <= 0.1.1 (encoding-type "AnnData")
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scverse/mudata
-
AnnData subclass modalities (e.g. TreeData) lose their extra elements and type on write_h5mu/write_zarr + readForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
scverse/mudata#210 · 17 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Fully typeForse già presa @ilia-kats l’ha presa 51 giorni fa. Aperta
scverse/mudata#196 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
scverse/mudata#111 · 21 commenti · 7 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Concat on diskApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
scverse/mudata#98 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Arbitrary dimensional slicingForse di nuovo libera @eroell l’ha presa 733 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
scverse/mudata#83 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di scverse/mudata
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
pydot/pydot#601 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
letsencrypt/cp-cps#361 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
CI: startup_failure because callers grant fewer permissions than ledger-app-workflows@v1 declaresForse già presa @maykonmichel l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
LedgerHQ/app-boilerplate-rust#227 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
linuxmint/mintupdate#1107 ·