Equation syntax

 

ModFit equations are expressions that are compiled by the program and evaluated each time the model is analyzed. Equations can contain literal text, keywords from the FCS file being analyzed, and symbols that provide access to the computed results of the analysis. Mathematical operations include addition, subtraction, division, and multiplication, grouping of operations using parentheses, and use of build-in functions.

 

Strings

String literals are enclosed in quotation marks.

Example equation: "This is text."

Report output: This is text.

 

Keywords:

Keywords can be draw from the FCS file and from internally computed values. Keywords are enclosed in square brackets.

FCS keywords vary from file to file, and are generally created by the software that was used to acquire the data file.

Internal keywords include the following:

[DATE]

displays date of analysis.

[TIME]

displays time of analysis.

[FILE]

displays name of data file analyzed.

[REPORT]

displays name of report.

[AUTONAMEREPORT]

displays name generated by AutoNameReport.

[MODEL]

displays the name of the model.

[ANALYSIS]

displays the type of analysis performed, e.g. Automatic, Manual.

[RCS]

displays the reduced chi-square value from the last fit of the model.

[GATE1]

displays name of gate one, or "Off" if no gate

[GATE2]

displays name of gate two, or "Off" if no gate

[GATE3]

displays name of gate three, or "Off" if no gate

[FILEPATH]

displays full path to data file.

[MODELPATH]

no longer supported

[REPORTPATH]

displays full path to the report

[VERSION]

displays the internal version of the program

[LINEARITYFACTOR]

displays the configuration setting for linearity

[EXTREFMEAN]

displays the value for the External Reference Mean position from the Auto Analysis Settings dialog.

[DIPTOSTDRATIO]

displays the value for the Diploid-to-Standard Ratio from the Auto Analysis Settings dialog.

[RANGEnNAME]

displays the name of range with ID of n

[RANGEnLEFT]

displays the left channel position of range with ID of n

[RANGEnRIGHT]

displays the right channel position of range with ID of n

 

Example equation: "Today is ";[DATE]

Example equation: [RANGE4NAME]

Report output shows name of range with ID of 4: "Dip G1"

 

Internal functions

Internal functions are used to gain access to component details, areas, and other computed values. Below is a table describing each function. Note that component and compartment indexing start at zero (0).

Function

Description

A[m, n]

Returns the area of component m, compartment n. To return the area of all compartments for a component, use an asterisk (*) for n. To return the area of all components, use an asterisk for m.

M[m, d]

Returns the value of detail d for model component m.

T[n]=equation

Sets the value of temporary variable n to the expression in equation. After setting a temporary variable, you can use the variable without the "=equation" portion to return the value of the equation.

T[n]

Returns the value stored in temporary variable n.

P[n]

Set the floating-point precision for the rest of the equation to n decimal places.

Y[m, start, end]

Returns the portion of the area of component m that falls between channels start and end.

S[start, end]

Returns the sum of events between channels start and end.

U[start, end]

Returns the mean between channels start and end.

H[ ]

Returns the mean of the highest active cycle component. NOTE: There is no space between the open and close square brackets.

F[expression]

Returns the value of a keyword converted into a floating-point number. This allows the keyword to be used in calculations.

For example, the $P1B keyword stores the number of bits used to store a value for parameter 1 in an FCS file. To compute the number of bytes used by parameter 1, the following equation could be used: "Parameter 1 bytes = ";F[[$P1B]]/8

 

Mathematical operations

The following operations are supported.

Operation

Usage

Addition

Use the plus symbol (+) between numeric values.

Multiplication

Use the asterisk (*) between numeric values.

Subtraction

Use the minus symbol (-) between numeric values.

Division

Use the slash (/) between numeric values.

Grouping

Use parentheses to group mathematical operations.

 

Concatenation

Equations can contain multiple elements separated by a semi-colon (;).