Skip to content

Commit

Permalink
Merge branch '499-error-in-match-between-run-parsing-for-mq' of https…
Browse files Browse the repository at this point in the history
…://github.com/Proteobench/ProteoBench into 499-error-in-match-between-run-parsing-for-mq
  • Loading branch information
Cajac102 committed Dec 16, 2024
2 parents a7d0111 + d669fa7 commit 2ec83db
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions proteobench/io/params/alphadia.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,14 @@ def extract_params(fname: str) -> ProteoBenchParameters:
Returns:
ProteoBenchParameters: An object containing the extracted parameters.
"""
with open(fname) as f:
lines_read = f.readlines()
lines = [line for line in lines_read if "──" in line]

version = extract_file_version(lines_read[6])
try:
with open(fname) as f:
lines_read = f.readlines()
lines = [line for line in lines_read if "──" in line]
version = extract_file_version(lines_read[6])
except:
lines = [l for l in fname.read().decode("utf-8").splitlines() if "──" in l]
version = extract_file_version(lines[6])

line_generator = iter(lines)
first_line = next(line_generator)
Expand Down

0 comments on commit 2ec83db

Please sign in to comment.