"Input bam file must be sorted by coordinates");
}
File indexFile = new File(params.inputFile.getAbsolutePath()
+ ".bai");
BAMIndexer indexer = new BAMIndexer(indexFile,
reader.getFileHeader());
for (SAMRecord record : reader) {
indexer.processAlignment(record);
}
indexer.finish();
reader.close();
}
}