# Installation

The Illumina MiSeqDx Integration Package v1.11.0 supports MiSeqDx instruments running in Diagnostic mode. For MiSeqDx instruments running in Research mode, install the MiSeq Integration Package. For more information, refer to [MiSeq Integration v8.3.0 Installation](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseq/miseq-v8.3.0/miseq-v8.3.0-installation).

## Compatibility

MiSeqDx Integration v1.11.0 is compatible with the following software:

* Clarity LIMS v6.2 and later
* Secret Util v1.0 and later
* IPP v2.6 and later

## Prerequisites

MiSeqDx Integration v1.11.0 has the following prerequisites.

<details>

<summary>Prerequisite 1: Mount Run Data NAS Share</summary>

Mounting the NAS share of run data are needed to capture and generate files associated with the sequencing run. To mount NAS shares that contain data from the Clarity LIMS server, use Read/Write privileges as the glsjboss user. The following data can be mounted to the NAS share:

* Run data (e.g., \\\network-storage\run\_data)
* Clarity LIMS-created events triggered by the End Run event of the Illumina sequencing run (e.g., \\\network-storage\illumina\gls\_events)

With Read access, the Clarity LIMS server reads the following information in individual sequencing run data folders:

* Run information metadata from these files

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/RunInfo.xml
  </code></pre>

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/RunParameters.xml
  </code></pre>
* Run statistics from

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/InterOp/*.bin
  </code></pre>
* Text and VCF files from the Alignment folder at

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/Data/Intensities/BaseCalls/Alignment&#x3C;#>/*.vcf
  </code></pre>

  > ℹ CFTR-specific files with the extension cftr.vcf are ignored.

The Clarity LIMS server generates the following files and information locally and stores them in Clarity LIMS:

* Sample sheet (CSV file, e.g., SampleSheet.csv)
* Run report (PDF file, e.g., runreport.pdf)
* Run folder root link

The Clarity LIMS server copies and stores the following files from individual sequencing run data folders in Clarity LIMS:

* Applicable to all protocols:

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/RunInfo.xml
  </code></pre>

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/RunParameters.xml
  </code></pre>

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/first_base_report.htm
  </code></pre>

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;runFolderRoot>/Data/Intensities/BaseCalls/Alignment&#x3C;#>/*.vcf
  </code></pre>
* Additional file for CF 139-Variant assay:

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">MiSeqDxCF139VariantAssay.txt
  </code></pre>
* Additional file for CF Clinical Sequencing assay:

  <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">MiSeqDxCFClinicalSequencingAssay.txt
  </code></pre>

</details>

## Installation

MiSeqDx Integration v1.11.0 supports both on-premise and cloud integrations. This integration is distributed as the following RPM packages:

* *BaseSpaceLIMS-miseqdx-extensions*
* *BaseSpaceLIMS-miseqdx-sequencing-service*

The *BaseSpaceLIMS-miseqdx-extensions* RPM installs the following items:

* Protocols and workflows
* Integration properties that configure the service
* Placement pattern files that determine reagent index assignment
* *miseqdx-extensions.jar*
* *miseqdx-sequencing-report.jar*

The *BaseSpaceLIMS-miseqdx-sequencing-service* RPM installs the following items:

* If not found, user configuration (the glsjboss user and the glsjdk8 and claritylims user groups)
* If not installed, Java 8
* Bash scripts to run the *miseqdx\_seqservice*
* *miseqdx-sequencing.jar*
* The *gls\_events\_mos\_rta.bat* batch file that configures RTA
* Smoke test directories

### On-Premise Installation

Use the following instructions to install the BaseSpaceLIMS-miseqdx-extensions and BaseSpaceLIMS-miseqdx-sequencing-service RPMs on the Clarity LIMS server.

<details>

<summary>Install the RPMs</summary>

1. On the Clarity LIMS server, log in as the root user.
2. Run the following yum commands to install the RPMs:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">yum install BaseSpaceLIMS-miseqdx-extensions
   yum install BaseSpaceLIMS-miseqdx-sequencing-service
   </code></pre>
3. Enter *y* to confirm that you want to proceed with the RPM installations. After confirmation, the following scripts and files are installed:

   * *configure\_extensions\_miseqdx\_workflow\.sh*
   * *configure\_extensions\_miseqdx\_sequencingservice.sh*
   * *miseqdx-extensions.jar* (contains the sample sheet generation and other scripts)
   * *miseqdx-sequencing-report.jar* (generates the sequencing run report)

   These files are installed at the following locations:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/config/
   </code></pre>

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/extensions/miseqdx
   </code></pre>

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/extensions/miseqdx/SequencingService
   </code></pre>

</details>

<details>

<summary>Import Workflow Configurations for MiSeqDx</summary>

ℹ If you are upgrading from an earlier version of the MiSeqDx integration package and the system is configured with the *configure\_extensions\_miseqdx\_workflow\.sh* and *configure\_extensions\_miseqdx\_sequencingservice.sh* scripts, refer to [Installed Components](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0-configuration#installed-components).

1. When prompted by the RPM instructions to import the workflow configuration, run the following command as the glsjboss user:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">bash /opt/gls/clarity/config/configure_extensions_miseqdx_workflow.sh
   </code></pre>
2. When prompted by the RPM instructions to configure the sequencing service (which includes properties with default values set for the integration), run the following command as the glsjboss user:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">bash /opt/gls/clarity/config/configure_extensions_miseqdx_sequencingservice.sh
   </code></pre>

</details>

<details>

<summary>Configure the Integration Properties</summary>

For more information on the configurable integration properties, refer to [Integration Properties Details](https://help.connected.illumina.com/clarity-lims/integration-properties-update/integration-properties-details#miseq-dx-v1110-and-onwards).

</details>

<details>

<summary>Start the Sequencing Service</summary>

Run the following command to start the sequencing service:

{% code overflow="wrap" %}

```markup
systemctl start miseq_seqservice-v8
```

{% endcode %}

</details>

### Cloud Installation

The *BaseSpaceLIMS-miseqdx-extensions* RPM must be installed on the Clarity LIMS server. The *BaseSpaceLIMS-miseqdx-sequencing-service* RPM can be installed remotely on another server within the network.

<details>

<summary>Specifications</summary>

The following hardware, operating system, and network specifications must be met to install the *BaseSpaceLIMS-miseqdx-sequencing-service* RPM:

* Hardware requirements:
  * 64-bit processor (dual core 2.0 GHz)
  * OS requirements, plus at least an additional 512 MB RAM
  * A minimum of 5 GB of hard disk space
* Operating system requirements:
  * Oracle Linux (for compatibility, refer to [MiSeqDx Integration v1.11.0 Release Notes](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0/miseqdx-v1.11.0-release-notes))
* Network requirements:
  * SSL access to the Clarity LIMS server from the network
  * A mounted network folder where the sequencing runs are written

</details>

<details>

<summary>Install the RPM</summary>

1. On the applicable server, log in as the root user.
2. Run the following yum command to install the RPM:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">yum install BaseSpaceLIMS-miseqdx-extensions
   </code></pre>
3. Enter *y* to confirm that you want to proceed with the RPM installations. After confirmation, the following scripts and files are installed:

   * *configure\_extensions\_miseqdx\_workflow\.sh*
   * *configure\_extensions\_miseqdx\_sequencingservice.sh*
   * *miseqdx-extensions.jar* (contains the sample sheet generation and other scripts)
   * *miseqdx-sequencing-report.jar* (generates the sequencing run report)

   These files are installed at the following locations:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/config/
   </code></pre>

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/extensions/miseqdx
   </code></pre>

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/extensions/miseqdx/SequencingService
   </code></pre>

</details>

<details>

<summary>Import Workflow Configurations for MiSeqDx</summary>

ℹ If you are upgrading from an earlier version of the MiSeqDx integration package and the system is configured with the *configure\_extensions\_miseqdx\_workflow\.sh* and *configure\_extensions\_miseqdx\_sequencingservice.sh* scripts, refer to [Installed Components](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0-configuration#installed-components).

1. When prompted by the RPM instructions to import the workflow configuration, run the following command as the glsjboss user:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">bash /opt/gls/clarity/config/configure_extensions_miseqdx_workflow.sh
   </code></pre>
2. When prompted by the RPM instructions to configure the sequencing service (which includes properties with default values set for the integration), run the following command as the glsjboss user:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">bash /opt/gls/clarity/config/configure_extensions_miseqdx_sequencingservice.sh
   </code></pre>

</details>

<details>

<summary>Configure the Integration Properties</summary>

For more information on the properties that must be configured, refer to [Integration Properties Details](https://help.connected.illumina.com/clarity-lims/integration-properties-update/integration-properties-details#miseq-dx-v1110-and-onwards).

</details>

<details>

<summary>Install Sequencing Service RPM on Remote Server</summary>

1. On the applicable server, log in as the root user.
2. Run the following yum command to install the RPM:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">yum install BaseSpaceLIMS-miseqdx-sequencing-service
   </code></pre>
3. Enter *y* to confirm that you want to proceed with the RPM installation.

</details>

<details>

<summary>Copy API Connection Properties File from the Clarity LIMS Server to the Remote Server</summary>

1. Make sure that the extensions RPM is installed on the Clarity LIMS server.
2. Run the following command to generate the integration.properties API connection properties file:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">java -jar /opt/gls/clarity/extensions/miseqdx/miseqdx-extensions.jar script:com.genologics.integrations.sequencing.generate_integration_property_file
   </code></pre>
3. Copy the integrations.properties file from the Clarity LIMS server to the following location on the remote server:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">/opt/gls/clarity/extensions/miseqdx/SequencingService/conf
   </code></pre>

</details>

<details>

<summary>Start the Sequencing Service</summary>

Run the following command to start the sequencing service:

{% code overflow="wrap" %}

```markup
systemctl start miseq_seqservice
```

{% endcode %}

</details>

## Workflows, Protocols, and Steps Installed

MiSeqDx Integration v1.11.0 installs the following protocols:

* CF 139-Variant Assay Library Prep 1.2
* CF Clinical Sequencing Assay Library Prep 1.2
* Illumina SBS MiSeqDx (CF 139-Variant Assay) 1.2
* Illumina SBS MiSeqDx (CF Clinical Sequencing Assay) 1.2

The integrations also install the following validation protocols that are included in a workflow with the same name:

* MiSeqDx Validation (CF 139-Variant Assay) 1.2
* MiSeqDx Validation (CF Clinical Sequencing Assay) 1.2

For descriptions of the protocol and the steps, refer to [MiSeqDx Integration v1.11.0 Configuration](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0/miseqdx-v1.11.0-configuration). For instructions on user interaction for each step and using the MiSeqDx validation workflows to validate the automated sample sheet generation, refer to [MiSeqDx Integration v1.11.0 User Interaction, Validation and Troubleshooting](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0/miseqdx-v1.11.0-user-interaction-validation-and-troubleshooting).

## Instrument Software

The instrument software is divided into the following modules:

* **MiSeqDx Operating Software (MOS)** — Controls the instrument operation, including various configuration settings. This software is installed and runs on the instrument.
* **MiSeqDx Reporting Software (MRS)** — Performs the following secondary analysis functions:

  * Demultiplexing
  * Alignment
  * Variant calling
  * Report generation

  The specific functions that are supported vary by the kit. This software is installed on or off the instrument.
* **Real-Time Analysis (RTA)** — Performs image processing and base calling (primary analysis). The software makes sure that data files are created and copied to the final destination folder and is installed and runs on the instrument.
* **Illumina User Management (IUM)** — Contains a user database file that is used with the MiSeqDx instrument. This file controls user passwords and privileges for MOS.

For more information on the MiSeqDx software, refer to the MiSeqDx documentation at [support.illumina.com](https://support.illumina.com/).

## Instrument Integration

Illumina provides a supported mechanism for using custom scripts on key events during a sequencing run. The Clarity LIMS support team has created batch files that plugs into these events. When the batch file is used, it reads the event information and writes it in a TXT event file at the same network share location that the instrument uses to write the run data. Another process running on the server where the sequencing service RPM is installed receives the event files and takes the appropriate actions.

The sequencing service monitors the following events (the actual event names may be different):

* **End Run** — This event is used to update the sequencing steps in Clarity LIMS, captures key process data and files, and parses run statistics for output custom fields.
* **Begin Secondary Analysis** — Indicates that secondary analysis in the MRS has started so that the sequencing service can start to monitor for results. After secondary analysis is complete, the VCF files are uploaded to Clarity LIMS.

<details>

<summary>Configure Batch Files</summary>

When the instrument is running, the final destination for the run data are a network storage path. The software is configured with a network storage path root (e.g., \\\network-storage\illumina). Each sequencing run generates a unique run ID, which is appended to create a unique data run directory (e.g., \\\network-storage\illumina\110419\_InstrumentName\_0001\_ARG1234567).

The Clarity LIMS batch files must be configured to write to a directory within the network storage path root. This directory is typically named gls\_events, but the directory name can be different as long as no spaces are used.

To avoid inadvertently removing or overwriting the batch file when updating the instrument software, the batch file can be placed in its own directory on the instrument computer.

Before configuring the batch files, do the following:

1. Back up the *MiSeq.Configuration.xml* configuration file to

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">C:\Illumina\RTA\Configs\
   </code></pre>
2. Make sure that the instrument is idle.
3. Shut down MOS.
4. Set up the directory structure as follows.
   1. Create a directory (C:\Illumina\gls is recommended) on the local PC to hold the batch file.

      > ⚠ For Windows 10, the folder must be under C:\Illumina instead of C:\Illumina\gls because of Windows software restriction policies. If the folder is not in that directory, the batch script does not run. For versions before Windows 10, C:\Illumina\gls is acceptable.
   2. Create a directory (e.g., gls\_events) on the NAS to hold the event files.

**Configure the batch file as follows**

1. Determine the site or instrument specific network storage path root.
2. Change the DESTINATION\_PATH line to use the storage path root and the name of the event file directory.

   > ℹ Make sure to include the trailing \ in the DESTINATION\_PATH line. Refer to the following example:
   >
   > <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">set DESTINATION_PATH=\\network-storage\illumina\gls_events\
   > </code></pre>
3. Copy the DESTINATION\_PATH and paste it into the Windows Explorer address bar.
4. Make sure that the network location is accessible and that it opens from the instrument.

**Deploy the batch file as follows**

1. On the server where the sequencing service RPM is installed, copy the batch file from /opt/gls/clarity/extensions/miseqdx/InstrumentIntegrations to C:\Illumina\gls on the local computer.
2. If necessary, create the *gls\_events\_mos\_rta.bat* batch file in C:\Illumina\gls. For more information, contact Illumina Support.
3. From the command prompt, list the contents on the C:\Illumina\gls directory using the following command:

   <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">dir C:\Illumina\gls\
   </code></pre>

   Make sure that the name of the batch file you created does not contain any special (hidden) characters.

</details>

<details>

<summary>Configure RTA</summary>

Update the MOS configuration files as follows.

1. Turn off the instrument and restart the instrument computer.
2. Using Task Manager, make sure that MOS is not auto-launched by Windows.
3. \[Optional] If MOS is auto-launched, remove it from the auto-launch list and restart the computer.
4. Edit the file to connect to the RTA End Run event as follows.
   1. Open the *MiSeq.Configuration.xml* file at

      <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">C:\Illumina\RTA\Configs\
      </code></pre>
   2. Update the following content within the \<RTAConfiguration> tags:

      <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">&#x3C;ProcessCompleteEventFile>C:\Illumina\gls\gls_event_mos_rta.bat&#x3C;/ProcessCompleteEventFile>
      </code></pre>
5. Save and close the edited file.
6. Validate the file as follows.
   1. Open *MiSeq.Configuration.xml* configuration file in Explorer to perform some of the XML validation.
   2. To further validate the file, run the following command from the Command Prompt:

      <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">C:\Illumina\RTA\RTA.exe "." configFile="C:\Illumina\RTA\Configs\MiSeq.Configuration.xml"
      Processing.WorkProviderTypes="OfflineBased" processedfolder="."
      </code></pre>

      If the validation is successful, the following message displays:

      <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">Error: No run info file found in input directory .\RunInfo.xml
      </code></pre>

      If the configuration files contain an error, the command returns specifics about the problem. The following example shows an error that occurs when a \<GLS> key is added to the file at line 83:

      <pre class="language-markup" data-overflow="wrap"><code class="lang-markup">Error: While loading Configuration "c:\illumina\rta\configs\MiSeq.Configuration.xml"
      There is an error in XML document &#x3C;83, 5>
      Error loading xml file: Unknown node 'GLS' at line 83 pos 5
      </code></pre>
7. Start MOS.
8. Open the *MiSeq.Configuration.xml* file and make sure that the changes were saved.

</details>

## Validation

<details>

<summary>Sample Sheet Generation</summary>

For instructions on how to validate the automated sample sheet generation, refer to [MiSeqDx Integration v1.11.0 User Interaction, Validation and Troubleshooting](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0/miseqdx-v1.11.0-user-interaction-validation-and-troubleshooting).

</details>

<details>

<summary>Manual Invocation of Event Files</summary>

For instructions on validating the creation of event files, refer to [MiSeqDx Integration v1.11.0 User Interaction, Validation and Troubleshooting](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0/miseqdx-v1.11.0-user-interaction-validation-and-troubleshooting).

</details>

<details>

<summary>Instrument Sequencing Run</summary>

The instrument sequencing run test validates that the Clarity LIMS batch file is connected properly and invoked on the instrument events. Before validating the batch file, make sure that you have the following prerequisites are met:

* You have access to the NAS share.
* The default configuration has been successfully imported.
* Manual invocation of the event files has been validated. This validation checks for the following information:
  * The DESTINATION\_PATH is configured correctly.
  * The instrument computer can access and write to the DESTINATION\_PATH.
  * There are no syntax errors in the Clarity LIMS batch file.

For more information on event file validation, refer to [MiSeqDx Integration v1.11.0 User Interaction, Validation and Troubleshooting](https://help.connected.illumina.com/clarity-lims/instruments-and-integrations/miseqdx/miseqdx-v1.11.0/miseqdx-v1.11.0-user-interaction-validation-and-troubleshooting).

The sequencing service processes and archives event files, which can cause validation issues while the service is running. You can make the following changes to avoid losing the event files that you are attempting to validate:

* Modify the FINAL\_EXTENSION value in the Clarity LIMS batch file so that the file extension is .test instead of .txt. The service only processes and archives TXT files. Make sure that you change FINAL\_EXTENSION back to .txt after manual validation.
* Monitor the \*MiSeqDxIntegrator.log\_ file, which logs the file name and contents of each event file that is processed.

**Validate the sequencing run as follows**

1. During the run, monitor the contents of the gls\_events directory.
2. After the run is completed and the RTA completes primary analysis, make sure that a final EndRun event displays (e.g., event-EndRun-11043279.txt).

</details>
