Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Dec 3, 2024
1 parent 6b9a2b1 commit 9f54092
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions quantmsutils/psm/psm_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import pandas as pd
import pyopenms as oms

from quantmsutils.utils.constants import SCAN, MZ_ARRAY, INTENSITY_ARRAY

_parquet_field = [
"sequence",
"protein_accessions",
Expand Down Expand Up @@ -113,9 +115,9 @@ def convert_psm(
)

if isinstance(spectra_df, pd.DataFrame):
spectra = spectra_df[spectra_df["scan"] == scan_number]
mz_array = spectra["mz"].values
intensity_array = spectra["intensity"].values
spectra = spectra_df[spectra_df[SCAN] == scan_number]
mz_array = spectra[MZ_ARRAY].values
intensity_array = spectra[INTENSITY_ARRAY].values
num_peaks = len(mz_array)

for hit in peptide_id.getHits():
Expand Down

0 comments on commit 9f54092

Please sign in to comment.