Skip to content

Commit

Permalink
closes #240
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffXiePL committed Jul 15, 2024
1 parent 009ad15 commit 978e254
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/pydna/dseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,7 @@ def __init__(

else: # ovhg given
if ovhg == 0:
if len(watson) == len(crick):
self._data = bytes(watson, encoding="ASCII")
elif len(watson) > len(crick):
if len(watson) >= len(crick):
self._data = bytes(watson, encoding="ASCII")
else:
self._data = bytes(
Expand Down Expand Up @@ -1334,8 +1332,8 @@ def seguid(self):
cs = _cdseguid(self.watson.upper(), self.crick.upper(), alphabet="{DNA-extended}")
else:
"""docstring."""
w = f"{self.ovhg*'-'}{self.watson}{'-'*(-self.ovhg+len(self.crick)-len(self.watson))}".upper()
c = f"{'-'*(self.ovhg+len(self.watson)-len(self.crick))}{self.crick}{-self.ovhg*'-'}".upper()
w = f"{self.ovhg * '-'}{self.watson}{'-' * (-self.ovhg + len(self.crick) - len(self.watson))}".upper()
c = f"{'-' * (self.ovhg + len(self.watson) - len(self.crick))}{self.crick}{-self.ovhg * '-'}".upper()
cs = _ldseguid(w, c, alphabet="{DNA-extended}")
return cs

Expand Down

0 comments on commit 978e254

Please sign in to comment.