Reading in H5AD File from Human Cell Atlas
2
1
Entering edit mode
18 months ago
Thorerges ▴ 10

I am trying to import single-cell data from the human cell atlas (e.g, https://www.covid19cellatlas.org/#vento18-10x).

I want to use this files within Seurat, however - I keep getting this error:

> kidney <- ReadH5AD("documents/Datasets/Kidney/")
Error in H5File.open(filename, mode, file_create_pl, file_access_pl) : 
  HDF5-API Errors:
    error #000: ../../src/hdf5-1.10.0-1/src/H5F.c in H5Fopen(): line 579: unable to open file
        class: HDF5
        major: File accessibilty
        minor: Unable to open file

    error #001: ../../src/hdf5-1.10.0-1/src/H5Fint.c in H5F_open(): line 1208: unable to read superblock
        class: HDF5
        major: File accessibilty
        minor: Read failed

    error #002: ../../src/hdf5-1.10.0-1/src/H5Fsuper.c in H5F__super_read(): line 271: unable to locate file signature
        class: HDF5
        major: File accessibilty
        minor: Not an HDF5 file

    error #003: ../../src/hdf5-1.10.0-1/src/H5FDint.c in H5FD_locate_signature(): line 124: unable to read file signature
        class: HDF5
        major: Low-level I/O
        minor: Unable to initialize object

    error #004: ../../src/hdf5-1.10.0-1/src/H5FDint.c in H5FD_read(): line 217: driver read request failed
        class: HDF5
        major: Virtual File Layer
        minor: Read fai

Any ideas how to read in H5AD files? This has been pretty challenging for me to figure out.

RNA-Seq R seurat h5ad single-cell • 7.4k views
ADD COMMENT
0
Entering edit mode

Were you able to solve the problem? I am still in the dark trying to figure out!

ADD REPLY
0
Entering edit mode

Please add answers only if you're answering the top level question. If not, use Add Comment or Add Reply as appropriate.

ADD REPLY
3
Entering edit mode
18 months ago
kthorner ▴ 30

Hi, ran into the same issue, trying to use data from the same website!

The best workaround I came up with was first converting to the loom format using anndata, and then importing into Seurat with loomR.

I used something similar to the following:

seurat_file = as.Seurat(loom_file, cells="obs_names", features="var_names", normalized="/matrix")

More information here:

https://satijalab.org/seurat/v3.0/conversion_vignette.html

ADD COMMENT
0
Entering edit mode

Hi kthorner, I'm having the same issue... how do you converted the h5ad to loop format? I'm not able to find an answer with Seurat vignette

Thanks

ADD REPLY
0
Entering edit mode

You can use the anndata python package and the write_loom function

adata = anndata.read("stewart19_adult.processed.gzip.h5ad")
adata.write_loom("stewart19_adult.processed.gzip.h5ad.loom")
ADD REPLY
2
Entering edit mode
7 weeks ago
Eijy Nagai ▴ 60

Hello,

It is quite late, but I also ran into the same question and couldn't find a better discussion.

I've tried several methods including the solution presented here (anndata.read/write_loom) but it didn't work on the dataset I was trying ("Haniffa_PBMC").

The solution that worked for me is described here, using the function Convert from SeuratDisk.

Convert("pbmc3k_final.h5ad", dest = "h5seurat", overwrite = TRUE)

Then you can load:

pbmc3k <- LoadH5Seurat("pbmc3k_final.h5seurat")

ADD COMMENT
0
Entering edit mode

Hi Nagai,

This works for me.

Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 1789 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6