The new behaviour will be that if you pass None as lim, it will shift the sequence and will never wrap it. The way it's implemented is that if lim is None then the function turns lim into essentially infinity (you cannot use the math.inf because it's not an integer, so instead I use sys.maxsize which is the maximum integer possible).
As of now
shitf_location
in pydna.utils took three arguments(original_location, shift, lim)
.lim
is the length of the sequence and it's used to "wrap" the location. This is intended for circular sequences. However, in certain cases, you may want to just move the feature. A use-case for this is [this example] https://github.com/BjornFJohansson/pydna/blob/e87d85a4be47d43a504a4bf75dd61cb536a8e0e3/src/pydna/amplify.py#L354-L356 where you want to shift by the same amount a list of features when you are doing a sequence transformation.The new behaviour will be that if you pass
None
as lim, it will shift the sequence and will never wrap it. The way it's implemented is that iflim
isNone
then the function turnslim
into essentially infinity (you cannot use the math.inf because it's not an integer, so instead I use sys.maxsize which is the maximum integer possible).Will implement a test for this as well.