Skip to content

Commit

Permalink
Fix middle domain bug in ligate
Browse files Browse the repository at this point in the history
  • Loading branch information
UnHumbleBen committed May 23, 2022
1 parent 2b485be commit 63fbd53
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scadnano/scadnano.py
Original file line number Diff line number Diff line change
Expand Up @@ -7028,6 +7028,14 @@ def ligate(self, helix: int, offset: int, forward: bool) -> None:
strand_5p = strand_right
strand_3p = strand_left

if strand_5p.domains[0] != dom_5p:
raise IllegalDesignError(f'Domain to be ligated "{dom_5p.name}"'
f'does not reside on the 5\' end of the strand.')

if strand_3p.domains[-1] != dom_3p:
raise IllegalDesignError(f'Domain to be ligated "{dom_3p.name}"'
f'does not reside on the 3\' of the strand.')

if strand_left is strand_right:
# join domains and make strand circular
strand = strand_left
Expand Down

0 comments on commit 63fbd53

Please sign in to comment.