Commit a4edb83
committed
fix: replace unsafe mateEnd.get with descriptive error in allele frequency calculation
The mateEnd.get call in numOverlappingTemplates would throw a bare
NoSuchElementException when the BAM file lacks MC (mate CIGAR) tags.
Replace with getOrElse that raises an IllegalStateException with a
clear message directing users to add MC tags (e.g. via samtools
fixmate). Keep checkAsPair unchanged since it does not access mateEnd.1 parent 81ec5c2 commit a4edb83
File tree
1 file changed
+4
-1
lines changed- src/main/scala/com/fulcrumgenomics/sv/tools
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
440 | 443 | | |
441 | | - | |
| 444 | + | |
442 | 445 | | |
443 | 446 | | |
444 | 447 | | |
| |||
0 commit comments