diff --git a/segmentmodel.py b/segmentmodel.py index ad712c16214079f252f48cff84d8968e6559eb5f..16906cd32f690095e4300f3732f11318b252b98a 100644 --- a/segmentmodel.py +++ b/segmentmodel.py @@ -2059,17 +2059,17 @@ class SegmentModel(ArbdModel): """ Ensure unconnected ends have 5prime Location objects """ for seg in self.segments: ## TODO move into Segment calls - five_prime_locs = seg.get_locations("5prime") - three_prime_locs = seg.get_locations("3prime") + five_prime_locs = sum([seg.get_locations(s) for s in ("5prime","crossover","terminal_crossover")],[]) + three_prime_locs = sum([seg.get_locations(s) for s in ("3prime","crossover","terminal_crossover")],[]) def is_start_5prime(l): return l.get_nt_pos() < 1 and l.on_fwd_strand def is_end_5prime(l): - return l.get_nt_pos() > seg.num_nt-1 and not l.on_fwd_strand + return l.get_nt_pos() > seg.num_nt-2 and not l.on_fwd_strand def is_start_3prime(l): return l.get_nt_pos() < 1 and not l.on_fwd_strand def is_end_3prime(l): - return l.get_nt_pos() > seg.num_nt-1 and l.on_fwd_strand + return l.get_nt_pos() > seg.num_nt-2 and l.on_fwd_strand if seg.start5.connection is None: if len(list(filter( is_start_5prime, five_prime_locs ))) == 0: