scverse/anndataR

Reading in h5ad file from anndata < 0.8.0

Opened this issue · 2 comments

Hi anndataR team,

I am looking at the anndataR package (which is a great resource!) as a way to load h5ad files into R.
In particular, I am interested in the published reference atlases published by the Sanger people on CellAtlas -> Use of the reference for projection mapping via Seurat.

However, I came across an issue which looks like it is related to versioning:

I tested on two different reference atlases -
Colon_cell_atlas -> https://cellgeni.cog.sanger.ac.uk/gutcellatlas/Colon_cell_atlas.h5ad
HCAHeartST10238251 -> https://cellgeni.cog.sanger.ac.uk/heartcellatlas/v2/HCAHeartST10238251.raw.h5ad

The first (HCA) is 4 years old and the second (heart) is less than one month

The Colon did not load while the HCA did -> The error for the colon I got was:

H5AD encoding information is missing. This file may have been created with Python anndata<0.8.0.

Another issue was raised in the anndata github too:
scverse/anndata#731

Which looks like there was a change from <0.8.0 to 0.8.0

I was just wondering whether it would be possible if these older h5ad could be accommodated for?

Thanks,

Dave

Hi

Thanks for trying out {anndataR} already. It's a work in progress so not everything is there yet.

Adding support for older .h5ad file version is difficult because there wasn't a defined specification before anndata v0.8.0. It could be possible to do this but it's a bit of work so we would have to discuss if it's worthwhile.

In the meantime it should be possible to read the older files using one of the packages that wraps Python anndata.

Hi @lazappi

Thank you for the response =)
My main interest was to load in already-made Atlas efforts which were made with < v0.8.0 but it makes sense regarding < v0.8.0 and I can understand the pain about parsing stuff which has no defined specification.
I'll have a go with your suggestion and see how I get along

Dave