aboutsummaryrefslogtreecommitdiff
path: root/src/score_mers.py
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-03-27 15:18:38 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2014-03-27 15:18:38 -0400
commit6138139143c881fa4b6536d6b231db4cb0ff0217 (patch)
treea64ad1b38d07e50c32b177c6440a9d0b12014598 /src/score_mers.py
parent550b0e91a1c39dfec223f1959ec08d785927b2fc (diff)
improve output, add number of primers in first colum. this closes #12
Diffstat (limited to 'src/score_mers.py')
-rwxr-xr-xsrc/score_mers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/score_mers.py b/src/score_mers.py
index 438a8e9..a7c27c9 100755
--- a/src/score_mers.py
+++ b/src/score_mers.py
@@ -190,11 +190,12 @@ def percentage(part, whole, precision=2):
return str(percent) + "%"
def write_header(fh):
- fh.write("Combination\tScore\tFG_mean_dist\tFG_stdev_dist\tBG_ratio\n")
+ fh.write("nb_primers\tCombination\tScore\tFG_mean_dist\tFG_stdev_dist\tBG_ratio\n")
def write_result(fh, score_res):
combination, score_val, fg_mean_dist, fg_stddev_dist, bg_ratio = score_res
- fh.write(str(combination) + "\t")
+ fh.write(str(len(combination)) + "\t")
+ fh.write(' '.join(combination) + "\t")
fh.write(str(score_val) + "\t")
fh.write(str(fg_mean_dist) + "\t")
fh.write(str(fg_stddev_dist) + "\t")