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.
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.