Skip to content

Error when loading H5 file using loadH5() function #1

@drkuang

Description

@drkuang

Description
When trying to load an H5 file using the loadH5() function from easySCFr package, getting a subscript out of bounds error and the SingleCellExperiment object is not created.

To Reproduce
Steps to reproduce the behavior:

  1. Install easySCFr package
  2. Run the following code:
library(easySCFr)
sce <- loadH5("/path/to/data.h5")

Error Message

[1] "there is assay: RNA in the h5 file"
[1] "Reading raw data..."
[1] "Normalization counts..."
Performing log-normalization
[1] "Add var..."
[1] "Add Feature..."
[1] "there is no features in h5 files and calFeatures is FALSE, please set 'calFeatures = TRUE' to calculate features"
[1] "Add Scale..."
[1] "there is no scale data in h5 files and calScale is FALSE, please set both 'calData = TRUE' and 'calScale = TRUE' to calculate scale data"
[1] "Add obs..."
[1] "Add reductions..."
<subscriptOutOfBoundsError in names(h5[[reductionsName]])[[1]]: subscript out of bounds>
Error in loadH5("/path/to/data.h5") : object 'sce' not found

Expected behavior
The function should successfully load the H5 file and create a SingleCellExperiment object.

Environment:

  • R version: [4.3.1]
  • easySCFr version: [1.0.2]
  • Operating System: [ Linux]

Additional context
The error seems to occur when trying to load the reductions data from the H5 file. The function successfully reads the raw data and performs normalization but fails when processing the dimensionality reduction information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions