Commit 42f941f9 authored by cmaffeo2's avatar cmaffeo2
Browse files

Slightly improved error when circular DNA is encountered

parent 6c55001d
......@@ -781,7 +781,8 @@ class Segment(ConnectableElement, Group):
for s in self.strand_pieces[d]:
l,h = sorted((s.start,s.end))
for value in (strand_piece.start,strand_piece.end):
assert( value < l or value > h )
if value >= l and value <= h:
raise Exception("Strand piece already exists! DNA may be circular.")
## Add strand_piece in correct order
self.strand_pieces[d].append(strand_piece)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment