File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -219,8 +219,8 @@ function check_alignment_anchors(anchors)
219
219
end
220
220
end
221
221
222
- # Check if a soft clip has anything but hard clips and start anchors between them and
223
- # the end of the alignment
222
+ # Soft clips must be at either end of the alignment, or alternatively can have hard
223
+ # clips between them and the ends of the alignment. Check to make sure this is true.
224
224
for i in 3 : lastindex (anchors)
225
225
if anchors[i]. op == OP_SOFT_CLIP
226
226
# Check if this is the last operation, which is valid
@@ -242,8 +242,8 @@ function check_alignment_anchors(anchors)
242
242
prev_valid = prev_valid && (anchor. op == OP_START || anchor. op == OP_HARD_CLIP)
243
243
end
244
244
245
- # Check for invalid operations
246
- if ! (next_valid || prev_valid)
245
+ # Check if this soft clip is a valid starting clip or a valid ending clip
246
+ if ! (next_valid || prev_valid) # Alternatively: !next_valid && !prev_valid
247
247
error (" OP_SOFT_CLIP may only have OP_HARD_CLIP operations between it and the ends of the alignment" )
248
248
end
249
249
end
You can’t perform that action at this time.
0 commit comments