diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2014-02-04 13:23:27 -0500 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2014-02-04 13:23:27 -0500 |
commit | 6381dd047f543f8bdd3637585087a0a7135afda7 (patch) | |
tree | 7dfe6c67f122eccddb584b174341ea487d79662a | |
parent | a3abc30f96727d50fe510b494c6b715f2307c765 (diff) |
add check functions to filter without calling the jobs
-rwxr-xr-x | src/score_mers.py | 16 |
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 |