Skip to content

Meaning of overhang / watson_overhang in single stranded sequences #452

@manulera

Description

@manulera

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.

Metadata

Metadata

Labels

new-dseq-classRelated to the new Dseq implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions