Commit 39425b0c authored by cmaffeo2's avatar cmaffeo2
Browse files

fixup: Enabled automatic creation of terminal...

parent e75f2f0a
......@@ -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:
Supports Markdown
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