Skip to contents

This function writes the data of one of the assays (modalities) of a Seurat object into an .h5ad file. The behavior of this function if NAs are present is undefined.

Usage

WriteH5AD(object, file, assay = NULL, overwrite = TRUE)

# S4 method for Seurat
WriteH5AD(object, file, assay = NULL, overwrite = TRUE)

Arguments

object

Seurat object.

file

Path to the .h5ad file.

assay

Assay to write; can be omitted if there is a single assay in the object.

overwrite

Boolean value to indicate if to overwrite the file if it exists (TRUE by default).

Details

The following slots are saved: count matrices (`@counts`, `@scale.data` and `@data`), `@metadata`, `@reductions`, `@feature.loadings`, `@graphs`.