From 81546af9acfd1fb5cc4e8193fd4b9d76b95f8bcc Mon Sep 17 00:00:00 2001 From: Chris Maffeo <cmaffeo2@illinois.edu> Date: Thu, 17 May 2018 11:12:58 -0500 Subject: [PATCH] Fix that allows strand_segments to be 1 nt long --- segmentmodel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/segmentmodel.py b/segmentmodel.py index 121c2aa..4888659 100644 --- a/segmentmodel.py +++ b/segmentmodel.py @@ -1269,10 +1269,10 @@ class Strand(Group): strand_segment_count += 1 seg = s.segment contour = s.get_contour_points() - if s.end == s.start: - pdb.set_trace() + # if s.end == s.start: + # pdb.set_trace() # assert(s.end != s.start) - assert(np.linalg.norm( seg.contour_to_position(contour[-1]) - seg.contour_to_position(contour[0]) ) > 0.1) + assert( s.num_nts == 1 or (np.linalg.norm( seg.contour_to_position(contour[-1]) - seg.contour_to_position(contour[0]) ) > 0.1) ) for c,seq in zip(contour,s.get_sequence()): if last is None: seq = "5"+seq -- GitLab