H5 to h5ad conversion help

Hi @Pycnopodia, I suspect your problem is one of two things: (1) improper conversion from h5 to h5ad or (2) improper conversion between species.

For #1, h5 files come in many flavors but it looks like the info you need is stored in it. It also looks like you’ve tried a couple of methods, but here are a couple more that might help: Gene expression matrix.cvs is too large to load it - #17 by jeremyinseattle. Once you have your gene expression matrix (either sparse or dense) in a matrix file, as well as gene names and sample names read into separate variables, you can follow the steps here to write out the h5ad file: File Requirements and Limits - brain-map.org. It should be okay to skip the step where you give the count matrix row names and column names (I think).

For #2, if you are using a species other than mouse (if mapping to whole mouse brain) or human (if mapping to human MTG), you’ll need to convert the provided gene names to the corresponding mouse or human ortholog. We provide a convenient R package to do this conversion here: GeneOrthology/README.md at main · AllenInstitute/GeneOrthology · GitHub.

Please post again if this doesn’t solve you issue.