Index collisions and minimum Hamming distance per index read, version 1.0.1
ngs-index-collisions@1.0.1: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.
What this page can and cannot show
Level: Checked against a reference; rapidfuzz 3.14.6 Hamming distances; BCL Convert's 2n + 1 condition used as a screen; not a demultiplexing prediction. Reference kind: an outside program, rapidfuzz, 3.14.6; our own exact-arithmetic script and a hand-worked case.
Checked by this project, not independently reviewed. Every method on this page has its equations, constants, sources and cases on record, and its cases agree with the stated reference within the stated tolerance. A reader can follow each method's worked example by hand; that shows the stated method gives the stated answer for one set of inputs, and does not test the code. The other cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed them.
Every version of this method · Every method · What the levels mean
Version 1.0.1
Level: Checked against a reference; rapidfuzz 3.14.6 Hamming distances; BCL Convert's 2n + 1 condition used as a screen; not a demultiplexing prediction. Reference kind: an outside program, rapidfuzz, 3.14.6; our own exact-arithmetic script and a hand-worked case. ngs-index-collisions@1.0.1
Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.
Verification statement: Hamming distance, the standard count of differing positions. d ≥ 2n + 1 as BCL Convert states it for index-hopping counts (Metrics Output, re-read 14 November 2026); its use as a collision screen, disjointness and floor((d − 1)/2) are Drybench's derivations. Compared with rapidfuzz 3.14.6 and with a second implementation in Python by a separate agent of the same model family (46 cases, 20 at the edges). Exact counting. Not a prediction of demultiplexing.
Hamming distance between every pair of distinct sequences in each index read; meets or fails d >= 2n + 1 at the stated tolerance n; the largest tolerance meeting it, floor((dmin - 1)/2); each sample's index combination unique.
- How results are reported: none: integers, exact
- Uncertainty: Exact counting.
- Reference, as its record states it: rapidfuzz 3.14.6 Hamming distances
- Level confirmed by this project's ruling of 14 November 2026
What this page can and cannot show
What was checked
72 cases in 2 files, linked by this exact version.
Run through the tool at build against an outside program, rapidfuzz, 3.14.6; our own exact-arithmetic script and a hand-worked case: 49 agree within the tolerance the file states, 23 refuse as the case expects, 0 differ, 0 were not run.
File 1, 26 cases
- Where the expected values came from: an outside program, rapidfuzz 3.14.6
- Recorded on: 2026-11-10
- Reference: rapidfuzz, 3.14.6; licence MIT
- Tolerance as the file states it: exact: distances, counts, flags, sequences, names, withheld rules, statuses and codes
File 2, 46 cases
- Where the expected values came from: our own exact-arithmetic script and a hand-worked case
- Recorded on: 2026-11-14
- Reference: second implementation (Python 3.13, standard library), 2026-11-14; licence PSF-2.0
- Tolerance as the file states it: exact: distances, counts, flags, sequences, names, withheld rules, statuses and codes
Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.
What was not checked
Insertions and deletions, index hopping, phasing and colour balance (gated); the vendor software's own behaviour; orientation (assumed consistent across entries).
Definition or model
A closed form: the result follows from the inputs by the equations alone.
Equations
Equation 1
d(a, b) = number of positions where a and b differ (equal lengths): Hamming distance, the standard definition
Knowledge Article #2326 is cited for this mismatch count, which it describes as the distance between bases without naming it Hamming
| Symbol | Meaning and unit |
|---|---|
| a, b | two distinct index sequences of one read |
Source: Illumina Knowledge Article #2326, How to troubleshoot barcode collision error when running bcl2fastq2, section barcode collision: the mismatch count between indexes, described as the distance between bases, and the mismatch setting, the live knowledge-base page (Markdown), retrieved 11 November 2026 (no revision shown); read in full on 2026-11-11 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 0c2b23cb81f9. Free to read (© Illumina, Inc.; terms not stated on the page (held for the General Counsel)), checked 2026-11-11. No erratum found (searched the knowledge-base page as retrieved (no revision history published)), 2026-11-11.
Equation 2
meets if d_min >= 2n + 1, the condition BCL Convert states for index-hopping counts
its use as a general collision screen, the argument that the sets of sequences within n mismatches of each index are disjoint exactly when every pair is at least 2n + 1 apart, and the largest tolerance meeting it, floor((d_min - 1)/2), are Drybench's derivations
a collision is a pair of distinct sequences with d < 2n + 1, listed with the alphabetically earlier sequence as A
each index read on its own
| Symbol | Meaning and unit |
|---|---|
| n | mismatch tolerance stated by the caller |
| d_min | minimum pairwise distance |
Source: Illumina BCL Convert documentation, Metrics Output, section Index Hopping Counts: each pair of entries within each index at least 2n+1 apart, the live documentation page, retrieved 11 November 2026; read in full on 2026-11-11 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 10b1d022fe4c. Free to read (© Illumina, Inc.; terms not stated on the page (held for the General Counsel)), checked 2026-11-11. No erratum found (searched the documentation page as retrieved), 2026-11-11.
Constants
Constants: none used.
Worked example
Worked example: one case of ngs-index-collisions@1.0.1, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.
Inputs
- indexes[0].name = S1
- indexes[0].index1 = AAGGTTCC
- indexes[1].name = S2
- indexes[1].index1 = TTCCAAGG
- indexes[2].name = S3
- indexes[2].index1 = GCGCATAT
- indexes[3].name = S4
- indexes[3].index1 = AAGGTTCA
- index1MismatchTolerance = 1
Steps
- dmin = 1, from indexes[0].index1, indexes[3].index1; by equation 1; gives result.index1.minimumDistance.
- req = 3, from index1MismatchTolerance; by equation 2; gives result.index1.requiredDistance.
The working, as the case writes it:
per index read: distinct sequences, every pair's Hamming distance, the minimum, and floor((dmin - 1)/2)
Answer
result.index1.minimumDistance= 1result.index1.requiredDistance= 3
Where these values came from: an outside program, rapidfuzz 3.14.6; rapidfuzz 3.14.6 Hamming.distance on every pair of distinct sequences in each index read; the rule d >= 2n + 1 (radius-n balls disjoint; the condition BCL Convert documents).
At build the tool returned this answer within the tolerance the file states: exact: distances, counts, flags, sequences, names, withheld rules, statuses and codes.
Who worked this case: not recorded.
What it refuses, and its input ranges
DUPLICATE_INDEX_COMBINATION: two samples carry the same index combination Next: Give each sample a distinct index combination.INDEX_LENGTHS_DIFFER: the sequences of one index read differ in length, where Hamming distance is undefined Next: Trim the index read to one length, as the sample sheet will be read, and check again.TOLERANCE_ABOVE_RANGE: a mismatch tolerance is above the vendor's maximum Next: State a tolerance of two or fewer mismatches.INDEX2_ON_SOME_ONLY: index 2 is given for some samples and not others Next: Give index 2 for every sample, or for none.
Input ranges: index1MismatchTolerance: at most 2; outside it, refused (TOLERANCE_ABOVE_RANGE). index2MismatchTolerance: at most 2; outside it, refused (TOLERANCE_ABOVE_RANGE).
Changes
No correction is logged for ngs-index-collisions@1.0.1.
Tools that use it
Cite this version
Index collisions and minimum Hamming distance per index read. Drybench; ngs-index-collisions@1.0.1; https://www.drybench.com/methods/m/ngs-index-collisions/1.0.1 (accessed [date]).