aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-02-04 13:23:27 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2014-02-04 13:23:27 -0500
commit6381dd047f543f8bdd3637585087a0a7135afda7 (patch)
tree7dfe6c67f122eccddb584b174341ea487d79662a
parenta3abc30f96727d50fe510b494c6b715f2307c765 (diff)
add check functions to filter without calling the jobs
-rwxr-xr-xsrc/score_mers.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/score_mers.py b/src/score_mers.py
index d33d23b..ad98552 100755
--- a/src/score_mers.py
+++ b/src/score_mers.py
@@ -71,6 +71,22 @@ def populate_locations(input_fn, mers, mer):
mers[mer].pts.append(int(line))
+def check_duplicates(combination):
+ for mer in combination:
+ for other_mer in combination:
+ if not mer == other_mer:
+ if mer in other_mer:
+ return None
+ return combination
+
+def check_heterodimer(combination):
+ for combo in combinations(combination, 2):
+ if heterodimer_dic[combo] > nb_max_consecutive_binding:
+ return None
+ return combination
+
+
+
def score_mers(selected):
from itertools import combinations
import time