convert_to_matrix: Converts the object into a matrix

View source: R/data_processing.R

convert_to_matrixR Documentation

Converts the object into a matrix

Description

Converts the object into a matrix

Usage

convert_to_matrix(
  object,
  cell_type_annotations,
  cell_type_column_name = NULL,
  assay_name = NULL
)

Arguments

object

An input matrix, data frame, expression set, etc.

cell_type_annotations

A vector of the cell type annotations. Has to be in the same order as the samples in object. If not used (for example for bulk data), just supply anything, like a string.

cell_type_column_name

Name of the column in (Anndata: obs, SingleCellExperiment: colData), that contains the cell-type labels. Is only used if no cell_type_annotations vector is provided.

assay_name

Name of the assay/layer that should be used to extract the matrix

Value

The same object, but of type matrix


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