diff --git a/cpt_find_spanins/cpt.py b/cpt_find_spanins/cpt.py index d245cb7..8f15346 100755 --- a/cpt_find_spanins/cpt.py +++ b/cpt_find_spanins/cpt.py @@ -4,6 +4,7 @@ from Bio import SeqIO from Bio.Data import CodonTable import logging +import regex as re logging.basicConfig() log = logging.getLogger() @@ -147,7 +148,7 @@ def break_up_frame(self, s): if index % 3 != 0: continue n = s[start:index] - for (offset, n, t) in self.start_chop_and_trans(n): + for offset, n, t in self.start_chop_and_trans(n): if n and len(t) >= self.min_len: yield start + offset, n, t start = index @@ -294,7 +295,7 @@ def break_up_frame(self, s): if index % 3 != 0: continue n = s[start:index] - for (offset, n, t) in self.start_chop_and_trans(n): + for offset, n, t in self.start_chop_and_trans(n): if n and len(t) >= self.min_len: yield start + offset, n, t start = index diff --git a/cpt_find_spanins/findSpanin.py b/cpt_find_spanins/findSpanin.py index 04da73a..818aea5 100755 --- a/cpt_find_spanins/findSpanin.py +++ b/cpt_find_spanins/findSpanin.py @@ -2,15 +2,12 @@ ######### Much of this code is very "blocked", in the sense that one thing happens...then a function happens on the return...then another function...etc...etc... import argparse -import os import re # new -import itertools # new -from collections import Counter, OrderedDict +from collections import Counter from spaninFuncs import ( getDescriptions, grabLocs, spaninProximity, - splitStrands, tuple_fasta, lineWrapper, ) diff --git a/cpt_find_spanins/findSpanin.xml b/cpt_find_spanins/findSpanin.xml index b9051ed..cc10412 100755 --- a/cpt_find_spanins/findSpanin.xml +++ b/cpt_find_spanins/findSpanin.xml @@ -4,8 +4,11 @@ macros.xml - - + + python + biopython + regex +