if (WRITE_READS_FILES) writeReadsFile(INPUT);
switch (FILTER) {
case includeAligned:
filterReads(new FilteringIterator(new SAMFileReader(INPUT).iterator(),
new AlignedFilter(true), true));
break;
case excludeAligned:
filterReads(new FilteringIterator(new SAMFileReader(INPUT).iterator(),
new AlignedFilter(false), true));
break;
case includeReadList:
filterReads(new FilteringIterator(new SAMFileReader(INPUT).iterator(),
new ReadNameFilter(READ_LIST_FILE, true)));
break;