Oof I guess my third example isn't practical. But, thank you! Especially if the max allowed is 2, then I can see in the case w/ --barcode-mismatches 2, it would be poor planning to have two indices that combined are only different by 4 mismatches.
EDIT
After reviewing more runs, I think the rule is this - mismatches in the i5 are only considered if the i7 is ambiguous, however, each is considered separately. Take the example below, which didn't throw a barcode error. There are two samples in the same lane with i7 indices (index), GCGGTATT & CCGGAATT, that only have two mismatches. This seems to satisfy the rule for the error - NUM MISMATCHES < (ALLOWED_BARCODE_MISMATCH * 2) + 1. However, an error wasn't thrown. I believe this is because the i5 indices, GGTAACAA and ACCGAATG, have 7 mismatches, which is well above the threshold. This is different from the cases in the original posting where the collision errors were thrown when the i5 index was also ambiguous.
Does this make sense?
SampleSheet
index,index2
GCGGTATT,GGTAACAA
CCGGAATT,ACCGAATG
Command
bcl2fastq \
--runfolder-dir PATH/TO/RUN \
--sample-sheet PATH/TO/SAMPLESHEET \
--output-dir . \
--barcode-mismatches 1
Result
No collision error