Proteobench / ProteoBench

ProteoBench is an open and collaborative platform for community-curated benchmarks for proteomics data analysis pipelines. Our goal is to allow a continuous, easy, and controlled comparison of proteomics data analysis workflows.
https://proteobench.readthedocs.io
Apache License 2.0
27 stars 7 forks source link

:bug: saving input data for upload #290

Closed enryH closed 2 months ago

enryH commented 2 months ago

Describe the bug The dataset which is uploaded is saved locally. However, the data does not seem to be forwarded correctly to the function which should save it.

To Reproduce Try to submit a FragPipe run.

Expected behavior get the url with the pr

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

INFO:Writing the json to: C:\Users\user\AppData\Local\Temp\tmpyfi6_kwk\results.json                           
Following Github server redirection from /repos/Proteobot/Results_Module2_quant_DDA to /repositories/594        032348                                                                                                          
INFO:Following Github server redirection from /repos/Proteobot/Results_Module2_quant_DDA to /repositorie        s/594032348                                                                                                     
Following Github server redirection from /repos/Proteobot/Results_quant_ion_DDA/branches/master to /repo        s/Proteobot/Results_quant_ion_DDA/branches/main
INFO:Following Github server redirection from /repos/Proteobot/Results_quant_ion_DDA/branches/master to 
DA/branches/master to /repos/Proteobot/Results_quant_ion_DDA/branches/main
2024-04-25 11:04:41.995 Uncaught app exception
Traceback (most recent call last):
  File "C:\Users\user\Anaconda3\envs\proteobench\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\user\Documents\repos\ProteoBench\webinterface\pages\DDA_Quant_ion.py", line 667, in <module> 
    StreamlitUI()
  File "C:\Users\user\Documents\repos\ProteoBench\webinterface\pages\DDA_Quant_ion.py", line 56, in __init__  
    self._main_page()
  File "C:\Users\user\Documents\repos\ProteoBench\webinterface\pages\DDA_Quant_ion.py", line 157, in _main_page
    self._populate_results()
  File "C:\Users\user\Documents\repos\ProteoBench\webinterface\pages\DDA_Quant_ion.py", line 217, in _populate_results
    self.generate_results("", None, None, False, None)
  File "C:\Users\user\Documents\repos\ProteoBench\webinterface\pages\DDA_Quant_ion.py", line 598, in generate_results
    pr_url = self.make_submission_webinterface(
  File "C:\Users\user\Documents\repos\ProteoBench\webinterface\pages\DDA_Quant_ion.py", line 368, in make_submission_webinterface
    self.ionmodule.write_intermediate_raw(
  File "C:\Users\user\Documents\repos\ProteoBench\proteobench\modules\dda_quant_base\module.py", line 219, in 
write_intermediate_raw
    input_df.to_csv(os.path.join(path_write, "input_df.csv"))
AttributeError: 'NoneType' object has no attribute 'to_csv'
enryH commented 2 months ago

The issue is that assigning the session states does not seem to work:

https://github.com/Proteobench/ProteoBench/blob/170d83e9c537324f81d12893d4ad66c418233653/webinterface/pages/DDA_Quant_ion.py#L578-L580

Inspecting the session state after running this line, I find

st.session_state[self.variables_dda_quant.input_df]  # None
self.variables_dda_quant.input_df  # 'input_df'
enryH commented 2 months ago

So it would be easiest to just forward the input_df and all_datapoints directly?

https://github.com/Proteobench/ProteoBench/blob/170d83e9c537324f81d12893d4ad66c418233653/webinterface/pages/DDA_Quant_ion.py#L597-L602

enryH commented 2 months ago

Okay. that's not it. input_df is just none. so some problem upstream of the function I fear.