Closed manulera closed 9 months ago
Can we add this already?
This is in this commit: https://github.com/BjornFJohansson/pydna/commit/7ce18818cc2a6547125fbd735cf2c2e634040c51
This is already included in the branch cutsite_pairs, but not sure you will be merging that in the next release. I can try to re-base if needed, but if you are planning to include that branch in the next release it should be fine
When slicing a circular sequence, sometimes features that should not be retained are retained, example below:
The reason why it happens is that when calling
__getitem__
inDseqrecord
:The shifting turns the feature
[4:17](+)
intojoin{[12:21](+), [0:4](+)}
, andf.location.parts[-1].end <= answer.seq.length
is then smaller than the length, even if the feature spans beyond the end of the slice.It can be fixed like this.
I think there are some other edge cases but I will open a separate issue for those.