Mock up a Cell Ranger h5 file for examples and testing.
mockCellRangerH5(filepath, n.genes = 100, n.cells = NULL, cell.names = NULL)A h5 file mimicking a typical Cell Ranger output is created at filepath.
temp <- tempfile(fileext = ".h5")
mockCellRangerH5(temp, cell.names = LETTERS)
rhdf5::h5ls(temp)
#> group name otype dclass dim
#> 0 / matrix H5I_GROUP
#> 1 /matrix barcodes H5I_DATASET STRING 26
#> 2 /matrix data H5I_DATASET FLOAT 1651
#> 3 /matrix features H5I_GROUP
#> 4 /matrix/features feature_type H5I_DATASET STRING 100
#> 5 /matrix/features genome H5I_DATASET STRING 100
#> 6 /matrix/features id H5I_DATASET STRING 100
#> 7 /matrix/features interval H5I_DATASET STRING 100
#> 8 /matrix/features name H5I_DATASET STRING 100
#> 9 /matrix indices H5I_DATASET INTEGER 1651
#> 10 /matrix indptr H5I_DATASET INTEGER 27
#> 11 /matrix shape H5I_DATASET INTEGER 2