awst: Asymmetric Within-Sample Transformation

awstR Documentation

Asymmetric Within-Sample Transformation

Description

This function implements the asymmetric within-sample transformation described in Risso and Pagnotta (2019). The function includes two steps: a standardization step and a asymmetric winsorization step. See details.

Usage

## S4 method for signature 'matrix'
awst(x, poscount = FALSE, full_quantile = FALSE, sigma0 = 0.075, lambda = 13)

## S4 method for signature 'SummarizedExperiment'
awst(
  x,
  poscount = FALSE,
  full_quantile = FALSE,
  sigma0 = 0.075,
  lambda = 13,
  expr_values = "counts",
  name = "awst"
)

Arguments

x

a matrix of (possibly normalized) RNA-seq read counts or a 'SummarizedExperiment'.

poscount

a logical value indicating whether positive counts only should be used for the standardization step.

full_quantile

a logical value indicating whether the data have been normalized with the full-quantile normalization. In this case, computations can be sped up.

sigma0

a multiplicative constant to be applied to the smoothing function.

lambda

a parameter that controls the growth rate of the smoothing function.

expr_values

integer scalar or string indicating the assay that contains the matrix to use as input.

name

string specifying the name of the assay to be used to store the results of the transformation.

Details

The standardization step is based on a log-normal distribution of the high-intensity genes. Optionally, only positive counts can be used in this step (this option is especially useful for single-cell data). The winsorization step is controlled by two parameters, sigma0 and lambda, which control the growth rate of the winsorization function.

Value

if 'x' is a matrix, it returns a matrix of transformed values, with genes in rows and samples in column. If 'x' is a 'SummarizedExperiment', it returns a 'SummarizedExperiment' with the transformed value in the 'name' slot.

Methods (by class)

  • matrix: the input is a matrix of (possibly normalized) counts

  • SummarizedExperiment: the input is a SummarizedExperiment with (possibly normalized) counts in one of its assays.

References

Risso and Pagnotta (2019). Within-sample standardization and asymmetric winsorization lead to accurate classification of RNA-seq expression profiles. Manuscript in preparation.

Examples

x <- matrix(data = rpois(100, lambda=5), ncol=10, nrow=10)
awst(x)


drisso/awst documentation built on Jan. 29, 2024, 3:42 p.m.