Checking for Index Clashes Based on Index Sequence
While not a common scenario, it is possible to have two molecular barcodes/indices in BaseSpace Clarity LIMS that share the same sequence.
Within Clarity LIMS, there is logic that can be enabled to prevent pooling of samples with the same index name. However, this check is based upon the index name, not the sequence. In the case of identical indexes with differing names, additional logic is required to prevent index clashes based upon the index sequence.
This example provides a solution that looks for index clashes based upon sequence.
Solution
In this example, the protocol step that is responsible for pooling is configured to invoke the script as soon as the user exits the step's Pooling screen.
Parameters
The EPP command is configured to pass the following parameters:
-l | The limsid of the process invoking the code (Required) | The {processLuid} token |
-u | The username of the current user (Required) | The {username} token |
-p | The password of the current user (Required) | The {password} token |
-s | The URI of the step that launches the script (Required) | The {stepURI:v2:http} token |
An example of the full syntax to invoke the script is as follows:
User Interaction
When the user exits the Pooling screen, the script is invoked.
If no index clashes are found, the step proceeds and the script does not report back to the user.
If an index clash is found, a message is returned to the user, informing them of the problematic components within the affected pool. The user is not able to continue the step without first re-constituting the pools.
About the Code
The main method in the script is checkIndexes(). The method in turn carries out several operations:
The step's pools resource is queried.
The constituent artifacts of each pool are identified, along the with name of the reagent-label applied.
For each reagent-label:
The associated sequence is identified.
A dictionary is constructed using the sequence as key, the value being the name of the derived sample(s) associated with the sequence
If any sequence in the dictionary is associated with more than one derived sample, an error message is constructed and is reported to the user once all pools have been considered.
Assumptions and Notes
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.
NOTE: The current script uses caching to avoid unnecessary GETs, but does not use batch transactions. In the case of large levels of multiplexing, the script could be reworked to gather all of the constituent artifacts in a single batch transaction.
Attachments
checkIndexes.py:
Last updated