Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation for speclib.tsv fails while handling modifications #218

Open
JuliaS92 opened this issue Nov 28, 2024 · 0 comments
Open

Translation for speclib.tsv fails while handling modifications #218

JuliaS92 opened this issue Nov 28, 2024 · 0 comments

Comments

@JuliaS92
Copy link

Describe the bug
I tried predicting a library for a list of modified peptides. Library prediction worked (hdf5 was written), but writing of the tsv file with modifications translated to unimod failed with listindex out of range.

To Reproduce
Steps to reproduce the behavior:

  1. Input peptide list in the GUI with modifications: Methyl@K, Dimethyl@K, Acetyl@K, Carboxymethyl@K, Carboxyethyl@K, Phospho@S, Glu->Arg@E, HexNAc@T, Trimethyl@K, HNE@K, Phospho@T
  2. Select labels Label:13C(6)15N(4)@r and Label:13C(6)15N(2)@k
  3. Tick both Spectornaut tsv and unimod translation
  4. Run library prediction

Expected behavior
Spectronaut tsv

Logs

2024-11-28 13:14:13> Translating to /Users/schessner/Documents/.*/predict.speclib.tsv for DiaNN/Spectronaut...
  0%|                                                     | 0/1 [00:00<?, ?it/s]
2024-11-28 13:14:13> Traceback (most recent call last):
  File "peptdeep/pipeline_api.py", line 443, in generate_library
    lib_maker.translate_to_tsv(
  File "peptdeep/spec_lib/library_factory.py", line 132, in translate_to_tsv
    translate_to_tsv(
  File "alphabase/spectral_library/translate.py", line 459, in translate_to_tsv
    df = speclib_to_single_df(
  File "alphabase/spectral_library/translate.py", line 276, in speclib_to_single_df
    df["ModifiedPeptide"] = speclib._precursor_df[
  File "pandas/core/frame.py", line 10374, in apply
    return op.apply().__finalize__(self, method="apply")
  File "pandas/core/apply.py", line 916, in apply
    return self.apply_standard()
  File "pandas/core/apply.py", line 1063, in apply_standard
    results, res_index = self.apply_series_generator()
  File "pandas/core/apply.py", line 1081, in apply_series_generator
    results[i] = self.func(v, *self.args, **self.kwargs)
  File "alphabase/spectral_library/translate.py", line 46, in create_modified_sequence
    mods = [mods[rev_order[i]] for i in range(len(mods))]
  File "alphabase/spectral_library/translate.py", line 46, in <listcomp>
    mods = [mods[rev_order[i]] for i in range(len(mods))]
IndexError: list index out of range

Version (please complete the following information):

  • Installation Type One-click (internal pre-release)
  • If no log is available, provide the following:
    • Platform information
      • system Darwin 23.5.0
    • Python information:
      • peptdeep version 1.3.0
      • alphabase 1.4.2

Additional context
Same error occurs without translation to unimod.

@JuliaS92 JuliaS92 changed the title Translation for sepclib.tsv fails while handling modifications Translation for speclib.tsv fails while handling modifications Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant