Skip to content

Commit

Permalink
Address exception when there is no key-value in I line in MS1/MS2 (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
levitsky committed Apr 25, 2024
1 parent a2dc74d commit e97ea6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyteomics/ms1.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _handle_S(self, line, sline, params):
params['precursor m/z'] = float(sline[3])

def _handle_I(self, line, sline, params):
params[sline[1]] = sline[2]
params[sline[1]] = sline[2] if len(sline) > 2 else ''

def _handle_Z(self, line, sline, params):
params.setdefault('charge', []).append(float(sline[1]))
Expand Down

0 comments on commit e97ea6a

Please sign in to comment.