From d8e90ce2c2dab6cd72eb33a6e48acb7e6dfb5fce Mon Sep 17 00:00:00 2001 From: jalew188 Date: Tue, 21 May 2024 11:04:08 +0200 Subject: [PATCH] FIX alphabase noqa --- alpharaw/viz/df_utils.py | 6 +++--- extra_requirements/development.txt | 2 ++ nbs_tests/test_viz_multinotch.ipynb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/alpharaw/viz/df_utils.py b/alpharaw/viz/df_utils.py index d1c9efc..f947c44 100644 --- a/alpharaw/viz/df_utils.py +++ b/alpharaw/viz/df_utils.py @@ -6,7 +6,7 @@ from alpharaw.match.match_utils import match_closest_peaks, match_highest_peaks from alphabase.peptide.precursor import ( - calc_precursor_mz, + update_precursor_mz, calc_precursor_isotope_intensity, ) @@ -368,7 +368,7 @@ def translate_frag_df_to_plot_df( for iso in isotope_names: fragment_df[f"precursor_{iso}"] = precursor_df[iso].values[0] if len(isotope_names) > 0: - fragment_df[f"precursor_mono_idx"] = precursor_df.mono_isotope_idx.values[0] + fragment_df["precursor_mono_idx"] = precursor_df.mono_isotope_idx.values[0] return fragment_df @@ -386,7 +386,7 @@ def make_precursor_fragment_df( precursor_df = pd.DataFrame( dict(sequence=[sequence], mods=[mods], mod_sites=[mod_sites], charge=charge) ) - calc_precursor_mz(precursor_df) + update_precursor_mz(precursor_df) if include_precursor_isotopes: calc_precursor_isotope_intensity(precursor_df, max_isotope=max_isotope) if include_fragments: diff --git a/extra_requirements/development.txt b/extra_requirements/development.txt index 7351420..6b8c7e8 100644 --- a/extra_requirements/development.txt +++ b/extra_requirements/development.txt @@ -25,4 +25,6 @@ furo alphabase>=1.1.0 alphatims +pytest pre-commit==3.7.0 +nbmake==1.5.3 diff --git a/nbs_tests/test_viz_multinotch.ipynb b/nbs_tests/test_viz_multinotch.ipynb index c9861a7..2e0e4d1 100644 --- a/nbs_tests/test_viz_multinotch.ipynb +++ b/nbs_tests/test_viz_multinotch.ipynb @@ -237,7 +237,7 @@ " \"mod_sites\": [\"\",\"9\"],\n", " \"rt\": [4.3,4.3],\n", "})\n", - "precursur_func.calc_precursor_mz(psm_df)\n", + "precursur_func.update_precursor_mz(psm_df)\n", "precursur_func.calc_precursor_isotope(psm_df)" ] },