Closed manulera closed 9 months ago
The Dseqrecord('AAAA', circular=True)[1:1]
is problematic and I think should be considered a bug, I think it would be desirable to have it work as [0:0]
.
from pydna.dseqrecord import Dseqrecord
seq = Dseqrecord('AAAA', circular=True)
print(seq[0:0].seq)
print(seq[0:len(seq)].seq)
seq = Dseqrecord('AAAA', circular=True)
print(seq[1:1].seq)
print(seq[1:1+len(seq)].seq)
# prints
# AAAA
# AAAA
# empty string
# empty string
@BjornFJohansson dixit: Behaviour should be like the Dseq
Illustrated by this example, see
<<<<<<<<<<<<<
Not sure which of the two should be kept, probably the one of
Dseqrecord
to be consistent with the string behaviour, and use shift instead ofseq[n:n]
to rotate the origin.