Commit aed9f5a
committed
fix: handle non-canonicalizable breakpoint when both breakends at same position
When both breakends are at the same genomic position with
leftPositive=false and rightPositive=true, calling reversed() produces
an identical breakpoint (it is a fixed-point of the reversal
operation). The previous isCanonical check returned false for this
case, causing an unnecessary and ineffective reversal.
Fix isCanonical to accept any same-position breakpoint where at least
one strand is positive, since these cannot be further canonicalized.
Only (false, false) is non-canonical, which correctly reverses to
(true, true).1 parent 512ef28 commit aed9f5a
File tree
2 files changed
+19
-3
lines changed- src
- main/scala/com/fulcrumgenomics/sv
- test/scala/com/fulcrumgenomics/sv
2 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
| |||
0 commit comments