From 6381dd047f543f8bdd3637585087a0a7135afda7 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Tue, 4 Feb 2014 13:23:27 -0500 Subject: add check functions to filter without calling the jobs --- src/score_mers.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- cgit v1.2.3