Skip to content

Commit

Permalink
fix header detection for percolator parser
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewThe committed Jan 16, 2025
1 parent 0e66bbc commit 7c9e128
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions picked_group_fdr/parsers/percolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def parse_percolator_out_file(
post_err_prob_col,
protein_col,
) = get_percolator_column_idxs(headers)
headers = list(map(str.lower, headers))

if score_type.get_score_column() == "posterior_error_prob":
score_col = post_err_prob_col
Expand Down Expand Up @@ -126,6 +127,8 @@ def parse_percolator_out_file(
proteins = row[protein_col].split("\t")
elif is_ms2rescore_file(headers):
proteins = eval(row[protein_col])
else:
raise ValueError("Could not deduce percolator output format from headers.")

proteins = get_proteins(modified_peptide, proteins)
if proteins:
Expand Down

0 comments on commit 7c9e128

Please sign in to comment.