# How to troubleshoot barcode collision and not enough hamming distance errors when demultiplexing runs with BCL Convert and bcl2fastq2

**What is barcode collision?**

An index/barcode collision error occurs when the index sequences used in the sample sheet are not diverse enough to support the mismatch settings due to the hamming distance being too small and there being too much similarity between them, so if there are one or two mismatches in specific positions, those sequences become the same.

**Barcode Collision Example 1:** The two index sequences are distinct by 1 base pair. A single mismatch would result in barcode collision.

![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-637cf9fd4da6b3094c517fba5d640117aa49e130%2Fimage1.png?alt=media\&token=6c7a749b-fa66-4c94-9323-e63150e9ee36)

**Barcode Collison example 2:** The two index sequences are distinct by 2 base pairs. One mismatch would also result in barcode collision.

![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-36de828c3e04c49bbccaf8a5352a0dc41e73a32f%2Fimage2.png?alt=media\&token=bd6646e5-9cd8-47ba-b95f-579be7fa41e4)

**What is hamming distance?**

Hamming distance measures the minimum number of substitutions required to change one sequence into the other, or the minimum number of errors that could have transformed one string into the other.

**How to troubleshoot barcode collision error?**

If there is a barcode collision/hamming distance error, the number of barcode mismatch will need to be adjusted. The default setting is 1 barcode mismatch for bcl2fastq and BCL Convert, but this can be decreased to 0 (no mismatches allowed) or increased to a maximum of 2.

**-For BCL Convert:**

During Run Preparation (either in BaseSpace or in the Control Software Run Planning), select 0 in the dropdown menu (if no selection is made, the software will consider the default option of 1):

![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-ad7131e0789a4527256fae73ae8492f6e3d07937%2Fimage3.jpg?alt=media)

This will be shown in the sample sheet as:

![](https://761066130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM9W2DuBTgEXv1ClCm8H%2Fuploads%2Fgit-blob-cd97b706957f8a577bbd50f7306e1c3bfb846f1a%2Fimage4.jpg?alt=media)

**-For bcl2fastq2:**

Add the following to the command line:

`--barcode-mismatch 0`

**Note:** Barcode mismatches = # of differences allowed in the index sequence when assigning reads to samples

● An important distinction: This is not the number of bases different between indexes in the sample sheet

\
\
\ <br>

|                                                                                                                                                                                                                                                                                                                                                                 |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| *For any feedback or questions regarding this article (Illumina Knowledge Article #2326), contact Illumina Technical Support* [*techsupport@illumina.com*](mailto:techsupport@illumina.com?subject=Question%2FFeedback%20Regarding%20Illumina%20Knowledge%20Article%20#000002326%20-%20Software%20\&body=Dear%20Illumina%20Technical%20Support,%0D%0A%0D%0A)*.* |
