Validate Sample Count

The Clarity LIMS NGS Extensions Package includes the validateSampleCount script, which checks the number of samples being input to or output by the step.

This article provides details on the script and its parameters, and LIMS configuration requirements.

Script Overview

The script validates the number of step inputs or outputs, comparing it against configurable minimum and maximum values - determined by -min and -max parameters.

By default, the script runs in count inputs mode and validates the step inputs. If you supply the optional -o parameter with value set to true, the script runs in count outputs mode and validates the step outputs.

Count inputs mode

The typical use case for count inputs mode is to ensure that the correct number of samples is being input to the step.

The validateSampleCount script is triggered when the user clicks the Begin Work button to exit the Ice Bucket screen and start the step.

  1. The script compares the number of analyte / derived sample step inputs to the -min and -max parameter values.

  2. If the number of inputs:

    • Lies within the -min and -max value range, the user proceeds to the next screen.

    • Is less than the -min value or more than the -max value, user is returned to the Ice Bucket screen.

Count outputs mode

The typical use case for count outputs mode is to ensure that enough replicates (derivatives) are created to fill a flow cell:

  1. The validateSampleCount script is triggered when the user clicks the Begin Work button to exit the Ice Bucket screen and start the step.

  2. The script compares the number of step outputs to the -min and -max parameter values.

    • The script counts all per-input outputs, both analyte / derived sample and result file / measurement types.

    • The script ignores Shared ResultFiles / step file placeholders and pool outputs.

  3. If the number of outputs:

    • Lies within the -min and -max value range, the user proceeds to the next screen.

    • Is less than the -min value or more than the -max value, user is returned to the Ice Bucket screen.

Script Parameters

Command Line Examples

Count inputs mode

Two examples are provided below; both set the script to count inputs mode. In the first example, the -o parameter is provided and set to false. In the second example, the -o parameter is omitted.

bash -l -c "/opt/gls/clarity/bin/java -jar /opt/gls/clarity/extensions/ngs-common/v5/EPP/ngs-extensions.jar
-i {stepURI:v2} -u {username} -p {password} -min 7 -max 8 -o false script:validateSampleCount"
bash -l -c "/opt/gls/clarity/bin/java -jar /opt/gls/clarity/extensions/ngs-common/v5/EPP/ngs-extensions.jar
-i {stepURI:v2} -u {username} -p {password} -min 7 -max 8 script:validateSampleCount"
Count outputs mode
bash -l -c "/opt/gls/clarity/bin/java -jar /opt/gls/clarity/extensions/ngs-common/v5/EPP/ngs-extensions.jar
-i {stepURI:v2} -u {username} -p {password} -min 7 -max 8 -o true script:validateSample

Configuration

The validateSampleCount script is intended to run when the user clicks the Begin Work button on the Ice Bucket screen and starts the step.

To achieve this, configure the automation trigger as follows:

  • Trigger Location: Step

  • Trigger Style: Automatic upon entry

Last updated