samtools/samtools — pull request #19 by peterjc (2012-10-25 16:18:53+00:00)
Title: Set unmapped RNAME & POS to those of mapped mate in 'samtools fixmate'

The SAM/BAM specification recommended practice section says:

"For a unmapped paired-end or mate-pair read whose mate is mapped,
the unmapped read should have RNAME and POS identical to its mate."

This is to ensure if the SAM/BAM file is coordindate sorted that
the unmapped read is co-located in the file next to its mapped
partner. See also the 'unmapped but placed' counts in the BAI file
shown by 'samtools idxstats'.

To do this the old shortcut which wrote unmapped reads out unchanged
had to be removed.

P.S. This also fixes the indendation of a block of code (spaces
not tabs).