Closed MarcElosua closed 2 years ago
I think you might be confused by the various file formats:
.h5
) is a general file format. Different tools may produce HDF5 files with different structures. Within Bioconductor, the tools for reading these are in the rhdf5 package (e.g., rhdf5::h5read()
).DropletUtils::read10xCounts()
) or the HDF5Array package (e.g., HDF5Array::TENxMatrix()
). The choice depends on a bit on what you're wanting to do downstream, but for most analyses of scRNA-seq data you will probably be wanting DropletUtils::read10xCounts()
..h5ad
) are HDF5 files with specific structure that were originally designed for storing the Python-based AnnData data structure. Within Bioconductor, the preferred tool for reading these are in the zellkonverter package (e.g., zellkonverter::readH5AD()
)It appear you want to read the CellRanger outputs in R (these aren't H5AD files), for which you should be using an option from (2), i.e., something like:
# NOTE: Skipping all the piping-stuff.
library(DropletUtils)
library(here)
sce <- read10xCounts(here(cr_sn, "jobs/out_merged/multiplexed1/outs/raw_feature_bc_matrix.h5"))
Note that DropletUtils::read10xCounts()
requires the path to the .h5
file (not the directory containing it) when using the CellRanger-HDF5 files as input (see help("read10xCounts", "DropletUtils")
for details).
@PeteHaitch Thank you so much for the explanation! I wasn't aware of the different structures within HDF5 files!
Hi @lazappi,
Thank you so much for putting together such an amazing tool! I've used it in the past to
readH5AD
without any issues and now when I run the examples they also work. The issue comes when I try to read the raw.h5
from cellranger output. When I setuse_hdf5 = TRUE
parameter I get the following error that I don't know what it means:Furhtermore, when I run it with the default parameters I get the following error:
Do you have any clue on what may be going on?