calculate_cluster_ctmeans: Calculate isoform-level summary metrics for a cluster

View source: R/cluster_visualization.R

calculate_cluster_ctmeansR Documentation

Calculate isoform-level summary metrics for a cluster

Description

This function computes cell type mean expression and standard error for all the isoforms in a cluster.

Usage

calculate_cluster_ctmeans(data, isoform_ids, id_table, isoform_col = NULL)

Arguments

data

A data.frame or tibble including single-cell data, with isoforms as rows and cells as columns. Isoform IDs can be included as row names (data.frame) or as an additional column (tibble). Expression should be previously scaled (see scale_range).

isoform_ids

A character vector including the IDs of the isoforms included in the cluster.

id_table

A data frame including two columns named cell and cell_type, providing the correspondence between cell ID and cell type should be provided. The number of rows should be equal to the total number of cell columns in data, and the order of the cell column should match column (i.e. cell) order in data.

isoform_col

When a tibble is provided in data, a character object indicating the name of the column where isoform IDs are specified. Otherwise, isoform identifiers will be assumed to be defined as rownames, and this argument will not need to be provided.

Value

A tibble containing four columns: isoform IDs, mean expression values in each of the cell types, cell type names, and standard error of cell type-level expression.


ConesaLab/acorde documentation built on Feb. 25, 2024, 4:16 a.m.