### diff tools/seq_primer_clip/seq_primer_clip.py @ 5:530c8d6fedd8draft

v0.0.15 - internal changes
author peterjc Wed, 10 May 2017 13:09:52 -0400 9b074c1db68e b9dc7c967ee6
line wrap: on
line diff
```--- a/tools/seq_primer_clip/seq_primer_clip.py	Thu Feb 02 11:52:37 2017 -0500
+++ b/tools/seq_primer_clip/seq_primer_clip.py	Wed May 10 13:09:52 2017 -0400
@@ -29,8 +29,10 @@
NOTE: Currently it uses Python's regular expression engine for finding the
primers, which for my needs is fast enough.
"""
+
+import re
import sys
-import re
+

@@ -147,8 +149,8 @@
# We'll use a set to remove any duplicate patterns
# if letter not in "NX":
pattern = seq[:i] + "N" + seq[i + 1:]
-            assert len(pattern) == len(seq), "Len %s is %i, len %s is %i" \
-                   % (pattern, len(pattern), seq, len(seq))
+            assert len(pattern) == len(seq), ("Len %s is %i, len %s is %i"
+                                              % (pattern, len(pattern), seq, len(seq)))
yield make_reg_ex(pattern)
if mm >= 2:
for i, letter in enumerate(seq):
@@ -158,8 +160,8 @@
# We'll use a set to remove any duplicate patterns
# if letter not in "NX":
pattern = seq[:i] + "N" + seq[i + 1:i + 1 + k] + "N" + seq[i + k + 2:]
-                assert len(pattern) == len(seq), "Len %s is %i, len %s is %i" \
-                       % (pattern, len(pattern), seq, len(seq))
+                assert len(pattern) == len(seq), ("Len %s is %i, len %s is %i"
+                                                  % (pattern, len(pattern), seq, len(seq)))
yield make_reg_ex(pattern)

```