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

Mixed signals on ungraceful exit #277

Closed
GeorgWa opened this issue Jul 14, 2024 · 0 comments · Fixed by #278
Closed

Mixed signals on ungraceful exit #277

GeorgWa opened this issue Jul 14, 2024 · 0 comments · Fixed by #278
Assignees
Labels
bug Something isn't working

Comments

@GeorgWa
Copy link
Collaborator

GeorgWa commented Jul 14, 2024

Observation:
GIVEN the settings below
WHEN I run alphaDIA
THEN it tells me "ERROR: Searched all data without finding recalibration target" (OK, the settings are somethat arbitrary)
AND it throws a KeyError: 'precursor_idx' (NOK)
AND it writes no output files (NOK)
AND it has an exit code of 0 (NOK)

Expectation:

  • No KeyError
  • Exit code 0 and output files (empty) OR exit code !=0

Note: in general, we should have a nonzero exit code on errors.. (edit: this has been fixed by now)
At best, we even distinguish between
"business error" (such as "no recalibration targets") and unexpected technical errors..
technically, we would need to introduce custom exceptions for the business errors (e.g. NoRecalibrationTargetsError(Exception) ..

settings:
alphadia-1.6.2 on linux (MPI cluster)
20240612_OA1_MCT_SA_W80_SCM03_blankTest_Trypsin_conc1_t1_01.raw
hela_hybrid.small.hdf (https://datashare.biochem.mpg.de/s/cNdrN4OJC9AAHhz)
default config

[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.333964 PROGRESS: === checking if recalibration conditions were reached, target 200 precursors ===
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.336069 PROGRESS: ============================= Precursor FDR =============================
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.336299 PROGRESS: Total precursors accumulated: 45
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.336463 PROGRESS: Target precursors: 41 (91.11%)
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.336611 PROGRESS: Decoy precursors: 4 (8.89%)
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.336752 PROGRESS: 
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.336891 PROGRESS: Precursor Summary:
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.338947 PROGRESS: Channel   0:	 0.05 FDR:     7; 0.01 FDR:     7; 0.001 FDR:     7
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.339159 PROGRESS: 
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.339317 PROGRESS: Protein Summary:
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.341436 PROGRESS: Channel   0:	 0.05 FDR:     7; 0.01 FDR:     7; 0.001 FDR:     7
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.341689 PROGRESS: =========================================================================
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.342961 ERROR: Searched all data without finding recalibration target
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343178 ERROR: Search for 20240612_OA1_MCT_SA_W80_SCM03_blankTest_LysCtrypsin_conc1_t1_01 failed as not enough precursors were found for calibration
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343237 ERROR: This can have the following reasons:
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343281 ERROR:    1. The sample was empty and therefore nor precursors were found
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343320 ERROR:    2. The sample contains only very few precursors.
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343358 ERROR:       For small libraries, try to set recalibration_target to a lower value
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343395 ERROR:       For large libraries, try to reduce the library size and reduce the calibration MS1 and MS2 tolerance
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:06:58.343435 ERROR:    3. There was a fundamental issue with search parameters
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:00.430709 PROGRESS: Processing search outputs
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:00.430842 PROGRESS: Performing protein grouping and FDR
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:00.430894 INFO: Building output for 20240612_OA1_MCT_SA_W80_SCM03_blankTest_LysCtrypsin_conc1_t1_01
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:00.431028 WARNING: no psm file found for 20240612_OA1_MCT_SA_W80_SCM03_blankTest_LysCtrypsin_conc1_t1_01, skipping
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:00.431374 INFO: Building combined output
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:00.432501 ERROR: Output failed with error 'precursor_idx'
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - Traceback (most recent call last):
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/alphadia/planning.py", line 367, in run
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     output.build(workflow_folder_list, base_spec_lib)
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/alphadia/outputtransform.py", line 378, in build
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     psm_df = self.build_precursor_table(
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/alphadia/outputtransform.py", line 525, in build_precursor_table
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     psm_df = psm_df.merge(
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -              ^^^^^^^^^^^^^
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/pandas/core/frame.py", line 10832, in merge
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     return merge(
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -            ^^^^^^
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 170, in merge
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     op = _MergeOperation(
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -          ^^^^^^^^^^^^^^^^
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 794, in __init__
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     ) = self._get_merge_keys()
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -         ^^^^^^^^^^^^^^^^^^^^^^
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/pandas/core/reshape/merge.py", line 1310, in _get_merge_keys
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     left_keys.append(left._get_label_or_level_values(lk))
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -   File "/fs/home/kraken/conda-envs/alphadia-1.6.2/lib/python3.11/site-packages/pandas/core/generic.py", line 1911, in _get_label_or_level_values
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO -     raise KeyError(key)
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - KeyError: 'precursor_idx'
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0:07:16.611656 WARNING: WARNING: Temp mmap arrays were written to /tmp/temp_mmap_vq34a6cx. Cleanup of this folder is OS dependant, and might need to be triggered manually! Current space: 34,274,779,136
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - Removed 0 of 1 files.
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - EXIT CODE:
[2024-06-13, 05:17:31 UTC] {ssh.py:526} INFO - 0
@GeorgWa GeorgWa self-assigned this Jul 14, 2024
@GeorgWa GeorgWa added the bug Something isn't working label Jul 14, 2024
@GeorgWa GeorgWa linked a pull request Jul 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant