bamtools
bamtools copied to clipboard
bamtools filter crashes with some bam files
I was supplied with some .bam files and needed to filter out some regions. bamtools filter crashed because many of the files contained very occasional records where RefID was set to -1, which caused a crash at line 125 of bamtool_filter.cpp. I did not generate the .bam file so it is not clear how this happened. I have put in an additional checks in my code at lines 117 and 125 which fixes the problem. Perhaps a similar check should be put on the code in the repository?