Custom formulae are available to use to design your own custom formula for computed descriptive statistics within OMIQ thereby minimizing the need for additional software in your analysis pathways. Custom stats can use values from the metadata and the count statistics of filters. The example presented below is showing how to compute absolute cell counts using counting beads.
1. Prepare your Data
1.1 Add Metadata to your Dataset

Add the necessary metadata to your dataset. In this example, the counting beads used are from BioLegend and the necessary metadata for the formula provided by BioLegend has been added.
To learn more about how to add metadata to your dataset, please view Setting your Metadata.
1.2 Gate your populations of interest
Using the Gating task, identify the populations of interest that you want to include in your formula. A gate, called as a filter in OMIQ, can be used in your formula syntax in Step 2.
2. Add a Custom Formula to your Workflow
To use Custom Formulae, we must first add a custom formula/e, which are added and stored in the Details tab of your workflow.

In your workflow, click on the Details tab. Click on Edit to open the custom stats formula panel.

Provide a Name for your formula. Enter your Formula. Click Submit.
2.1 Formula Syntax
Custom stats formulae in OMIQ follow the GEMDAS/BEDMAS rule of math. Remember that if you use grouping symbols (i.e. parentheses) in your formula, ensure that you close these groups.
- Mathematical operation symbols:
- + is for addition
- - is for subtraction
- * is for multiplication
- / is for division
Useful syntax:
-
$MD[Metadata Column Name]: This will use data from the particular metadata column. The Metadata Column Name is case sensitive and should exactly match the column name as entered in Step 1.1. The metadata values must be numerical.
-
$COUNT[Filter]: This will use the count statistics for a particular filter. Filter in this case can either be $FILT or a specific filter in your gating tree.
- $FILT: This allows you to select a particular filter in the Export Statistics task when using your custom stats formula. The syntax for this is $COUNT[$FILT].
Every instance of $COUNT[$FILT] in your syntax will use the counts of a chosen filter. For example, if you have the formula $COUNT[$FILT]*$COUNT[$FILT], this will mean that you are multiplying the count of a filter with itself. If you want to use the count statistics of a specific filter in your formula, use the syntax for Specific filter described below.
- Specific filter: You can use a specific filter in your gating tree by providing the filter name ($COUNT[Filter Name]). This means that the custom stats formula will use the count statistics of that particular filter. This is case sensitive and should exactly match the filter name in your gating strategy. If your gating strategy have filter names that are identical to each other, then you would need to make it specific by adding the name of the parent filter to it as a filter path. The general syntax for this is Parent Filter Name/Child Filter Name. An example is provided below.

In the example gating tree above, if we wanted to use the count statistics for Beads filter (in red circle) in our formula, the syntax would be $COUNT[Beads]. If we wanted to use the TIM3 filter in our formula, we would need to specify which TIM3 as the filter exist as a child of CD4 and CD8. If we wanted to use the counts of TIM3 from the CD4 parent, the syntax would be $COUNT[CD4/TIM3]. Remember when typing the filter path, each subsequent filter in the hierarchy is separated by a /.
Using the $COUNT[Specific Filter] allows you to specify which filter's count statistics you want to use in your formula through the filter path.
In our example, the formula provided by BioLegend is Absolute Cell Count (if the bead:cell ratio is not 1:1) = (((Cell Count x Count Bead Volume)/(Bead Count x Cell Volume))*Count Bead Concentration). The way that we will be entering this as a formula is ((($COUNT[$FILT]*$MD[Bead Volume])/($COUNT[Beads]*$MD[Cell Volume]))*$MD[Counting Beads per uL]).
In the formula syntax: ((($COUNT[$FILT]*$MD[Bead Volume])/($COUNT[Beads]*$MD[Cell Volume]))*$MD[Counting Beads per uL]) shows us an example of using the $COUNT[$FILT] and the $COUNT[Specific Filter] in the form of $COUNT[Beads], where "Beads" is the filter path. This particular formula means that we can specify the filters we want to include when using the Custom Stats Formula in Export Stats Task (see Step 3) through the syntax: $COUNT[$FILT]. Further, the formula also specifies that we want to use the counts from a specific filter (Beads) in the formula as well through the syntax: $COUNT[Beads].
To ensure that you are entering the correct metadata name and filter path, you can work with two windows. To learn more about this, please see our article Two Window Analysis in OMIQ.
2.2 Rounding Functionality
You can add a rounding functionality in your custom formulae. The following rounding functionality can be used:
ROUND(n): Rounds the number, n, to the nearest integer. Using this function means that no decimal places will be retained in the number. For example, ROUND(1234.5678) will return 1235 while ROUND(1234.4321) will return 1234
ROUND(n, precision): Rounds the number, n, to the number of decimal places specified by the precision. For example, ROUND(1234.5678, 2), would return 1234.57. Please do note that non-significant zeroes are not displayed.
FLOOR(n): Allows you to always round down a number ,n, to the nearest integer. For example, FLOOR(-1234.5678) will return -1235.
CEIL(n): Allows you to always round up a number, n, to the nearest integer. For example, CEIL(1234.4321) will return 1235.
TRUNC(n): Allows you to only return the integer part of the number, n. For example, TRUNC(1234.4321) will return 1234.
ABS(n): Allows you to return the absolute value of the number, n, provided. For example, ABS(-1234.4321) will return 1234.4321.
In using this in our syntax, replace n, with any part of the formula. For example we can use this as ROUND($COUNT[$FILT]) means that the counts for the chosen filter will be rounded. We can also use this to round the results of our custom formula. In our example, this can look like ROUND(((($COUNT[$FILT]*$MD[Bead Volume])/($COUNT[Beads]*$MD[Cell Volume]))*$MD[Counting Beads per uL]),2) which will round the answer to the formula to 2 decimal places.
3. Use your Custom Formula in Export Stats
3.1 Add an Export Stats task

Click Add new child task and select Export Stats from the task selector.
3.2 Select your Files

Select the Files you want to apply the custom formula to and click Custom.
You don't have to fill in the other tabs for Export Stats to work if you don't need to.
3.3 Configure Custom Formulae

Select the Name of the formula you want.

Select the Filter you want to use in your formula.

If desired, multiple custom formulae can be set-up by clicking on Add Row.
In the example above, an additional row was added to use get the round the absolute count to 2 decimal places.
3.4 Configure your Export settings

Select the File Format you want to export to, either as a GraphPad Prism file or CSV file.
Adjust any other settings and click Export or Run Export Stats.
To learn more about how OMIQ integrates with GraphPad Prism, view our support articles here: GraphPad Prism + OMIQ.
3.5 Download your File

Navigate to the Results tab within the Export Statistics task and click the cloud icon to download your file.
4. Another Example
Another useful absolute cell count formula is to use the relative bead count to determine the absolute cell count (cells/uL). The formula for this is (A*C)/(B*D) wherein:
A: Cell Gate Count
B: Bead Count
C: Number of Counting Beads in the Sample (Lot and Company specific)
D: Final Volume of Sample (This is total volume and not captured volume)
As an example, an experiment to count T cells and B cells from PBMCs was performed with a final volume of 300 uL. The experimental data was uploaded to OMIQ. A metadata column to denote the number of counting beads was added with the metadata column title "Counting Beads." Beads were gated in OMIQ and given the name "Beads." T cells (CD3+) and B cells (CD19+) were also gated. The syntax for the absolute cell count will be:
($COUNT[$FILT]*$MD[Counting Beads])/($COUNT[Beads]*300)
Breaking the syntax down:
A: $COUNT[$FILT]: gives us the cell gate count
B: $COUNT[Beads]: gives us the bead count
C: $MD[Counting Beads]: gives us the number of counting beads in the sample
D: 300: Final volume of Sample
Once the syntax is used in Export Stats, we can then select the filters for our T cells (CD3+) and B cells (CD19+) to compute for the cell counts.