samtools/samtools — pull request #177 by earonesty (2014-03-18 18:38:39+00:00)
Title: add -U FILE to output unselected reads for pipelin

Many times, when designing pipelines, it's desirable to select some reads, say, unaligned or flagged reads, and process them one way, while taking other reads and processing them another. By adding the -U option, it's possible to do this in "one pass". With sam/bam files growing seemingly exponentially, the ability to process in "one pass" is desirable. The best possible way to do this would be using a hook/api system during the reading of the binary file. Barring that, using FIFO's and streaming results is what we've been doing.