Skip to content

Commit

Permalink
split on tabs if tabs are present as more common case
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkinsc committed Feb 11, 2021
1 parent 9891eac commit 8ce21a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion augur/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def read_priority_scores(fname):
with open(fname, encoding='utf-8') as pfile:
return defaultdict(float, {
elems[0]: float(elems[1])
for elems in (line.strip().split() if '\t' not in line else line.strip().split('\t') for line in pfile.readlines())
for elems in (line.strip().split('\t') if '\t' in line else line.strip().split() for line in pfile.readlines())
})
except Exception as e:
print(f"ERROR: missing or malformed priority scores file {fname}", file=sys.stderr)
Expand Down

0 comments on commit 8ce21a4

Please sign in to comment.