These functions can be used when writing equations using the Edit Information Equations dialog.
Indexing
Indexes for FCS parameters start at 1 and represent the parameter order in the FCS file. For example, if a file has six parameters, they are referenced as P1 through P6 in equation functions. Parameters do not need to be included in the model to be referenced by an equation. The best way to determine the parameter index for a specific parameter is to add one to the Listmode Parameter field in the Expression Profile properties.

For example, if the Listmode Parameter is 14, we would add one for an index of 15 when using it in equations.
Indexing for gate and regions starts at 1. The expression "G1" refers to the gate for Cell Type 1, and region R1 is the first region index.
Indexes for the Cell Types defined in a model also start at 1. However, there is a hidden Cell Type that contains all unclassified events. This is referred to as Cell Type 0, and it can be referenced in equation functions as "C0".
Parameter Scales
GemStone keeps track of several different scales for measurements at the same time. The table below describes each scale and gives the symbol to use to access the scale in equation functions.
Scale |
Symbol |
Description |
Linear |
L |
Raw, linear data values from the data file for the parameter. These values are in the ADC range of the instrument. |
Compensated |
C |
Compensated values, on the same scale as Linear. |
Transformed |
P |
Internal floating point scale of 0.0 to 100.0. Log or HyperLog transforms have been applied, if the parameter
is displayed using one of these transforms. If compensation is
defined for the parameter, the Transformed value is in compensated
data space. |
Functions
This system is designed to provide a flexible but efficient framework to calculate any kind of statistic we want from the data. This ambitious goal is achieved by an extensive syntax.
Let's begin with the simplest of the summation functions, the gated sum:
GSUM({GIDn{,Cq}}{;IDm{;IDp})
where
{ } indicate an optional argument
GIDn = Rn or Gn
n represents a gate or region index, starting with 1
C = cell type
q = 0 (unclassified), 1, 2, ..., number of cell types
ID = L, C, P
m and p represent a parameter index, starting with 1.
The number of IDn arguments limited to two.
The IDm and IDp are optional.
With no arguments, GSUM becomes a simple count.
The first optional argument to the GSUM function, GIDn, identifies a region or gate. If a gate or region ID is specified, only the events in that gate or region are considered. If the gate or region ID is omitted, then all events are considered in the sum.
For example:
GSUM()
returns the number of events
GSUM(G1)
returns the number of events in gate G1
GSUM(R1)
returns the number of events in region R1
A semi-colon (;) is required between the optional gate and the next argument.
The GSUM function can have up to two ID arguments that identify a parameter of interest. There are 3 scales for parameter data: L for linear, C for compensated, and P for transformed. These are described in the Parameter Scales section above. For example, L1, C1, and P1 all related to parameter 1 in the data file. The scaling is different for each of these representations of parameter 1.
GSUM(;L1)
returns the sum of linear intensity values for parameter 1
GSUM(;C1)
returns the sum of compensated intensity values for parameter 1
GSUM(;P1)
returns the sum of transformed intensity values for parameter 1
If two parameter ID arguments are specified in the GSUM function, the result is the products of the event values for the specified parameters. For example,
GSUM(R3;P3;P3)
finds the sum of the square of transformed parameter 3 values that are in region R3.
Gated cross products (cc) are computed in this manner:
GSUM(R3;P3;P4)
returns the correlation coefficient for parameters 3 and 4 events that are in region R3.
A simple linear mean is evaluated as,
GSUM(G3;L1)/GSUM(G3)
returns the linear mean for parameter 1 events that are in gate G3.
Other types of intensity related summation functions compute the mode and median:
GMOD(;P2)
computes the mode for parameter 2 in transformed space.
GMED(G3;P2)
computes the median for parameter 2 events that are in gate G3. The result is in transformed space.
Quadrant statistics include
GQ1(G3;P2)
returns the location at which 25% of parameter 2 events gated on G3 fall below and 75% fall above.
GQ3(G3;P2)
returns the location at which 75% of parameter 2 events gated on G3 fall below and 25% fall above.
Percentage calculations are trivial. For example, would be given by
GSUM(G3)*100/GSUM()
returns G3 events as a percent of total events
GSUM(R3)*100/GSUM(G2)
returns R3 events as a percentage of G2 events.
Any expression can be transformed between linear units and transformed units:
FLToT(Pn,<Exp>)
converts a value on the Linear scale to a value on the Transformed scale for the specified parameter n.
FTToL(Pn,<Exp>) (Transformed to linear)
converts a value on the Transformed scale to a value on the Linear scale for the specified parameter n.
For example, suppose P2 is a parameter displayed on a log scale. Then,
FTToL(P2,GSUM(G3;P2)/GSUM(G3))
finds the geometric mean for parameter 2 gated on G3. The result is expressed in linear units that relate to the log axis displayed for the parameter.
Some of the more commonly used functions are also included.
GeoMean(G3;P2)
is a convenient short-hand for FTToL(P2,GSUM(G3;P2)/GSUM(G3))
LinMean(G3;P2)
is equivalent to GeoMean(G3;P2)
LinMedian(G3;P2)
is short-hand for FTToL(P2,GMED(G3;P2))
LinMode(G3;P2)
Is short-hand for FTToL(P2,GMOD(G3,P2))
VAR(G3;L3;L3)
computes the variance of parameter 3 in linear space.
VAR(G3;L3;L4)
computes the covariance of parameters 3 and 4 in linear space.
SD(G3;L3)
computes the standard deviation for parameter 3 events in gate G3 in linear space.
QSD(G3;P2)
computes the quadrant variance for parameter 2 events in gate G3 in transformed space.
CV(G3;L3)
computes the coefficient of variation for parameter 3 gated on G3 in linear space.
Additional Examples |
|
GSUM() |
Total number of events |
GSUM(G1) |
Number of events in gate G1 |
GSUM(R1) |
Number of events in region R1 |
GSUM(C1) |
Number of events in CellType 1 |
GSUM(C0) |
Number of unclassified events (Cell Type 0 is the Unclassified Cell Type). |
GSUM(C0,R2) |
Number of unclassified events in region R2 |
GSUM(;L1) |
Sum of linear intensity values for parameter 1 |
GSUM(G1;L1) |
Sum of linear intensity values for parameter 1 that are in gate G1 |
GSUM(G1)/GSUM(R1) |
Ratio of the sum of gate G1 events to R1 events |
MEAN(G1;P1) |
Mean of parameter 1 events that are in gate G1 |
GMOD(G1;P1) |
Mode of parameter 1 events that are in gate G1 |
GMED(G1;P0) |
Median of parameter 1 events that are in gate G1 |
VAR(G1;P1) |
Variance of parameter 1 events that are in gate G1 |
SD(G1;P1) |
SD of parameter 1 events that are in gate G1 |
CV(G1;P1) |
CV of parameter 1 events that are in gate G1 |
GQ1(G1,P1) |
First quartile of parameter 1 events that are in gate G1 |
GQ3(G1,P1) |
First quartile of parameter 1 events that are in gate G1 |
CC(G1;P1,P2) |
Correlation Coefficient of P1 vs. P2 events that are in gate G1 |
FLtoT(parameter, value) |
Converts linear value 100 into transformed units for parameter 1 |
FLtoT(P1,100) |
Converts linear value 100 into transformed units for parameter 1 |
FTtoL(P1,GSUM(G1;P1)/GSUM(G1)) |
Geometric mean for parameter 1 events that are in gate G1 |
GeoMean(G1;P1) |
Simple form geometric mean for parameter 1 events in gate G1 |
FLOG(10) |
Natural log of 10 |
FL10(1) |
Log base 10 of 1 |
FEXP(3) |
Exponent of 3 |
FE10(3) |
Exponent base 10 of 3 |
FSQR(4) |
Square of 4 |
FCUB(3) |
Cube of 3 |
FBND(arg,lower,upper) |
Evaluates the first argument to see if it is between lower and upper. Returns the first argument if it is between the others, returns lower if arg is less then lower, or returns upper if arg is greater than upper. |
FPWR(10,3) |
Returns 10 raised to the 3rd power. |
FSQRT(5) |
Returns the square root of 5. |
See also: