Open BjornFJohansson opened 6 months ago
Hi @BjornFJohansson yes, I added this in the PR about cutsites, the tests for the feature are here:
Shouldn't this be the desired behaviour? Or you mean that it should return a different type of error?
Not sure yet, This is what happens in the old version. This is not good as it actually hides the problem.
(n39) bjorn@bjorn-ThinkPad-T450s:~$ python
Python 3.9.19 | packaged by conda-forge | (main, Mar 20 2024, 12:50:21)
[GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.Restriction import AatII, ZraI
>>> from pydna.dseq import Dseq
>>> s = Dseq("GACGTC")
>>> s.cut(AatII)
(Dseq(-5)
GACGT
C, Dseq(-5)
C
TGCAG)
>>> s.cut(ZraI)
(Dseq(-3)
GAC
CTG, Dseq(-3)
GTC
CAG)
>>> s.cut(AatII + ZraI)
(Dseq(-3)
GAC
CTG, Dseq(-3)
GTC
CAG)
>>> s.cut(ZraI+AatII)
(Dseq(-3)
GAC
CTG, Dseq(-3)
GTC
CAG)
>>> s.cut(ZraI,AatII)
(Dseq(-3)
GAC
CTG, Dseq(-3)
GTC
CAG)
>>> s.cut(AatII, ZraI)
(Dseq(-5)
GACGT
C, Dseq(-5)
C
TGCAG)
>>> import pydna
>>> pydna.__version__
'5.2.0'
>>>