performNormalization: Perform Normalization on Enrichment Data

View source: R/performNormalization.R

performNormalizationR Documentation

Perform Normalization on Enrichment Data

Description

This function allows users to normalize the enrichment calculations by accounting for single-cell dropout and producing positive values for downstream differential enrichment analyses. A positive range values is useful for several downstream analyses, like differential evaluation for log2-fold change, but will alter the original enrichment values.

Usage

performNormalization(
  input.data,
  assay = NULL,
  gene.sets = NULL,
  make.positive = FALSE,
  scale.factor = NULL
)

Arguments

input.data

Enrichment output from escape.matrix or runEscape.

assay

Name of the assay to plot if data is a single-cell object.

gene.sets

The gene set library to use to extract the individual gene set information from.

make.positive

Shift enrichment values to a positive range TRUE for downstream analysis or not TRUE (default).

scale.factor

A vector to use for normalizing enrichment scores per cell.

Value

Single-cell object or matrix of normalized enrichment scores

Examples

GS <- list(Bcells = c("MS4A1", "CD79B", "CD79A", "IGH1", "IGH2"),
           Tcells = c("CD3E", "CD3D", "CD3G", "CD7","CD8A"))
pbmc_small <- SeuratObject::pbmc_small
pbmc_small <- runEscape(pbmc_small, 
                        gene.sets = GS, 
                        min.size = NULL)
                        
pbmc_small <- performNormalization(pbmc_small, 
                                   assay = "escape", 
                                   gene.sets = GS)


ncborcherding/escape documentation built on May 13, 2024, 9:37 p.m.