samtools/samtools — pull request #14 by peterjc (2012-08-17 11:15:14+00:00)
Title: Update MPOS/PNEXT during 'samtools depad'

This branch extends 'samtools depad' to update the mate positions (field MPOS aka PNEXT). This currently requires the user to provide a FASTA reference file (via the -T argument). Without this work you'd have to run a mate-fixing script to clean up any paired-end data processed using 'samtools depad'.

There is scope for optimising the runtime at the expense of higher memory usage by holding another mapping array in memory. If need be a more memory efficient structure for the mapping array could be used (rather than simply storing one integer for each base of the reference).