Compute Replicate Average
Last updated
Last updated
The Clarity LIMS NGS Extensions Package v5.14 includes the computeReplicateAverage script, which automates calculation of replicate (referred to as derivatives in the LIMS) average values. The script can also optionally calculate standard deviation and %CV values.
This section provides details on the script, its parameters, and LIMS configuration requirements.
The computeReplicateAverage script uses data stored in a source UDF / custom field (specified by the src parameter) to calculate the average across replicates, and writes the resulting value to a destination UDF / custom field (specified by the dest parameter).
The script assumes the step has input analytes / derived samples with replicated per-input results / measurements.
The script groups the per-input results / measurements by their parent analyte / derived sample.
For each group, the script calculates the average of the result UDFs / measurement custom fields specified by the src parameter, ignoring any results that:
Are missing src values, or
Have an exclude field set to true
The resulting averages are written back into the parent analyte / derived sample field specified by the dest parameter for each group.
The exclude parameter is optional and no exclusions are performed if it is missing.
The script can also be used to calculate standard deviation and %CV values and add these results back to the corresponding UDF / field in the parent analyte / derived sample. The names of the Standard Deviation and %CV UDFs must be given to the script for it to update the values.
When working with the computeReplicateAverage script, the automation command line must be constructed as follows:
The inputs to the step must have values for the analyte UDF / derived sample custom field to be used as the source field. There must be an additional analyte UDF / derived sample custom field configured as the destination field - to capture the calculated replicate average. Both field types must be Numeric.
The following table provides example field configuration details.The field names used correspond to those used in the command line Example 1 shown above.
Configured on ResultFile in LIMS v4.2.x and Measurement in LIMS v5.x & later
Configured on Analyte in LIMS v4.2.x and Derived Sample in LIMS v5.x & later
Parameter
Description
-u {username} -username {username}
(Required) LIMS login username
-p {password} -password {password}
(Required) LIMS login password
-i {stepURI:v2} -stepURI {stepURI:v2}
(Required) LIMS step URI
-log {logFileLIMSID} -logFileName {logFileLIMSID}
(Required) LIMS ID of the log file placeholder
-src <srcUDF> -srcUDF <srcUDF>
(Required) Source UDF / custom field name
-dest <destUDF> -destUDF <destUDF>
(Required) Destination UDF / custom field name
-exclude <excludeUDF> -excludeUDF <excludeUDF>
(Optional) Exclude UDF / custom field name
-sd <sdUDF> -stdDevUDF <sdUDF>
(Optional) Standard deviation UDF / custom field name
-cv <cvUDF> -cvUDF <cvUDF>
(Optional) %CV UDF / custom field name
Field Name
Field Type
Field Constraints / Options
Preset Values / Additional Options
Concentration In example 1, this is the field specified by the -src parameter
Numeric
Required: Yes
Read Only: No
Decimal Places Displayed: 2
Ignore In example 1, this is the field specified by the -exclude parameter
Boolean (v4.2.x)
Toggle Switch (v5.x)
Required: No
Read Only: No
Default: None Set
Field Name
Field Type
Field Constraints / Options
Preset Values / Additional Options
Avg Concentration In example 1, this is the field specified by the -dest parameter
Numeric
Required: Yes Read Only: No
Decimal Places Displayed: 2