samtools/samtools — pull request #201 by peterjc (2014-04-15 11:00:47+00:00)
Title: Handle CIGAR N in samtools depad by treating as CIGAR D

The SAM specification on GitHub currently has a CIGAR N operator in the example SAM file using a padded reference, so it would be nice if ``samtools depad`` could handle this as an input. However, the current implementation only prints an error to stderr. From memory it used to abort on unsupported CIGAR operators via the assert statement, but right now it continues yet doesn't handle these reads properly.

Treating any CIGAR N as a CIGAR D would be a partial solution, as implemented in this pull request.

Note that padded SAM/BAM files are expected to be generated from de novo genome assemblies, and so CIGAR N operators are not expected to occur (since they are used primarily for mapping spliced transcripts to a reference using the N for any intron jump).