bioalpha.singlecell.read_mtx

bioalpha.singlecell.read_mtx(file: Path | FileIO, dtype: str = 'float32', num_workers: int = 9, spformat: Literal['csr', 'csc', 'coo'] = 'csr') AnnData

Fast reading algorithm for mtx files.

Parameters:
  • file (Path | FileIO) – path to matrix.mtx file or file-like object.

  • n_threads (int, default = 9) – number of threads to read file, must be at least 2.

  • spformat (Literal["coo", "csr", "csc"], default = "csr") – the sparse format of the returning matrix.

Returns:

adata – annotated data with .X is read data

Return type:

AnnData