snapatac2.AnnData.copy#

AnnData.copy(filename, backend='hdf5', partial=None, chunk_size=None)#

Copy the AnnData object.

Parameters:
  • filename – File name of the output .h5ad file.

  • backend (Literal['hdf5', 'zarr']) – The backend to use. “hdf5” or “zarr” are supported.

  • partial (list[str] | None) – A list of fields to copy. If None, copies all fields. Possible fields are: “X”, “obs”, “var”, “obsm”, “obsp”, “varm”, “varp”, “uns”, “layers”.

  • chunk_size (int | None) – If None, writes the entire data matrix at once. Otherwise, rites the data matrix in chunks of the specified size. This can be useful for saving large datasets that do not fit into memory.

Return type:

AnnData