diff --git a/mrdna/segmentmodel.py b/mrdna/segmentmodel.py index 650e5a53ac7a1669fada692f35485aa03f9c781a..24633aeafe48faa60a4e49a25f9e4411dca0f552 100644 --- a/mrdna/segmentmodel.py +++ b/mrdna/segmentmodel.py @@ -696,7 +696,7 @@ class Segment(ConnectableElement, Group): if l.is_3prime_side_of_connection: continue ## Stop if we found the 3prime end - if l.on_fwd_strand == is_fwd and l.type_ == "3prime": + if l.on_fwd_strand == is_fwd and l.type_ == "3prime" and l.connection is None: # print(" found end at",l) return pos, None, None, None, None @@ -2429,18 +2429,23 @@ class SegmentModel(ArbdModel): break except: print("Unexpected error:", sys.exc_info()[0]) + # import pdb + # pdb.set_trace() + # seg.get_strand_segment(pos, is_fwd, move_at_least) + # strand.add_dna(seg, pos, end_pos, is_fwd) raise if next_seg is None: break else: seg,pos,is_fwd = (next_seg, next_pos, next_dir) + strand.history = list(history) return history strand_counter = 0 history = [] for seg in self.segments: - locs = seg.get_5prime_locations() + locs = filter(lambda l: l.connection is None, seg.get_5prime_locations()) if locs is None: continue # for pos, is_fwd in locs: for l in locs: