Skip to content

Commit

Permalink
small change.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Mar 17, 2023
1 parent 7848567 commit 2306abe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/mzml_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def parse_mzml(file_name: str, file_columns: list):
exp = MSExperiment()
MzMLFile().load(file_name, exp)
for spectrum in exp:
id = spectrum.getNativeID()
id_ = spectrum.getNativeID()
MSLevel = spectrum.getMSLevel()
rt = spectrum.getRT() if spectrum.getRT() else None
if MSLevel == 2:
Expand All @@ -35,9 +35,9 @@ def parse_mzml(file_name: str, file_columns: list):
base_peak_intensity = spectrum.getMetaValue("base peak intensity")
else:
base_peak_intensity = max(peaks_tuple[1]) if len(peaks_tuple[1]) > 0 else None
info_list = [id, 2, charge_state, peak_per_ms2, base_peak_intensity, rt, emz]
info_list = [id_, 2, charge_state, peak_per_ms2, base_peak_intensity, rt, emz]
else:
info_list = [id, MSLevel, None, None, None, rt, None]
info_list = [id_, MSLevel, None, None, None, rt, None]

info.append(info_list)

Expand Down

0 comments on commit 2306abe

Please sign in to comment.