Commit 556b37e1 authored by cmaffeo2's avatar cmaffeo2
Browse files

Improved strand routing algorithm when a 5prime or 3prime location has a connection

parent 0087a6d2
......@@ -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):
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)
if next_seg is None:
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:
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