kevinkovalchik / RawQuant

RawQuant is a Python package for extracting scan meta data and quantification values from Thermo .raw files.
MIT License
10 stars 2 forks source link

QC processing not working #3

Closed chrishuges closed 6 years ago

chrishuges commented 6 years ago

After install of the latest QC development version, I can process a raw file ok using parse or quant, but the QC command fails if I point it at a directory containing the same raw file that I process above.

D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev>python -m RawQuant qc -d D:\chughes\rawQuant-QCtesting\raw-files\ Traceback (most recent call last): File "D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev\RawQuant\RawQuant.py", line 71, in init self.raw = MSFileReader.ThermoRawfile(RawFile) File "D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev\RawQuant\MSFileReader.py", line 225, in init raise IOError("RAWfile {0} could not be opened, is the file accessible ?".format(self.filename)) OSError: RAWfile D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev\ch_15Feb2018_SP3-MagReSyn-TMT6_hph_1.raw could not be opened, is the file accessible ?

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\ptx_user\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\ptx_user\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev\RawQuant__main__.py", line 870, in quality_control.do_qc(args.directory) File "D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev\RawQuant\qc.py", line 51, in do_qc raw = RawQuant(file) File "D:\chughes\rawQuant-QCtesting\RawQuant-qc_dev\RawQuant\RawQuant.py", line 75, in init raise Exception(RawFile + ' does not appear to be a valid .raw file. Please check path and file and try again.') Exception: ch_15Feb2018_SP3-MagReSyn-TMT6_hph_1.raw does not appear to be a valid .raw file. Please check path and file and try again.

kevinkovalchik commented 6 years ago

It looks like MSFileReader is being passed the filename rather than the absolute path to the file, so it just looks for it in the working directory.

I'll try to fix this today. As a temporary fix if you cd into the directory you want to QC it seems to run fine.

kevinkovalchik commented 6 years ago

Okay, seems to be fixed now. Should be able to run it regardless of working directory.