czbiohub-sf / Rapid-QC-MS

Realtime quality control for mass spectrometry data acquisition
https://czbiohub-sf.github.io/Rapid-QC-MS
Other
13 stars 2 forks source link

Parameter File Not Found and Setup #98

Open montgomna opened 8 months ago

montgomna commented 8 months ago

Hi,

I am hoping to make rapidqcms work with a Waters Xevo G2-XS, but I have run into a couple a issues while trying to set up the program.

I am seeing the following error when trying to view data from a run, and also I do not see that any of the data I have collected have been successfully converted when I click on a running job. I am not using biological standards, but have input a Job ID, selected Chromatography and Rapid-QC-MS configuration, as well as pointed to the .raw data folder for the data acquisition path, and provided an acquisition sequence in the correct format. The bar at the bottom of the New QC Job turns dark blue and I am able to click it to start a run.

Exception on /_dash-update-component [POST] Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 2529, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\dash\dash.py", line 1259, in dispatch ctx.run( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\dash_callback.py", line 439, in add_context output_value = func(func_args, **func_kwargs) # %% callback invoked %% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\DashWebApp.py", line 2862, in populate_biological_standards_dropdown log.debug("{} {}".format(biostnds, biostnds[0]))


TypeError: 'NoneType' object is not subscriptable
Exception on /_dash-update-component [POST]
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\dash\dash.py", line 1259, in dispatch
    ctx.run(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\dash\_callback.py", line 439, in add_context
    output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\DashWebApp.py", line 2889, in populate_biological_standards_compare_dropdowns
    selected_bio_standard = biostnds[0]
                            ~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
data_directory: C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\data
Run monitoring initiated for E:/Test_Rapidqcms.pro/data/
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\AcquisitionListener.py", line 323, in <module>
    start_listener(path=sys.argv[1], instrument_id=sys.argv[2], run_id=sys.argv[3])
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\AcquisitionListener.py", line 221, in start_listener
    qc.process_data_file(path, filename, extension, instrument_id, run_id)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\AutoQCProcessing.py", line 870, in process_data_file
    msdial_parameters = db.get_parameter_file_path(chromatography, polarity)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\rapidqcms\DatabaseFunctions.py", line 2347, in get_parameter_file_path
    return parameter_file
           ^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'parameter_file' where it is not associated with a value

In addition to the above error, I also noticed that rapidqcms was not automatically detecting my installation of MSConvert, so I  manually specified the location of msconvert.exe in C:/proteowizard/ by changing a couple lines in DatabaseFunctions.py from: 

    user = get_msdial_directory().replace("\\", "/").split("/")[2]
    msconvert_folder = [f.path for f in os.scandir("C:/Users/" + user + "/AppData/Local/Apps/") if f.is_dir() and "ProteoWizard" in f.name][0]
    return msconvert_folder

to:
    msconvert_folder = os.path.join('C:', os.sep, 'proteowizard')
    return msconvert_folder

This seems to have fixed the error where it would not let me start a run because MSConvert installation was not found.

Finally I noticed in the setup notes for rapidqcms  that Python 3.8-3.11 is listed as a requirement for installation, however during installation the installation could not proceed until I also installed Visual C++ 14.0+, which I got by installing MS Visual Studios 2022 and choosing "Desktop Development with C++" during the installation.

Thank you for any help you can provide,

Nathan T. Montgomery, Ph.D. (he/him)
n.montgomery@colostate.edu

Research Associate III, Analytical Resources Core, Colorado State University

[Office of the Vice President for Research](https://www.research.colostate.edu/)

(503)-314-0683

Microbiology Building, C121