diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2014-07-03 15:37:42 -0400 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2014-07-03 15:37:42 -0400 |
commit | 428fbefaac16d6a5d83baa509cd9b02a65cffc57 (patch) | |
tree | cbbd8b03c7214c19fa369428511e3556d19d6780 /src | |
parent | 722d816b4a1c67bfcb590ab805c907a96bc3f984 (diff) |
fix that bug yo
Diffstat (limited to 'src')
-rwxr-xr-x | src/score_mers.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/score_mers.py b/src/score_mers.py index 0ddeb91..7d265a3 100755 --- a/src/score_mers.py +++ b/src/score_mers.py @@ -13,7 +13,6 @@ from subprocess import PIPE from itertools import combinations import numpy as np -import pdb fg_mers = {} bg_mers = {} @@ -481,14 +480,16 @@ def main(): # load our mer list into python mer_selectivity = selectivity_fh.readlines() + mer_selectivity = [ x for x in mer_selectivity if not x.startswith('#')] # get the last max_check (it's sorted) - selected_mers = mer_selectivity[-max_check:] + if len(mer_selectivity) > max_check: + selected_mers = mer_selectivity[-max_check:] + else: + selected_mers = mer_selectivity # load it into our fg and bg counts into their dictionaries for mer in selected_mers: - if mer.startswith("#"): - continue split_mer = mer.split() fg_mers[split_mer[0]] = [] bg_mers[split_mer[0]] = int(split_mer[2]) |