Extract sparse matrix with corrected counts from CellBender h5 output file.

Read_CellBender_h5_Mat(
  file_name,
  use.names = TRUE,
  unique.features = TRUE,
  h5_group_name = NULL,
  feature_slot_name = "features"
)

Arguments

file_name

Path to h5 file.

use.names

Label row names with feature names rather than ID numbers (default TRUE).

unique.features

Make feature names unique (default TRUE).

h5_group_name

Name of the group within H5 file that contains count data. This is only required if H5 file contains multiple subgroups and non-default names. Default is NULL.

feature_slot_name

Name of the slot contain feature names/ids. Must be one of: "features"(Cell Ranger v3+) or "genes" (Cell Ranger v1/v2 or STARsolo). Default is "features".

Value

sparse matrix

References

Code used in function has been modified from Seurat::Read10X_h5 function of Seurat package https://github.com/satijalab/seurat (License: GPL-3).

Examples

if (FALSE) {
mat <- Read_CellBender_h5_Mat(file_name = "/SampleA_out_filtered.h5")
}