Invoking bcl2fastq from BCL Conversion and Demultiplexing Step

Illumina sequencing protocols include a BCL Conversion and Demultiplexing step. This stage allows you to select the command options for running bcl2fastq2. The bcl2fastq must be initiated through a command-line call on the BCL server.

This example allows you to initiate the bcl2fastq2 conversion software by the selection of a button in BaseSpace Clarity LIMS.

Step Configuration

The "out of the box" step is configured to include the following UDFs / custom fields. You can select these options on the Record Details screen. You can also configure additional custom options.

About the Code

The main method in the script is convertData(). This method performs several operations:

  1. The script determines the run folder. The link to the run folder is attached as a result file to the sequencing step.

    • The script searches for the appropriate sequencing step and downloads the result file containing the link.

    • The script changes directories into the run folder.

  2. The script gathers all the step level UDFs / custom fields from the BCL Conversion and Demultiplexing step.

  3. Using the information gathered, the script builds the command that is executed on the BCL server. The command consists of two parts: cd (changing directory) into the run folder.

    • Executing the bcl2fastq command with the selected options.

Script Configuration

This script must be copied to the BCL server because the script is executed on the BCL server remote Automated Informatics (AI) / Automation Worker (AW) node.

By default, the remote AI / AW node does not come with a custom extensions folder. Therefore, if this script is the first script on the server you can create a customextensions folder in /opt/gls/.

It is not recommended to have the customextensions folder in the remoteai folder as the remoteaifolder can get overwritten.

When uploading the script, ensure the following:

  • The path to the bcl2fastq application is correct (line 17)

  • The sequencing process type matches exactly the name of the process type / master step the artifact went through (the -d parameter)

  • The customextensions folder contains both glsapiutil.py and glsfileutil.py modules. See Assumptions and Notes.

Parameters

The script accepts the following parameters:

An example of the full syntax to invoke the script is as follows:

/usr/bin/python /opt/gls/customextensions/ kickoff_bcl2fastq2.py -u {username} -p {password} -s {stepURI:v2} -d 'Illumina Sequencing (Illumina SBS) 5.0'

Assumptions and Notes

  • You are running a version of Python supported by Clarity LIMS, as documented in the Clarity LIMS Technical Requirements.

  • The attached files are placed on the LIMS server, in the /opt/gls/clarity/customextensions folder.

  • The Python API Library (glsapiutil.py) is placed on the Clarity LIMS server, in the /opt/gls/clarity/customextensions folder. You can download the latest glsapiutil library from the GitHub page.

  • The example code is provided for illustrative purposes only. It does not contain sufficient exception handling for use 'as is' in a production environment.

Attachments

kickoff_bcl2fastq2.py:

glsfileutil.py:

Last updated