outputDir.deleteOnExit();
// Create barcode.params with output files in the temp directory
final File libraryParams = new File(outputDir, libraryParamsFile);
libraryParams.deleteOnExit();
final List<File> outputPrefixes = new ArrayList<File>();
final LineReader reader = new BufferedLineReader(new FileInputStream(new File(testDataDir, libraryParamsFile)));
final PrintWriter writer = new PrintWriter(libraryParams);
final String header = reader.readLine();
writer.println(header + "\tOUTPUT_PREFIX");
while (true) {
final String line = reader.readLine();
if (line == null) {
break;
}
final String[] fields = line.split("\t");
final File outputPrefix = new File(outputDir, StringUtil.join("", Arrays.copyOfRange(fields, 0, concatNColumnFields)));
outputPrefixes.add(outputPrefix);
writer.println(line + "\t" + outputPrefix);
}
writer.close();
reader.close();
runPicardCommandLine(new String[]{
"BASECALLS_DIR=" + baseCallsDir,
"LANE=" + lane,
"RUN_BARCODE=HiMom",