This is an edge case, but came up in the tests. We should think about what overhang should represent in single stranded sequences. The below code shows the problem
from pydna.dseq import Dseq
seqs = [
Dseq.from_full_sequence_and_overhangs("AAAA", 0, 3),
Dseq.from_full_sequence_and_overhangs("AAAA", -3, 0),
Dseq.from_full_sequence_and_overhangs("AAAA", 0, 4),
]
for seq in seqs:
print(repr(seq))
print("ovhg:", seq.ovhg)
print("watson_ovhg:", seq.watson_ovhg())
print()
prints:
Dseq(-4)
AAAA
T
ovhg: 0
watson_ovhg: 3
Dseq(-4)
AAAA
T
ovhg: -3
watson_ovhg: 0
Dseq(-4)
AAAA
ovhg: 0
watson_ovhg: -4
What the last case should return is not clear to me. If we think that the "previous step" is coming from ovhg = 0 (first sequence), then it makes sense to return 0, but if we think the previous step is ovhg = -3, then it feels like ovhg should be -4.
This is an edge case, but came up in the tests. We should think about what
overhangshould represent in single stranded sequences. The below code shows the problemprints:
What the last case should return is not clear to me. If we think that the "previous step" is coming from
ovhg = 0(first sequence), then it makes sense to return 0, but if we think the previous step isovhg = -3, then it feels likeovhgshould be -4.