Checking That Containers Are Named Appropriately
Last updated
Last updated
When samples are placed onto containers in BaseSpace Clarity LIMS, the default operation is that containers produced by the system are named with their LIMS ID (for example 27-1234 etc). The expectation is that after samples have been placed, the user will rename the containers with the barcode that is on the plate, chip, or other container.
There are places in the workflow in which issues will occur with integrations if the user renames the container incorrectly.
For example, when loading libraries onto a flow cell for sequencing, the flow cell container must be renamed with the actual ID/barcode of the flow cell in order for the Illumina integration to complete its work successfully.
This example provides a short script that checks to see if the user has correctly renamed containers after the placement of samples. It also shows what occurs in the Clarity LIMS Web Interface when the script encounters a naming issue.
In this example, the protocol step is configured to invoke the script when the user exits the step's Sample Placement screen.
The EPP command is configured to pass the following parameters:
An example of the full syntax to invoke the script is as follows:
When the user enters the Sample Placement screen, the rightmost Placed Samples area will show the containers created with their default, system-assigned names:
When the user tries to leave the Sample Placement screen, the script is invoked:
If the script finds any containers that still have their default, system-assigned names, an error message is generated:
To complete the protocol step, the user must first rename the containers:
The main method of interest is validateContainerNames().
This method queries the placements resource for the current step, and gathers the LIMS IDs of the selected containers.
For each selected container associated with the protocol step, the containers resource is called:
The container name is compared to the LIMS ID.
If the values are identical, an error message is generated.
Additional validation: Ideally, this script is set up to also validate the renamed containers against a specific goal. For example, the attached example script checks to see that the new name is at least 10 characters in length. You may choose to replace or supplement this optional, additional validation to provide specific logic to suit your business needs.\
Both of the attached files are placed on the Clarity LIMS server, in the /opt/gls/clarity/customextensions folder.
You will need to update the HOSTNAME global variable such that it points to your Clarity LIMS server.
The example code is provided for illustrative purposes only. It does not contain sufficient exception handling for use 'as is' in a production environment.
validateContainerNames.py:
-l
The limsid of the process invoking the script (Required)
-u
The username of the current user (Required)
-p
The password of the current user (Required)
-s
The URI of the step that launches the script (Required)