Skip to contents

Performs an arcsinh transformation across biomarker expression values. By default, uses custom scale factors for each biomarker.

Usage

arcsinh_transform_region(
  region,
  scale.factors = function(x) {
     quantile(x, 0.2) * 5
 },
  from = "Data",
  to = "NormalizedData"
)

Arguments

region

A Region object, or concatenated data generated by .smapply.

scale.factors

A function, numeric value, or vector denoting what scale factors should be used for transform. See Details below for more information on why scale factors are typically applied in conjunction with arcsinh transformations.

Expected formats:

Function

Can specify a function by its name (e.g. "mean"), pass an anonymous function definition (default), or a custom function defined in your global environment.

Numeric value

A single numeric value, applied uniformly.

Vector

A vector of numeric values, should be the same length as the number of biomarkers in the data slot specified to from.

Any scale factors that evaluate to 0 will be converted to 1 to avoid dividing by zero.

from

Which data slot to pull data from.

to

Which data slot to assign the normalized data to.

Value

An updated Region object with normalized data added to the slot specified in to. Metadata recording information about the normalization is also added to the featureInfo.

Details

The arcsinh transformation is similar to log transformation with two important differences:

  1. arcsinh is defined for negative numbers.

  2. arcsinh is more "linear like" for values between -1 and 1.

Often when analyzing proteomic and flow cytometry data, an arcsinh transformation is accompanied with dividing by a "scale factor" that adjusts the range that gets "compressed" in the linear-like range around zero.

By default, this function performs some normalization for biomarker-to-biomarker scale variability by defining custom scale factors for each biomarker within a Region (or within each unit as defined in the analysis used by Normalize()). These scale factors are by default set as the 20th quantile of expression values * 5 (see the documentation for scale.factors above). If you're running with analyze = "regions" or an informal analysis, these custom scale factors will also reduce region-to-region scale variability (or group-to-group variability with an informal analysis).

See also

Scroll to top