aboutsummaryrefslogtreecommitdiff
path: root/src/score_mers.py
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-03-31 16:45:33 -0400
committerCalvin Morrison <mutantturkey@gmail.com>2014-03-31 16:45:33 -0400
commit59da5a70122e13a49932d83d70f42f1d1df9e0c9 (patch)
tree061201b07d9c7d7e06ea425a9d781a530256cdfc /src/score_mers.py
parentbf4deabce172025884fb503e3f05abe9f07a47eb (diff)
fix bug in using combination file. this closes #18
Diffstat (limited to 'src/score_mers.py')
-rwxr-xr-xsrc/score_mers.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/score_mers.py b/src/score_mers.py
index 267d7ff..be09d9b 100755
--- a/src/score_mers.py
+++ b/src/score_mers.py
@@ -117,7 +117,7 @@ def populate_locations(selected_mers, mer_dic, input_fn):
strstream = Popen(cmd, stdout=PIPE, shell=True)
for line in strstream.stdout:
- (mer, pos) = line.strip().split(" ")
+ (mer, pos) = line.split(" ")
mer_dic[selected_mers[int(mer)]].append(int(pos))
merlist_fh.close()
@@ -232,7 +232,7 @@ def score_specific_combinations(mers):
fh = open(output_file, 'wb')
write_header(fh)
-
+
score_it = p.map(score, mers)
for score_res in score_it:
if type(score_res) is list:
@@ -425,9 +425,8 @@ def main():
combination_fh = open(args.combination_file, "r")
for line in combination_fh:
mers = line.split()
- print mers
+ combinations.append(mers)
for mer in mers:
- print mer
fg_mers[mer] = []
bg_mers[mer] = []
@@ -443,7 +442,7 @@ def main():
for mer in bg_mers:
bg_mers[mer] = len(bg_mers[mer])
- score_specific_combinations(fg_mers.keys())
+ score_specific_combinations(combinations)
elif args.mer_file is not None: