Commit faec695
fix: correct off-by-one in centered_query_start/end for minus strand and add missing wide format header column
`centered_query_start` and `centered_query_end` were off by 1 on the minus strand
because the half-open interval [start, end) was negated as [-end, -start) instead of
the correct [-end+1, -start+1). This caused m6a positions to index into the wrong
base when users sliced `query_sequence[-centered_query_end:]` for minus strand reads.
The fix converts to inclusive coordinates before negation and back to exclusive after,
matching the existing correct logic in `apply_offset_helper()`.
Also adds the missing `fire_qual` column name to the wide format header so the header
column count (22) matches the data.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 86be096 commit faec695
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
| 136 | + | |
| 137 | + | |
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| |||
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
227 | | - | |
| 234 | + | |
228 | 235 | | |
229 | 236 | | |
230 | 237 | | |
| |||
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
| 244 | + | |
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
| |||
0 commit comments