From 04cbde91ceae5451fe5644daff6a4ea4f9b423e7 Mon Sep 17 00:00:00 2001
From: Will Kaufhold <willtkaufhold@gmail.com>
Date: Tue, 7 Jan 2020 12:07:09 -0600
Subject: [PATCH] Fix from Will Kaufhold to add_nick routine when
on_fwd_strand==False
---
mrdna/segmentmodel.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/mrdna/segmentmodel.py b/mrdna/segmentmodel.py
index bebf3c7..ceb19eb 100644
--- a/mrdna/segmentmodel.py
+++ b/mrdna/segmentmodel.py
@@ -744,8 +744,13 @@ class Segment(ConnectableElement, Group):
## TODO? Replace with abstract strand-based model?
def add_nick(self, nt, on_fwd_strand=True):
- self.add_3prime(nt,on_fwd_strand)
- self.add_5prime(nt+1,on_fwd_strand)
+ if on_fwd_strand:
+ self.add_3prime(nt,on_fwd_strand)
+ self.add_5prime(nt+1,on_fwd_strand)
+ else:
+ self.add_5prime(nt,on_fwd_strand)
+ self.add_3prime(nt+1,on_fwd_strand)
+
def add_5prime(self, nt, on_fwd_strand=True):
if isinstance(self,SingleStrandedSegment):
--
GitLab