Closed Vicki-Yang closed 4 years ago
Hi Vicki, Thanks for your question. It is a lot of code to get through, but hopefully it will start to make sense. That gets set in the GUniDec.py file under the UniDecApp.on_open_file (liness 147-149).
if self.eng.config.batchflag != 1:
self.view.controls.ctlminmz.SetValue(str(np.amin(self.eng.data.data2[:, 0])))
self.view.controls.ctlmaxmz.SetValue(str(np.amax(self.eng.data.data2[:, 0])))
Let me know if you have any questions. Thanks, MTM
Hi Michael, I have read your reply and thanks for your answer. I may not made my question clearly, but what I want to ask is how do you determine the m/z range when processing raw data. In other words, how do you determine the parameter(config) in this function( in the unidec_modules/unidectools.py file (liness 1347-1348)). For example, I run UniDec with example data (AHC) you provided. The m/z of the raw data ranges from 984.94-20213.60, while the m/z of the processed data ranges from 3226.42-17642.90. How does it work without knowing the molecular formula. I need to reproduce the basic function of the UniDec. So I need to understand the code deeply even some details. I have finished the unidec_modules/unidectools.py including the processing data, UniDec functions and peak shape tools. I think it's enough for me at the begining, but it's just my thought. The biggest problem I had was that I couldn't find the Settings for the parameter-config in the code. I cannot understand how to get information of config from row data.
Tanks for your help, Vicki
Hi Vicki, The config is defined in the unidecstructure.py file and is one of the central classes of the code. It gets passed to most functions and modified by some. The config gets saved as a _conf.dat file in the unidecfiles folder and loaded each time you load a file. I think that is what you are seeing. The m/z range was set by me or another user, and it is reloading the narrower range from the previous parameters. There are also functions called import_config and export_config (see unidec_presbase.py) that load these into and out of the GUI. Out of curiosity, what project are you working on where you need to reproduce the basic functions? Thanks, MTM
Hi Michael, I get your point, and try to change the m/z range in the UniDec. Could you explain how you set the default m/z rang? By some fomula or just experience? I find a new problem...I use .raw file in my lab to test UniDec, but it's failed. UniDec cannnot open it. I am a postgraduate student in Tsinghua University and my research area is MS signal processing. In older to understand MS deconvolution deeply and learn python, I try to reproduce some functions.
Thanks for your help, Vicki
Hi Vicki, The default m/z range is the whole spectrum, but the users can then narrow it from there to remove parts of the spectrum without significant peaks or to focus in on a particular region. The example data has been narrowed already by me to remove some extra data points that aren't needed. I usually just do it by experience.
For the other issue, have you tried running it as an administrator? You will also need to install the MSFileReader from Thermo before you run it as an administrator. It needs to find the right files from the Thermo package, and it needs administrative access for that.
Good luck! Thanks, MTM
Hi Michael, I get your point!
Thanks, Vicki
Hi michaelmarty, I am studying this python code, but it is too long to start. Of course, I also meet some problems. Could you tell me how to determine the range of m/z in processing data? I cannot find the answer in the code.
Thanks for your help, Vicki