Configure Calculated Analyte Schemes
This activity describes how to create or modify calculated analyte schemes in AssayNet LIMS. These schemes are used to perform automatic calculations on analytical results—ranging from simple formulas (for example, multiplying a raw result by a factor) to more complex, multi-scheme operations.
Creating calculated analyte schemes requires a good understanding of how the AssayNet LIMS handles formulas. While simple calculations are straightforward, more advanced configurations involve referencing other schemes, applying conditions, and structuring expressions in a way that differs from tools like Excel.
It is important to note that Excel and AssayNet LIMS use different logic structures for performing calculations. In Excel, formulas are written in a cell-based format (for example, =A1+B1), whereas in AssayNet LIMS, formulas follow a SQL-like structure, referencing scheme codes instead of cells and operating on sets of data.
Note: The formula builder interface features two distinct windows: English Formula and Raw Formula.
The English Formula window is designed to help users understand the structure of the formula in plain language. It displays the formula using the Scheme Code entered for analyte scheme involved. While this view is helpful for clarity and validation, it is primarily informational and does not directly control how the formula is applied within the system.
The actual formula logic is executed through the Raw Formula window. This window uses the code ID for each analyte scheme—unique identifiers assigned within the SQL database. The Raw Formula defines how the system performs the calculation during data processing.
Although you can build or modify a formula in either window, this activity focuses primarily on how to construct a formula in the English Formula window, with a brief overview of the Raw Formula window. For more complex or SQL-based expressions, contact AssayNet Support for further assistance.
You can build your formula using not only analyte schemes but also predefined system parameters that are hard-coded into AssayNet LIMS. These parameters pull values from other pages of the system, such as the initial sample weight, the prep weight recorded in the Laboratory Job, or other fields associated with the sample.
This activity describes the basic tools and options to build or modify calculated analyte schemes. For help with advanced use cases and more complex formulas, contact AssayNet Support.
Activity Steps
- On the Profile ribbon tab, under the Analysis group, click Analyte Schemes.
The Analyte Schemes screen displays.
- Select the calculated Scheme Code to build or modify. You can filter the analyte schemes by selecting Analyte Types, Analytes, and/or Methods. To create a new Scheme Code, see Create Analyte Schemes.
- Click Edit.
The Edit Analyte Scheme screen displays.
- Click the Enter Formula icon in the Analyte Scheme Type field group.
The Analyte Scheme Formula screen displays and defaults to the analyte for the selected Analyte Scheme on the English Formula building window.
- To start building a simple formula in the English Formula window:
- Locate the analyte scheme to use in the formula in the Analyte Scheme Input tab. You can use the Analyte and Method filters to narrow the search.
- Select the Analyte Scheme and click the Add Analyte icon to send it to the formula builder window.
- Click the required operator in the formula builder window keypad; for example, X for multiplication.
- Use one of the following methods to enter the next variable in your formula:
- Select the required Analyte Scheme and click the Add Analyte icon to send it to the formula builder window.
- Use the keypad to enter a numeric value.
You can use the C and CE buttons to delete the entire formula or remove the last parameter entered, respectively.
Note: Alternatively, for greater flexibility in editing the formula, switch to Edit Mode, as described in the following steps.
- To edit the formula using Edit Mode:
- Click the pen and paper icon (located to the right of the window) to manually modify the formula.
The formula builder window background changes to yellow.
- Enter parameters such as numeric values or operator symbols using the computer keyboard.
Note: To use an Analyte Scheme in your formula, you must still select it and then click the Add Analyte icon. This ensures that the correct code ID is inserted, which is essential, as the actual formula logic is executed using the underlying SQL code ID. If needed, you can modify the English name of the parameter in the English Formula window for easier identification. Changing the display name does not affect the execution of the formula.
- Click the pen and paper icon to save changes.
The formula builder window background changes back to white.
- Click the pen and paper icon (located to the right of the window) to manually modify the formula.
- To use other pre-configured parameters in the formula:
- Click the Lab Job Input tab.
The predefined system parameters list displays.
- Select predefined parameters as required.
Note: The following parameter options are the most commonly used as variables in formulas.
- Dry Weight—This parameter retrieves the weight captured (if any) in the Data screen on the Laboratory Jobs page from which the instrument run is created. For more information, see Enter Measurements in the Laboratory Job. Note that only the weight associated with the same analysis code is retrieved by the system for use in the final equation. The system does not apply a Dry Weight value from different analysis codes.
Note: You do not need to include parameters such as analyte scheme for the raw result × dry weight / volume when building the formula to calculate final concentration, because these are predefined calculations available in the scheme options. For more information, see Configure Analyte Schemes.
- Sample Weight—This parameter retrieves the initial weight (if any) captured in the Data screen of the Sample Batches page.
- Date—Use the date parameters when creating a date-type analyte scheme. These are standalone parameters that you insert into the formula builder to display the required date as the final result.
- Dry Weight—This parameter retrieves the weight captured (if any) in the Data screen on the Laboratory Jobs page from which the instrument run is created. For more information, see Enter Measurements in the Laboratory Job. Note that only the weight associated with the same analysis code is retrieved by the system for use in the final equation. The system does not apply a Dry Weight value from different analysis codes.
- Click the Lab Job Input tab.
- Configure the Aggregate option if required.
Note: By default, when a sample has replicates, AssayNet LIMS averages the values to calculate and report a single final result for the sample or QC material. This condition can be predefined in the Calculation Options in the Analysis Code. For more information, see Configure Calculation Options for Analysis Codes. However, in the analyte scheme, you can select a different aggregate type to define how AssayNet LIMS should handle replicate values.
- In the Aggregate field, select from:
- None—(Default) This option uses the predefined aggregate setting.
- Sum—Sums all replicates for the selected sample type.
- Average—Averages the replicates for the selected sample type.
- Maximum—Selects the maximum result among the replicates.
- Minimum—Selects the minimum result among the replicates.
- If the Aggregate field is selected, the Applies field is enabled. Select from:
- All—The aggregate behavior affects all samples.
- Samples—The aggregate behavior affects only the client samples.
- Reference Material—The aggregate behavior affects only the reference material samples.
- Method Blank—The aggregate behavior affects only the method blank samples.
Note: You can leave the Group By field as None.
- Follow steps 2-4 to select the analyte scheme to which the aggregate options apply and send it to the formula builder.
- In the Aggregate field, select from:
- In the Calculated Level field, select from:
- Intra Run–Results Level—Calculations are performed using only the results from within the same instrument run. All analyte schemes in the formula must come from any of the instrument runs assigned to the sample batch at the result level. This is the default option and is best suited for most analyte scheme calculations, especially simple ones.
- Intra Job–Analysis Level—Allows formulas to reference data from the laboratory job from which the run was created. This is useful for referencing values like dry weight or sample weight.
- Inter Run–Analysis Level—Calculations are performed using only the results from the same instrument run at the analysis level. All analyte schemes in the formula must come from this run.
Inter Run–Sample Level—Calculations are performed using the results from different instrument run at the sample level. All analyte schemes in the formula must come from this run.
Note:You can try each option and perform testing to determine which one yields the results you need. To modify and test the analyte scheme directly in the Data screen of the Instrument Run page, see Test Calculated Scheme.
- In the Text Calculation field group, select from:
- Evaluate as Numeric—Treats the values as numbers during calculation. Use this when the text field contains numeric data that needs to be processed. This is the default options and is best suited for most analyte scheme calculations, especially simple ones.
- Evaluate as Text—Performs the calculation based on the text content itself. Use this option when the analyte scheme involves other analyte schemes that are text-based and used in logic expressions such as conditional text comparisons.
Use Text Result—Returns a fixed or predefined text result directly from the formula. It does not evaluate input values but outputs the text as the final result.
- Select the Prep Product the formula applies to, if required.
Note: Samples can have more than one prep product. By default, the calculation applies to all of them. You can specify which prep product the calculation should use.
- To use the raw formula window:
- Click the Raw Formula icon.
The window displays the SQL code for the formula (if any).
- To modify the formula, use steps 2-5 and/or enter Edit Mode as described in step 6.
- To obtain the SQL code for the required analyte schemes, in the previous screen Analyte Schemes, browse for the analyte scheme you want to use in your formula.
- Click OK to exit the Analyte Scheme Formula screen.
- Click OK to exit the Edit Analyte Scheme screen.
- Select the Analyte Scheme. You can filter the analyte schemes by selecting Analyte Types, Analytes, and/or Methods.
- On the Utilities ribbon tab, click Current ID.
An AssayNet LIMS message displays, showing the Record ID for the selected record.
Note: If the Record ID field appears blank, it usually means the analyte scheme hasn't been properly selected. To select it again, click to the left of the row under the Method column.
- Click the Raw Formula icon.
- To test the formula, see Test Calculated Scheme.