From 39425b0c3a6108a4b9eb902792fac24154a7c6d7 Mon Sep 17 00:00:00 2001 From: Chris Maffeo <cmaffeo2@illinois.edu> Date: Fri, 17 Aug 2018 16:02:59 -0500 Subject: [PATCH] fixup: Enabled automatic creation of terminal... --- segmentmodel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/segmentmodel.py b/segmentmodel.py index ad712c1..16906cd 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: -- GitLab