logicletGml2-class | R Documentation |
Logicle transformation as published by Moore and Parks.
logicletGml2 is defined by the following function:
bound(logicle, boundMin, boundMax) = max(min(logicle,boundMax),boundMin))
where
logicle(x, T, W, M, A) = root(B(y, T, W, M, A) - x)
and B
is a modified biexponential function:
B(y, T, W, M, A) = ae^{by} - ce^{-dy} - f
where
x is the value that is being transformed (an FCS dimension value). Typically, x is less than or equal to T, although the transformation function is also defined for x greater than T.
y is the result of the transformation.
T is greater than zero and represents the top of scale value.
M is greater than zero and represents the number of decades that the true logarithmic scale approached at the high end of the Logicle scale would cover in the plot range.
W is non-negative and not greater than half of M and represents the
number of such decades in the approximately linear region. The choice of
W = M/2
specifies a scale that is essentially linear over the whole
range except for a small region of large data values. For situations in which
values of W approaching M/2
might be chosen, ordinary linear display scales
will usually be more appropriate. The choice of W = 0
gives essentially the
hyperbolic sine function.
A is the number of additional decades of negative data
values to be included. A shall be greater than or equal to -W
, and
less than or equal to M - 2W
root is a standard root finding
algorithm (e.g., Newton's method) that finds y such as B(y, T, W, M, A)
= x
.
and a
, b
, c
, d
and f
are defined by
means of T
, W
, M
, A
, w
, x0
, x1
,
x2
, ca
and fa
as:
w = W/(M+A)
x2 = A/(M+A)
x1 = x2 + w
x0 = x2 + 2*w
b = (M + A)*ln(10)
and
d
is a constant so that
2*(ln(d) - ln(b)) + w*(d + b) = 0
given
b
and w
, and
ca = e^{x0*(b+d)}
fa = e^{b*x1} - (ca/(e^{d*x1}))
a = T / (e^b - fa - (ca/e^d))
c = ca * a
f = fa * a
The Logicle scale is the inverse of a modified biexponential function. It
provides a Logicle display that maps scale values onto the [0,1]
interval such that the data value T
is mapped to 1, large data values
are mapped to locations similar to an (M + A)-decade logarithmic scale, and
A decades of negative data are brought on scale. For implementation
purposes, it is recommended to follow guidance in Moore and Parks
publication.
In addition, if a boundary is defined by the boundMin and/or boundMax parameters, then the result of this transformation is restricted to the [boundMin,boundMax] interval. Specifically, should the result of the logicle function be less than boundMin, then let the result of this transformation be boundMin. Analogically, should the result of the logicle function be more than boundMax, then let the result of this transformation be boundMax. The boundMin parameter shall not be greater than the boundMax parameter.
.Data
Object of class function
.
T
Object of class numeric
– positive constant (top of scale value).
M
Object of class numeric
– positive constant (desired number of decades).
W
Object of class numeric
– non-negative constant that is not greater than half of M
(the number of such decades in the approximately linear region).
A
Object of class numeric
– a constant that is greater than or equal to -W, and also
less than or equal to M-2W. (A represents the number of additional decades of negative data values to
be included.)
parameters
Object of class "transformation"
– flow parameter to be transformed.
transformationId
Object of class "character"
– unique ID to reference the transformation.
boundMin
Object of class numeric
– lower bound of the transformation, default -Inf.
boundMax
Object of class numeric
– upper bound of the transformation, default Inf.
Objects can be created by calls to the constructor
logicletGml2(parameter, T, M, W, A, transformationId, boundMin,
boundMax)
Class singleParameterTransform
, directly.
Class transform
, by class singleParameterTransform, distance 2.
Class transformation
, by class singleParameterTransform, distance 3.
Class characterOrTransformation
, by class singleParameterTransform, distance 4.
Please note that logicletGml2
and
logicleTransform
are similar transformations; however, the
Gating-ML 2.0 compliant logicletGml2
brings "reasonable" data values
to the scale of [0,1]
while the logicleTransform
scales
these values to [0,M]
.
The logicle transformation object can be evaluated using the eval method by passing the data frame as an argument. The transformed parameters are returned as a matrix with a single column. (See example below)
Spidlen, J., Moore, W.
Gating-ML 2.0: International Society for Advancement of Cytometry (ISAC) standard for representing gating descriptions in flow cytometry. http://flowcyt.sourceforge.net/gating/20141009.pdf
Moore, WA and Parks, DR. Update for the logicle data scale including operational code implementations. Cytometry A., 2012:81A(4):273-277.
Parks, DR and Roederer, M and Moore, WA. A new "Logicle" display method avoids deceptive effects of logarithmic scaling for low signals and compensated data. Cytometry A., 2006:69(6):541-551.
logicleTransform
, transform-class
,
transform
Other mathematical transform classes:
EHtrans-class
,
asinht-class
,
asinhtGml2-class
,
dg1polynomial-class
,
exponential-class
,
hyperlog-class
,
hyperlogtGml2-class
,
invsplitscale-class
,
lintGml2-class
,
logarithm-class
,
logtGml2-class
,
quadratic-class
,
ratio-class
,
ratiotGml2-class
,
sinht-class
,
splitscale-class
,
squareroot-class
,
unitytransform-class
myDataIn <- read.FCS(system.file("extdata", "0877408774.B08",
package="flowCore"))
myLogicle <- logicletGml2(parameters = "FSC-H", T = 1023, M = 4.5,
W = 0.5, A = 0, transformationId="myLogicle")
transOut <- eval(myLogicle)(exprs(myDataIn))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.