// Check the barcode files themselves
final File[] barcodeFiles = IOUtil.getFilesMatchingRegexp(basecallsDir, "s_" + lane + "_\\d{4}_barcode.txt");
Arrays.sort(barcodeFiles);
final BasicInputParser barcodeParser = new BasicInputParser(true, barcodeFiles);
// Exact match
String[] illuminaFields = barcodeParser.next();
Assert.assertEquals(illuminaFields[1], "Y");
Assert.assertEquals(illuminaFields[2], "CAACTCTC");
// Inexact match
illuminaFields = barcodeParser.next();
Assert.assertEquals(illuminaFields[1], "Y");
Assert.assertEquals(illuminaFields[2], "ACAGGTAT");
// Too many mismatches
illuminaFields = barcodeParser.next();
Assert.assertEquals(illuminaFields[1], "N");
barcodeParser.close();
// Tack on test of barcode-informed Illumina Basecall parsing
final ReadStructure rs = new ReadStructure("25T8B25T");
final IlluminaDataProviderFactory factory = new IlluminaDataProviderFactory(basecallsDir, lane, rs,
new BclQualityEvaluationStrategy(BclQualityEvaluationStrategy.ILLUMINA_ALLEGED_MINIMUM_QUALITY),