cole-trapnell-lab / cufflinks

Boost Software License 1.0
310 stars 116 forks source link

SAM parser doesn't filter all-insert alignments, leading to segfault #25

Closed ctrapnell closed 9 years ago

ctrapnell commented 9 years ago

From Chris Smowton:

Just debugged a segfault that resulted from a SAM file that alleged to be aligned (flags & 4 == 0), but which had the CIGAR string “76I”. That leads to a Scaffold with zero-length aug_ops, and a null pointer deref when you try Scaffold::left(). The record is nonsensical (what does it mean to have a coordinate but zero concurrence with the genome at that coordinate?) but found in the wild (TCGA dataset).

I suggest that either the SAM parser or the Hit->Scaffold code should check for either all-INS or zero-aug-ops case and discard the record / print a clear warning in this case.

ctrapnell commented 9 years ago

Chris Smowton's commit 79eb91508a0a3086491a7ed4d4c33cfece445a49 fixes this.