The following tables are a reference of all operators and functions available for creating custom tokens in the Custom Token Editor and with Parameter Math.
Operator |
Description |
---|---|
x+y |
Add x and y |
x-y |
Subtract y from x |
x*y |
Multiply x and y |
x/y |
Divide x by y |
x^y |
x to the y power |
Conditional/Comparison Operators. Use these with IF..THEN..ELSE statements.
Operator |
Description |
---|---|
x>y |
x is greater than y |
x<y |
x is less than y |
x=y |
x is equal to y |
x>=y |
x is greater than or equal to y |
x<=y |
x is less than or equal to y |
x<>y |
x is not equal to y |
Logical Operators. These are used in IF..THEN..ELSE statements or to combine two equations.
Operator |
Description |
---|---|
x OR y |
x OR y |
x AND y |
x AND y |
NOT (x AND y) |
Inverse of the value of (x AND y) |
Example: if (x>20 and y>20) then......else If combining multiple logical operators, parenthesis must surround each operator. Example: if ((x>20 and y>20) and (a<1 or b>10)) then......else |
Function |
Description |
---|---|
Abs(x) |
Absolute value of x |
ArcCos(x) |
Arc Cosine of x |
ArcCosh(x) |
Hyperbolic Arc Cosine of x |
ArcSin(x) |
Arcsine of x |
ArcSinh(x) |
Hyperbolic Arcsine of x |
ArcTan(x) |
Arctangent of x |
ArcTanh(x) |
Hyperbolic Arctangent of x |
ConvertLinToLog(I,J,K,L) |
Converts a linearly scaled value into a logarithmically scaled value, using the following parameters: I = Lin value, J = # of decades, K = output range (with values of 0, 256, 512, or 1024), L = offset
This will convert a value from 1-10,000 to 0-1024. |
ConvertLogToLin(I,J,K,L) |
Converts a Logarithmically scaled value into a Linearly scaled value, using the following parameters: I = Log value, J = # of decades, K = input range, L = offset
This will convert a value from 0-1024 to 1-10,000. |
Cos(x) |
Cosine of x |
Cosh(x) |
Hyperbolic Cosine of x |
CoTan(x) |
Cotangent of x |
Ln(x) |
Natural logarithm of x |
Log(x,y) |
Logarithm of y in base x |
Max(x,y) |
Returns the higher value of x and y. |
Maximum([x,y,z...]) |
Returns the maximum value in the array ([x,y,z,…]). The array can hold an unlimited number of elements. |
Mean([x,y,z...]) |
Returns the mean of the values in the array [x,y,z,…]. The array can hold an unlimited number of elements. |
Min(x,y) |
Returns the lower value of x and y. |
Minimum([x,y,z...]) |
Returns the minimum value in the array ([x,y,z,…]). The array can hold an unlimited number of elements. |
Range([x,y,z...]) |
Returns the result of (Maximum([x,y,z,…]) – Minimum([x,y,z,…])). |
Sin(x) |
Sine of x |
Sinh(x) |
Hyperbolic Sine of x |
Sqr(x) |
x squared |
Sqrt(x) |
Square root of x |
StdDev([x,y,z...]) |
Returns the standard deviation of the values in the array [x,y,z,…]. The array can hold an unlimited number of elements. |
Tan(x) |
Tangent of x |
Type Conversion Functions. These are used in more advanced formulas, to convert a number to text and vice versa. They are used when the value returned by a particular token is not the type that you need, and you want to convert it to a type that you can include in your formula. You could also change the result type as described in Custom Token Formatting.
Function |
Description |
---|---|
NumericToString(x) |
Converts the number x to text (also known as a string). |
StringToNumeric(x) |
Converts the string x to a number. |
Logic (True/False) Functions. These functions return the truth values of applying an operation to the incoming parameters. Some of the functions return a numerical representation of True (-1) or of False (0).
Function |
Description |
---|---|
Between(x,y,z) |
Returns True if x is between y and z (including being equal to y or z), False otherwise. |
FalseValue |
Returns 0. |
IsFalse(x) |
Returns True if x has a value of 0. |
IsSameText([Text1,Text2],CaseSensitive) |
Returns True if Text1 and Text2 are the same. If CaseSensitive is true, the words must match in case, in addition to its content. |
IsTrue(x) |
Returns True if x has a value of -1. |
TrueValue |
Returns -1. |
Text Manipulation Functions. These functions can be used to manipulate or get information out of existing text values.
Function |
Description |
||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AreValuesInRange([x,y,z...],tolerance,[xName,yName,zName...]) |
If the values in the array [x,y,z...] are all within tolerance % of each other, it returns True. If a pair of values in the array are not within tolerance % of each other, it returns text indicating which ones are not. |
||||||||||||||||||||||
Copy(x,y,z) |
X is the full text. Y is the position to start copying text. Z is the number of letters (also known as characters) to copy from the full text. Returns a subset of the text x, starting at position y, copying z characters in total. |
||||||||||||||||||||||
ExtractFilename("file_path") |
Accepts a file name and will return the text of the data file name. For example, if a file path is C:\Data Files\Today\FlowData1.fcs, ExtractFilename("file_path")will return FlowData1.fcs. Keyword tokens using the keywords $FIL, $FCSE_FILENAME or $FCSE_FILENAMENOPATH can be used for this function. |
||||||||||||||||||||||
ExtractFolderFromFilename("file_path") |
Accepts a file name and will return the text of the file path of the folder in which the data is contained. For example, if a file path is C:\Data Files\Today\FlowData1.fcs, ExtractFolderFromFilename("file_path") will return C:\Data Files\Today. Keyword tokens using the keyword $FCSE_FILENAME can be used for this function. |
||||||||||||||||||||||
FormatFloat("format string",number) |
FormatFloat formats the floating-point value given by Number using the format string given by Format String. The following format specifiers are supported in the format string:
The number being formatted is always rounded to as many decimal places as there are digit placeholders ('0' or '#') to the right of the decimal point. If the format string contains no decimal point, the value being formatted is rounded to the nearest whole number. If the number being formatted has more digits to the left of the decimal separator than there are digit placeholders to the left of the '.' character in the format string, the extra digits are output before the first digit placeholder. To allow different formats for positive, negative, and zero values, the format string can contain between one and three sections separated by semicolons, as follows:
If the section for negative values or the section for zero values is empty, that is if there is nothing between the semicolons that delimit the section, the section for positive values is used instead. If the section for positive values is empty or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation. |
||||||||||||||||||||||
FragmentCount("text1",'text2") |
Returns the number of string fragments in text2 separated by text1.
Text1 will equal a delimiter, such as "\", for example. Text 2 will be a pathway.
For example, FragmentCount("\","C:\Documents\Data\Sample.fcs") will return 4, since there are 4 fragments that are delimited by "\".
Keywords that return a pathway can be used for Text2. |
||||||||||||||||||||||
GetContainingFolder("file_path") |
Returns the name of the folder containing the file named in file_path.
Example, if file Sample.fcs was located in the directory C:\Program Files\De Novo Software\FCS Express 5 Plus Research Edition/Data, the output for this function would be Data. |
||||||||||||||||||||||
GetFragment(n, "text1", "text2") |
Returns the Nth string fragment in Text2, delimited by Text1.
N = the nth occurrence, Text1 = a delimiter, such as "\", Text2 = a string that uses Text1 as a delimiter.
Some examples of Text2 could be:
For example, GetFragment(1, "\", "C:\Documents\Data\Sample.fcs") will return C:.
GetFragment(2, "\", "C:\Documents\Data\Sample.fcs") will return Documents.
If n is a negative number, the function will start evaluating the text string backwards.
For example, GetFragment(-2,"_","SheldonCooper_ABC_DEF_GHI") will return DEF. |
||||||||||||||||||||||
IncludeTrailingPathDelimiter("file_path") |
Accepts the value of "File_path", while including the delimiter (\, for example) at the end of the string. |
||||||||||||||||||||||
Pos(x,y) |
X is the text that you are looking for. Y is the text that you are searching in. Returns the position of x inside y. If x cannot be found in y, the return value is 0. |
||||||||||||||||||||||
PositionInText("text1","text2",StartingPosition,N) |
PositionInText returns the position of a string within another string. Text1 = the text for which you are searching Text2 = the text in which you are searching StartingPoint = the position at which to start searching (1,2,3...etc.) N = the Nth occurrence for the string for which you are searching (1 for 1st occurrence, 2 for 2nd occurrence, etc.)
For example =PositionInText("d","abcdefgabcdefg",1,1) would return 4 because the first occurrence (N=1) of "d" occurs at position 4. =PositionInText("d","abcdefgabcdefg",1,2) would return 11 because the second occurrence (N=2) of "d" occurs at position 11.
This function would return a "0" if no occurrence can be found. |
||||||||||||||||||||||
RemoveSpaces(x) |
Removes the spaces from the text x, and returns the resulting text. |
||||||||||||||||||||||
RemoveText(x,y,RemoveAll) |
This function will remove the string x from y. RemoveAll will equal True or False depending on whether only the first occurrence is to be removed. For example, =RemoveText("def","abcdefg",True) will return abcg. |
||||||||||||||||||||||
ReplaceText(x,y,z,RemoveAll) |
This function will replace the string x with the string y located within the string z. RemoveAll will equal True or False depending on whether only the first occurrence is to be removed. For example, =ReplaceText("def","xyz","abcdefg",True) will return abcxyzg. |
||||||||||||||||||||||
x+y |
If x and y are both text (i.e., strings), returns the concatenation of x with y. |
||||||||||||||||||||||
Trim |
Removes spaces before and after a string of text. For example, =Trim(" abcd efgh ") will return abcd efgh |
Operator |
Description |
---|---|
ChiSquareTest([number1,...],[number2,...]) |
Performs the Chi-squared goodness of fit test to test if data is coming from specific distribution. The first parameter is an array of observed frequencies, the second parameter is an array of estimated (theoretical) frequencies. |
FTest([number1,...],[number2,...]) |
Performs F-Test by comparing number1 and number2 standard deviations. The parameters are the first and the second dataset. |
GrubbsTest([number1,...]) |
Performs the Grubbs test for outliers. Test is used to detect outliers in a univariate data set. It is based on the assumption of normality. That is, you should first verify that your data can be reasonably approximated by a normal distribution before applying the Grubbs' test. The parameter is the dataset. |
KSTest([number1,...],[number2,...]) |
Performs two-sample Kolmogorov-Smirnov goodness of fit test son independent random samples Data1 and Data2. Test determines if Data1 and Data2 samples are drawn from the same continuous population. The parameters are the first and the second dataset. |
LillieforsTest([number1,...]) |
Performs the Lilliefors goodness of fit test to a normal distribution with unknown parameters mu and sigma. The parameter is the dataset. |
SSMD(mean max,mean min,n max,n min,SDmax,SDmin) |
Short for Strictly Standardized Mean Difference. Has been used as a ranking metric for hit selection in high throughput screening assays. |
TTest1S([number1,...],expected mean) |
Performs the one sample T-test. It compares Data mean value with the expected mean. The first parameter is the dataset. |
TTest2S([number1,...],[number2,...],tails,paired) |
It compares Number1 mean value with Number2 mean value. The assumption is Number1 and Number2 variances are equal, but unknown. The first 2 parameters are the first and the second datasets. Tails parameter can be 1 or 2. It is used to define the type of null hypothesis, a value of 1 means left tailed, a value of 2 means two tailed. Paired can be True or False. If True, it will perform Two-Sample Paired t-Test. If False, it will perform Two-Sample Pooled (unpaired) t-Test. |
ZPrime(mean negative,SD negative,mean positive,SD positive) |
The ZPrime function is used to calculate the Z Factor. The Z-factor is an attempt to quantify the suitability of a particular assay for use in a full-scale, high-throughput screen by comparing the Mean and Standard Deviation of a negative control to the Mean and Standard Deviation of a positive control within the experiment. |
ZTest([number1,...],expected mean,expected SD) |
Compares the normally distributed Data elements mean value with known standard deviation expected SD, to a mean value expected mean. ([Number1,...]) is the dataset. |
Date and Time Manipulation Functions
Function |
Description |
---|---|
DateKWToDate($DATE keyword,n) |
Takes the standardized format of the $DATE keyword, which is in either dd-mmm-yy or dd-mmm-yyyy format, and returns mm/dd/yyyy. If $DATE has the year listed as yy, n will be placed in front of yy to produce yyyy. A keyword token will be used to insert the value of $DATE.
For example if the $DATE keyword equals 03-Nov-05, DateKWToDate($DATE,20) will return 11/03/2005.
If the year is already formatted as yyyy, the function will still return mm/dd/yyyy. If the year is already formatted as yyyy, n must still be accounted for in the function.
For example, if $DATE keyword equals 04-Jul-2008, DateKWToDate($DATE,20) will return 07/04/2008. Also, DateKWToDate($DATE,0) will return 07/04/2008. |
DaysBetween(StartDate,EndDate) |
Returns the number of days between the values entered for the Start Date and End Date. Dates in anything other than a mm/dd/yyyy format will need to be run through DateKWToDate and/or FormatDateTime prior to being used within this function. |
FormatDateTime("format","Date or Time") |
FormatDateTime formats the Time or Date value given by using the format given.
Example: =FormatDateTime("yyyy-mm-dd",(<Current Date token>)) will return the Current Date in a format showing Year-Month-Day, with 2 digits for the month and day, and 4 digits for the year. =FormatDateTime("hh:mm:ss",(<Current Time token>)) will return the Current Time in a format showing Hour:Minute:Second, with 2 digits for Hour, Minute and Second.
*Please note that if using the <Current Date> token, no quotation marks are needed, as the Result Type for this token is Text.
Formats can be as follows below:
Specifier Displays : c Displays the date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the date-time value indicates midnight precisely. d Displays the day as a number without a leading zero (1-31). dd Displays the day as a number with a leading zero (01-31). ddd Displays the day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable. dddd Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable. ddddd Displays the date using the format given by the ShortDateFormat global variable. dddddd Displays the date using the format given by the LongDateFormat global variable. e (Windows only) Displays the year in the current period/era as a number without a leading zero (Japanese, Korean, and Taiwanese locales only). ee (Windows only) Displays the year in the current period/era as a number with a leading zero (Japanese, Korean, and Taiwanese locales only). g (Windows only) Displays the period/era as an abbreviation (Japanese and Taiwanese locales only). gg (Windows only) Displays the period/era as a full name (Japanese and Taiwanese locales only). m Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed. mm Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed. mmm Displays the month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable. mmmm Displays the month as a full name (January-December) using the strings given by the LongMonthNames global variable. yy Displays the year as a two-digit number (00-99). yyyy Displays the year as a four-digit number (0000-9999). h Displays the hour without a leading zero (0-23). hh Displays the hour with a leading zero (00-23). n Displays the minute without a leading zero (0-59). nn Displays the minute with a leading zero (00-59). s Displays the second without a leading zero (0-59). ss Displays the second with a leading zero (00-59). z Displays the millisecond without a leading zero (0-999). zzz Displays the millisecond with a leading zero (000-999). t Displays the time using the format given by the ShortTimeFormat global variable. tt Displays the time using the format given by the LongTimeFormat global variable. am/pm Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly. a/p Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly. ampm Uses the 12-hour clock for the preceding h or hh specifier, and displays the contents of the TimeAMString global variable for any hour before noon, and the contents of the TimePMString global variable for any hour after noon. / Displays the date separator character given by the DateSeparator global variable. : Displays the time separator character given by the TimeSeparator global variable. 'xx'/"xx" Characters enclosed in single or double quotation marks are displayed as such, and do not affect formatting. |
HoursBetween(start time,end time) |
Counts the number of hours between the start time and the end time. The keywords $BTIM or $ETIM can be used for the start and end times. However, user-defined times would need to be fed through the StrToTimeFMT function prior to use in this function to establish the proper formatting. |
MillisecondsBetween(start time,end time) |
Counts the number of milliseconds between the start time and the end time. The keywords $BTIM or $ETIM can be used for the start and end times. However, user-defined times would need to be fed through the StrToTimeFMT function prior to use in this function to establish the proper formatting. |
MinutesBetween(start time,end time) |
Counts the number of minutes between the start time and the end time. The keywords $BTIM or $ETIM can be used for the start and end times. However, user-defined times would need to be fed through the StrToTimeFMT function prior to use in this function to establish the proper formatting. |
SecondsBetween(start time,end time) |
Counts the number of seconds between the start time and the end time. The keywords $BTIM or $ETIM can be used for the start and end times. However, user-defined times would need to be fed through the StrToTimeFMT function prior to use in this function to establish the proper formatting. |
StrToDateFMT(text, "format", "delimiter") |
Returns a date string in the format as defined by the user, using the specifier displays as seen in FormatDateTime("format","Date or Time") of ddmmyyyy using the delimiter designated, such as "/". |
StrToTimeFMT(text, "time delimiter", "millisecond delimiter") |
Returns a time string using a time delimiter and a millisecond delimiter. |
YearsBetween(Start Date,End Date) |
Returns the number of years between the values entered for the Start Date and End Date. Dates in anything other than a mm/dd/yyyy format will need to be run through DateKWToDate and/or FormatDateTime prior to being used within this function. |
Parameter Math Variables. These functions can be used to manipulate or get information out of existing parameter values.
Function |
Description |
---|---|
Row |
The variable 'row' describes the current value in a particular row, or cell number, of the data file. ‘Row’ may be used to perform sequential calculations on a series of values in a file. For example, 'row' may be used to create a time parameter. By using the 'row' variable, you use the cell number as a parameter and can plot fluorescence against cell number to check for uniform flow over time. Or, if the acquisition took 5 minutes and you have 5000 cells you could use the following formula to get the actual time (in minutes) where that cell was acquired. Formula: =(row-1)*(5/5000) |
ConvertLinToLog(I,J,K,L) |
Same as above, except that variable I will use the Parameter number that is being converted, for example P4 or P14. |
ConvertLogToLin(I,J,K,L) |
Same as above, except that variable I will use the Parameter number that is being converted, for example P4 or P14. |