save#

Pseudobulk.save(directory, /, *, overwrite=False, cell_types=None, excluded_cell_types=None)[source]#

Saves a Pseudobulk dataset to directory (which must not exist unless overwrite=True, and will be created) with three files per cell type: the X at f’{cell_type}.X.npy’, the obs at f’{cell_type}.obs.parquet’, and the var at f’{cell_type}.var.parquet’. Also saves a text file, cell_types.txt, containing the cell types.

Parameters:
  • directory: str | Path

    the directory to save the Pseudobulk dataset to

  • overwrite: bool

    if False, raises an error if the directory exists; if True, overwrites files inside it as necessary

  • cell_types: str | Iterable[str] | None

    one or more cell types to save; if None, save all cell types. Mutually exclusive with excluded_cell_types.

  • excluded_cell_types: str | Iterable[str] | None

    one or more cell types to exclude from saving; mutually exclusive with cell_types

Return type:

None