# Illumina LIMS Integration

This combination of configuration and python script can be used to set up an integration between **Clarity LIMS** and **Illumina LIMS**. There are 2 main parts to this integration:

1. Generating a sample manifest from **Clarity LIMS** to import the samples into **Illumina LIMS**.
2. Once the analysis is completed, automatically parsing in the results from **Illumina LIMS** into **Clarity LIMS.**

**Disclaimer:** This application example is provided as is, with the assumption that anyone deploying this to their LIMS server will own the testing and customization of the configuration and scripts provided.

### **Installation**

#### **Protocol and Workflow Import**

Using the config-slicer tool import the configuration file attached (\[IlluminaLIMSIntegration.xml]) as the glsjboss user with the following command:

java -jar /opt/gls/clarity/tools/config-slicer/config-slicer-3.\<x>.jar -o import -k IlluminaLIMSIntegration.xml -u \<user> -p \<password> -a https\://\<hostname>/api

#### **Script and Configuration Setup**

1. As the glsjboss user on the **Basespace Clarity LIMS** server, copy the Illumina LIMS manifest template file (IlluminaLIMS\_Manifest\_Template.csv) attached below to the following folder: */opt/gls/clarity/customextensions/IlluminaLIMS*
2. On the **Illumina LIMS** Windows/Linux workstation create a folder called Clarity\_gtc\_Parser and do the following :
   * Copy the clarity\_gtc\_parser\_v2.py file into this folder and update the following configuration parameters:\\

     | Parameter                                       | Description                                 |
     | ----------------------------------------------- | ------------------------------------------- |
     | USERNAME = \<APIUSERNAME>                       | Clarity user with API access                |
     | PASSWORD = \<APIPASSWORD>                       | Password for that user                      |
     | uri = 'https\://\<DEMAINNAME>/api/v2/artifacts' | URI to the artifact API endpoint on Clarity |
     | path = '/\<PATH>/IlluminaLIMS/gtc\_folder\_v3/' | Path to gtc files                           |
     | gtcVersion = 3                                  | gtcfile version                             |

     \
     **NOTE** This script supports the current LIMS gtc version, 3, and will be compatible with version 5 when available.

     * Download and copy the IlluminaBeadArrayFiles.py to the same folder (Also Available [here](https://github.com/Illumina/BeadArrayFiles)). Edit the file with variables: API, gtc file path and username/password for clarity API for the relevant server.
     * Create an empty file called processed\_gtc.txt in the gtc files directory.
     * Setup a [scheduled task](https://technet.microsoft.com/en-us/library/cc748993\(v=ws.11\).aspx)(windows) or [cronjob](https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-autotasks.html)(linux) to run this python script every 10 minutes. (Assuming Python (version 2.7.1) is installed and available on the workstation).

### **Workflow**

The configuration attached to this page contains an example protocol with two Steps.

#### **Prerequisites:**

Samples have been accessioned into **Clarity LIMS** with the following sample metadata as Submitted Sample UDFs:

* *Is Control*
* *Institute Sample Label*
* *Species, Sex*
* *Comments*
* *Volume (ul)*
* *Conc (ng/ul)*
* *Extraction Method*
* *Parent 1*
* *Parent 2*
* *Replicate(s)*
* *WGA Method (if Applicable)*
* *Mass of DNA used in*
* *WGA*
* *Tissue Source*

#### **Protocol Step: IlluminaLIMS Sample Prep**

This manual step is meant to be merged into the last step of a Sample Prep Protocol. It has the configuration to generate a Derived Sample with the LIMSID in the name so that the name can be unique, and used to match data back using the data parser to the next step.

#### **Protocol Step: IlluminaLIMS Manifest and Analysis**

This requires the user to perform the following steps:

1. Generate the Illumina LIMS Manifest using the button provided called "Generate Illumina LIMS Manifest".
2. Download the manifest and import this to IlluminaLIMS Project Manager under the correct institution.
3. Run the appropriate lab workflow on Illumina LIMS
4. After the Illumina LIMS analysis is complete, allow 10minutes and come back to Clarity LIMS to find the step in progress and ensure the following derived sample UDFs are populated:
   * *Autocall Version*
   * *Call Rate, Cluster File*
   * *GC 10*
   * *GC 50*
   * *Gender*
   * *Imaging Date*
   * *LogR dev*
   * *Number of Calls*
   * *Number of No Calls*
   * *SNP Manifest*
   * *Sample Plate*
   * *Sample Well, 50th Percentiles in X*
   * *50th Percentiles in Y*
   * *5th Percentiles in X*
   * *5th Percentiles in Y*
   * *95th Percentiles in X*
   * *95th Percentiles in Y*
   * *Number of Calls Number of Intensity Only Calls*
   * *Number of No Calls*

### Attachments

IlluminaBeadArrayFiles.py:

{% file src="<https://2084401275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfjuebS41N49G1Eh55hP7%2Fuploads%2Fgit-blob-46b965b7c688545257b635bbd0c4b1a45eb7c5e2%2FIlluminaBeadArrayFiles.py?alt=media&token=45bfa215-f3b3-48d4-8717-0c6c2b9e849d>" %}

IlluminaLIMSIntegration.xml:

{% file src="<https://2084401275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfjuebS41N49G1Eh55hP7%2Fuploads%2Fgit-blob-977beff31bdb59247f5d8721922b96aa83508d8b%2FIlluminaLIMSIntegration.xml?alt=media&token=685bb57b-abcf-4e88-bdaa-289b26381c74>" %}

IlluminaLIMS\_Manifest\_Template.csv:

{% file src="<https://2084401275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfjuebS41N49G1Eh55hP7%2Fuploads%2Fgit-blob-064cae8e74ed86413c0bb6e786cfc89cacaacfb0%2FIlluminaLIMS_Manifest_Template.csv?alt=media&token=9cf0e72a-3cb7-49e9-ac71-28a11f0c9e4c>" %}

clarity\_gtc\_parser\_v2.py:

{% file src="<https://2084401275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfjuebS41N49G1Eh55hP7%2Fuploads%2Fgit-blob-3e127a8c2b97bb011765ff884203de9a1383a294%2Fclarity_gtc_parser_v2.py?alt=media&token=99551056-b07f-4f8c-8568-9a82fd7d306c>" %}
