Converts a Seurat object directly to an H5AD file, handling the intermediate h5Seurat file automatically. The intermediate file is created in a temporary location and removed after conversion.
Usage
SeuratToH5AD(
object,
filename = NULL,
assay = DefaultAssay(object = object),
overwrite = FALSE,
verbose = TRUE,
standardize = FALSE,
...
)Arguments
- object
A Seurat object to convert
- filename
Output H5AD filename. If not specified, uses the project name with .h5ad extension.
- assay
Name of assay to convert. Default is the default assay.
- overwrite
Logical; overwrite existing file. Default FALSE.
- verbose
Logical; show progress messages. Default TRUE.
- standardize
Logical; convert Seurat metadata names to scanpy conventions. Default FALSE.
- ...
Additional arguments passed to SaveH5Seurat and Convert.
Details
This function provides a convenient one-step conversion from Seurat objects to H5AD format (used by Python's scanpy/anndata). Internally, it:
Saves the Seurat object to a temporary h5Seurat file
Converts the h5Seurat file to H5AD format
Removes the intermediate h5Seurat file
This is useful when you want to export data for Python analysis without keeping the intermediate h5Seurat file.