NormalizeHTO: Normalize hashtag oligo data

View source: R/NormalizeHTO.R

NormalizeHTOR Documentation

Normalize hashtag oligo data

Description

Normalizes hashtag oligo (HTO) data. By default, first scales each HTO to its standard deviation to account for difference of intensity for the various labels, then scales each cell so that HTO are reported as a percentage. Alternatively, can scale the HTOs to a quantile of their values, to the background value, or to their max after imputation.

Usage

NormalizeHTO(
  object,
  scale.HTO = "stdev",
  normalize.cells = 100,
  assay = "HTO",
  q = 0.9,
  imputed.assay = "imputed.HTO"
)

Arguments

object

Seurat object.

scale.HTO

character(1) or logical(1). "stdev"/TRUE/T to scale each HTO to standard deviation across cells, No/no/FALSE/F for no scaling, "quantile" to scale to a quantile of values, "background" to scale to the average background value, and "imputed_max" to scale to the max after smoothing by imputation to avoid outliers. Default: "stdev".

normalize.cells

numeric(1). The value to which each cell should be normalized. 0 for no cell-normalization. Default: 100.

assay

character(1). The name of the assay which should be normalized. Default: "HTO".

q

numeric(1). Only used if scale.HTO="quantile". The quantile used for normalization.

imputed.assay

character(1). Only used if scale.HTO="imputed_max". The name of the assay that contains imputed HTO data.

Details

When normalizing to the background value, a k-means clustering with k=2 is used to define a positive and a negative population, and the average of the negative population is used for scaling (i.e. set to 1).

Value

Returns a Seurat object with normalized HTO data in the data layer.

Examples

MySeuratObject <- NormalizeHTO(MySeuratObject)

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.