bigbio / sdrf-pipelines

A repository to convert SDRF proteomics files into pipelines config files
Apache License 2.0
16 stars 22 forks source link

[Usability] Fix uncaught exception when unsupported labels are used in SDRF file #85

Closed jgriss closed 10 months ago

jgriss commented 3 years ago

Currently, the use of other label specifications causes the following error:

File "/opt/conda/envs/nf-core-proteomicstmt-1.0dev/lib/python3.8/site-packages/sdrf_pipelines/openms/openms.py", line 674, in save_search_settings_to_file
    URI + "\t" + raw + "\t" + f2c.file2mods[raw][0] + "\t" + f2c.file2mods[raw][1] + "\t" + label + "\t" +
UnboundLocalError: local variable 'label' referenced before assignment

Solution

Add proper error handling and well formatted (helpful) error message

(I will create a PR for this later on)

ypriverol commented 10 months ago

Solved.