aboutsummaryrefslogtreecommitdiff
path: root/src/score_mers.py
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-03-26 14:16:34 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2014-03-26 14:16:34 -0400
commitf6fe059e37d8e8ee0cb6f7acf72c8918473ad3f7 (patch)
treee3c648763d65abeb1c10c7c8b1aee0e4f0a97eb8 /src/score_mers.py
parent83e9f59e7cb86f12f693b0097aba8fabd58275d4 (diff)
add primer_weight to our score function
Diffstat (limited to 'src/score_mers.py')
-rwxr-xr-xsrc/score_mers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/score_mers.py b/src/score_mers.py
index 7b6da7a..07d2ff9 100755
--- a/src/score_mers.py
+++ b/src/score_mers.py
@@ -34,6 +34,9 @@ max_check = int(os.environ.get("max_check", 35))
max_mer_distance = int(os.environ.get("max_mer_distance", 5000))
max_consecutive_binding = int(os.environ.get("max_consecutive_binding", 4))
+
+primer_weight = float(os.environ.get("primer_weight", 0))
+
def get_max_consecutive_binding(mer1, mer2):
'''
Return the maximum number of consecutively binding mers
@@ -262,7 +265,7 @@ def score(combination):
fg_std_dist = np.std(fg_dist)
# this is our equation
- mer_score = (nb_primers * fg_mean_dist * fg_std_dist) / bg_ratio
+ mer_score = (nb_primers**primer_weight) * (fg_mean_dist * fg_std_dist) / bg_ratio
return [combination, mer_score, fg_mean_dist, fg_std_dist, bg_ratio]