int incorrectVariantCount = 0;
final CloseableIterator<VariantContext> iterator = fileReader.iterator();
while (iterator.hasNext()) {
final VariantContext context = iterator.next();
if (context.isIndel()) indelWriter.add(context);
else if (context.isSNP()) snpWriter.add(context);
else {
if (STRICT) throw new IllegalStateException("Found a record with type " + context.getType().name());
else incorrectVariantCount++;
}
progress.record(context.getChr(), context.getStart());
}
if (incorrectVariantCount > 0) {
log.debug("Found " + incorrectVariantCount + " records that didn't match SNP or INDEL");
}