MannLabs / alphapeptdeep

Deep learning framework for proteomics
Apache License 2.0
102 stars 20 forks source link

Error Occurs When Setting 'Min Number of Variable Modifications' to 1 #119

Closed pgarrett-scripps closed 7 months ago

pgarrett-scripps commented 8 months ago

Describe the bug I am encountering an error when attempting to set the 'Min number of variable modifications' to 1 on the Library page of v1.0.2 of the Windows GUI.

Steps to Reproduce

  1. Open the Windows GUI version 1.0.2.
  2. Navigate to the Library page.
  3. Upload any FASTA file.
  4. Leave all settings to their default values, except for the 'Min number of variable modifications,' which should be set to 1.

Logs

2023-11-08 17:18:26> Traceback (most recent call last):
  File "peptdeep\pipeline_api.py", line 302, in generate_library
    lib_maker.make_library(lib_settings['infiles'])
  File "peptdeep\spec_lib\library_factory.py", line 103, in make_library
    self._predict()
  File "peptdeep\spec_lib\library_factory.py", line 67, in _predict
    self.spec_lib.predict_all()
  File "peptdeep\spec_lib\predict_lib.py", line 111, in predict_all
    self.calc_precursor_mz()
  File "alphabase\spectral_library\base.py", line 186, in calc_precursor_mz
    fragment.update_precursor_mz(self._precursor_df)
  File "alphabase\peptide\precursor.py", line 108, in update_precursor_mz
    pep_mzs = calc_peptide_masses_for_same_len_seqs(
  File "alphabase\peptide\mass_calc.py", line 164, in calc_peptide_masses_for_same_len_seqs
    if len(mods) > 0:
TypeError: object of type 'float' has no len()

Version

  2023-11-08 17:11:51> Platform information:
  2023-11-08 17:11:51> system        - Windows
  2023-11-08 17:11:51> release       - 10
  2023-11-08 17:11:51> version       - 10.0.19045
  2023-11-08 17:11:51> machine       - AMD64
  2023-11-08 17:11:51> processor     - Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
  2023-11-08 17:11:51> cpu count     - 8
  2023-11-08 17:11:51> ram           - 11.8/31.7 Gb (available/total)
  2023-11-08 17:11:51>
  2023-11-08 17:11:51> Python information:
  2023-11-08 17:11:51> alphabase        - 1.0.0
  2023-11-08 17:11:51> biopython        - 1.80
  2023-11-08 17:11:51> click            - 8.1.3
  2023-11-08 17:11:51> lxml             - 4.9.2
  2023-11-08 17:11:51> numba            - 0.56.4
  2023-11-08 17:11:51> numpy            - 1.23.5
  2023-11-08 17:11:51> pandas           - 1.5.2
  2023-11-08 17:11:51> peptdeep         - 1.0.2
  2023-11-08 17:11:51> psutil           - 5.9.4
  2023-11-08 17:11:51> python           - 3.9.16
  2023-11-08 17:11:51> scikit-learn     - 1.2.0
  2023-11-08 17:11:51> streamlit        - 1.16.0
  2023-11-08 17:11:51> streamlit-aggrid - 0.3.3
  2023-11-08 17:11:51> torch            - 1.13.1
  2023-11-08 17:11:51> tqdm             - 4.64.1
  2023-11-08 17:11:51> transformers     - 4.25.1
jalew188 commented 7 months ago

This issue has been FIX in https://github.com/MannLabs/alphabase/pull/127 of AlphaBase