save_as_h5ad: Save as .h5ad

View source: R/data_processing.R

save_as_h5adR Documentation

Save as .h5ad

Description

Transform a single_cell_matrix into an anndata object and saves it

Usage

save_as_h5ad(single_cell_object, cell_type_annotations)

Arguments

single_cell_object

A matrix or dataframe with the single-cell data. Rows are genes, columns are samples. Row and column names need to be set. Alternatively a SingleCellExperiment or an AnnData object can be provided. In that case, note that cell-type labels need to be indicated either directly providing a vector (cell_type_annotations) or by indicating the column name that indicates the cell-type labels (cell_type_column_name). (Anndata: obs object, SingleCellExperiment: colData object)

cell_type_annotations

A Vector of the cell type annotations. Has to be in the same order as the samples in single_cell_object

Value

The path to the saved .h5ad file


PelzKo/immunedeconv2 documentation built on Feb. 12, 2025, 4:16 p.m.