Performing Post-Step Calculations with Custom Fields/UDFs

Compatibility: API version 2 revision 21 and later

Important measurements and values are often calculated from other values. Instead of performing these calculations by hand, and then manually entering them into the LIMS (thereby increasing the probability of error), you can develop scripts to perform these calculations and update the data accordingly.

This example demonstrates the use of scripts and user-defined fields (UDFs) / custom fields for information retrieval and recording of calculation results in the LIMS.

NOTE:

  • Information about a step is stored in the process resource in the API.

  • Information about a derived sample is stored in the analyte resource in the API. This resource is used as the input and output of a step, and also used to record specific details from lab processing.

  • As of BaseSpace Clarity LIMS v5.0, the term user-defined field (UDF) has been replaced with custom field in the user interface. However, the API resource is still called udf.

Prerequisites

Clarity LIMS v5 and later:

  1. You have defined the following custom global fields on the Derived Sample object:

    • Concentration

    • Size (bp)

    • Conc. nM

  2. You have set the three fields configured in step 1 to display in the Sample table of the Record Details screen.

  3. You have configured a Calc. Prep step to apply Concentration, Size (bp) to generated derived samples.

    • You have run the Calc. Prep step and it has generated derived samples.

    • You have input values for the Calculation and Size (bp) fields.

  4. You have configured a Calculation step to apply Conc. nM to generated derived samples.

    • You have run the Calculation step - with the derived samples generated by the Calc. Prep step as inputs, and it has generated derived samples.

Code Example

First, the values to be used in the calculation - the Concentration and Size (bp) UDFs / custom fields are applied to the samples by running the Calc. Prep preparation step. You can then enter the values for these fields into the LIMS as follows:

Clarity LIMS v5 and later:

  • In the Record Details screen, in the Sample table.

Expected Output and Results

After the script has successfully completed, the Conc. nM results will display

  • (LIMS v5 & later) In the Record Details screen, in the Sample table.

Attachments

UsingAnalyteUDFForCalculations.groovy:

Last updated