This function writes a expression matrix to a HDF5 file in a sparse CSC format. The created file will contain three fields:
genes: the names of the genes in the matrix.
cells: the names of the cells in the matrix.
expression_matrix: the expression matrix stored in CSC format.
Arguments
- expression_matrix
The expression matrix to be written. The matrix should have defined rownames and colnames. If they are not defined, they will be generated as
gene_{index}andcell_{index}respectively.- file_path
The path to the HDF5 file where the matrix will be stored.
- compression_level
The compression level to be used. Defaults to 7.