File: AlignmentBuffer_noMatch.patch

package info (click to toggle)
ngmlr 0.2.7%2Bgit20210816.a2a31fb%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,876 kB
  • sloc: cpp: 10,359; sh: 134; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Author: Steffen Moeller <moeller@debian.org>
Description: Avoid division by 0 error, along idea behind PR#96

Index: ngmlr/src/AlignmentBuffer.cpp
===================================================================
--- ngmlr.orig/src/AlignmentBuffer.cpp
+++ ngmlr/src/AlignmentBuffer.cpp
@@ -1881,6 +1881,7 @@ int AlignmentBuffer::computeMappingQuali
 	verbose(0, true, "Computing mapping quality:");
 
 	readCoordsTree->findOverlapping(alignment.QStart, readLength - alignment.QEnd, results);
+	if (0 == results.size()) return(0);
 	int mqSum = 0;
 	int mqCount = 0;
 	for (int j = 0; j < results.size(); ++j) {