Commit 7b4b0dcf authored by cmaffeo2's avatar cmaffeo2
Browse files

Updated condition for merging beads

parent 129fc680
......@@ -1697,7 +1697,7 @@ class SegmentModel(ArbdModel):
if A.particle is None:
b = s1.get_nearest_bead(a1)
if b is not None and s1.contour_to_nt_pos(np.abs(b.contour_position-a1)) < 1:
if b is not None and s1.contour_to_nt_pos(np.abs(b.contour_position-a1)) < min(max_basepairs_per_bead, max_nucleotides_per_bead)*0.5:
## combine beads
b.update_position( 0.5*(b.contour_position + a1) ) # avg position
else:
......@@ -1707,7 +1707,7 @@ class SegmentModel(ArbdModel):
if B.particle is None:
b = s2.get_nearest_bead(a2)
if b is not None and s2.contour_to_nt_pos(np.abs(b.contour_position-a2)) < 1:
if b is not None and s2.contour_to_nt_pos(np.abs(b.contour_position-a2)) < min(max_basepairs_per_bead, max_nucleotides_per_bead)*0.5:
## combine beads
b.update_position( 0.5*(b.contour_position + a2) ) # avg position
else:
......
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