In biotechnology, flow cytometry is a laser- or impedance-based, biophysical technology employed in cell counting, cell sorting, biomarker detection and protein engineering, by suspending cells in a stream of fluid and passing them by an electronic detection apparatus. It allows simultaneous multiparametric analysis of the physical and chemical characteristics of up to thousands of particles per second. [1]
Flow cytometry measurements can vary over several orders of magnitude, cell populations can have variances that depend on their mean fluorescence intensities, and may exhibit heavily-skewed distributions. Consequently, the choice of data transformation can influence the output of subsequent analysis. An appropriate data transformation aids in data visualization and gating of cell populations across the range of data. [2]
As stated in [3], The goal of visualizing data of a measured parameter is to determine the actual probability function (APF) of the property being investigated. However the APF is never known, the selection of a proper transformation and parameters tuning is mainly determined by visual checking of the distribution to see if the populations are clearly segerated.
For this post, the seven transformation methods provided in flowCore are explored, parameters for each transformation are slightly investigated to gain a rough understanding of their theories and the corresponding effects. At the end, a shiny APP is provided to visually and interactively compare the two most popular transformations (logicle and arcsin) for a given FCS dataset.
Loading the raw data of a FCS file
Summary Information of the FCS data
Linear Transformation
The formula for linear transformation is x <- a*x+b, and the crrosponding funciton is linearTransform(transformationId="defaultLinearTransform", a = 1, b = 0).
The formula for ln transformation if x<-log(x)*(r/d), and the crrosponding function is lnTransform(transformationId="defaultLnTransform", r=1, d=1).
Transformation function
Example
Logarithmic Transformation
The formula for logarithmic transformation if x<-log(x,logbase)*(r/d), and the crrosponding function is logTransform(transformationId="defaultLogTransform", logbase=10, r=1, d=1). Compared with ln transformation, you can specify the base with logbase.
Transformation function
Example
Quadratic Transformation
The formula for quadratic transformation if x <- a*x^2 + b*x + c, and the crrosponding function is quadraticTransform(transformationId="defaultQuadraticTransform", a = 1, b = 1, c = 0).
Transformation function
Example
Hyperbolic arc-sine Transformation
The formula for arcsinh transformation if x<-asinh(a+b*x)+c where asinh <- function(x) {log(x + sqrt(x^2 + 1))}, and the crrosponding function is arcsinhTransform(transformationId="defaultArcsinhTransform", a=1, b=1, c=0).
Transformation function
Example
Biexponential Transformation
Biexponential Transformation is an over-parameterized inverse of the hyperbolic sine, the formula to be inverted takes the form f(x) = a*exp(b*(x-w))-c*exp(-d*(x-w))+f , and the crrosponding function is biexponentialTransform(transformationId="defaultBiexponentialTransform", a = 0.5, b = 1, c = 0.5, d = 1, f = 0, w = 0, tol = .Machine$double.eps^0.25, maxit = as.integer(5000))
Transformation function
Example
Logicle Transformation
Logicle transformation creates a subset of hyperbolic sine transformation functions that provides several advantages over linear/log transformations for display of flow cytometry data.
and the crrosponding function is logicleTransform(transformationId="defaultLogicleTransform", w = 0.5, t = 262144, m = 4.5, a = 0)
Transformation function
We can see that m controls the range of positive values, w controls the range of negative values,
a changes the slope, t is the maximal x value corresponds to m. A nice explanation is included in [4].
Example
And in flowCore, there is a funciton estimateLogicle which can help automatic determine the parameters for logicleTransform.
And it works as below:
Shiny APP
In our cytofkit pacakge, we provide another two customized transfomations: autoLgcl (modified from logicle) and cytofAsinh (modified from arcsinh).
To compare the transformation methods (autoLgcl, logicle, cytofAsinh, arcsinh) for a given FCS file, a shiny APP is build and provided with link https://chenhao.shinyapps.io/TransformationComparation_shinyAPP/. A screenshot of the app is as below:
[2] Finak G, Perez J, Weng A, Gottardo R. Optimizing transformations for automated, high throughput analysis of flow cytometry data. BMC Bioinformatics. 2010;11: 546. doi:10.1186/1471-2105-11-546.
[3] Berg RA Van Den, Hoefsloot HCJ, Westerhuis J a, Smilde AK, Werf MJ Van Der, van den Berg R a, et al. Centering, scaling, and transformations: improving the biological information content of metabolomics data. BMC Genomics. 2006;7: 142. doi:10.1186/1471-2164-7-142.
[4] Parks DR, Roederer M, Moore WA. A new “logicle” display method avoids deceptive effects of logarithmic scaling for low signals and compensated data. Cytom Part A. 2006;69: 541–551.