compomics / ThermoRawFileParser

Thermo RAW file parser that runs on Linux/Mac and all other platforms that support Mono
Apache License 2.0
188 stars 50 forks source link

Hidden FID data? hows qual browser doing it? #183

Closed gjgfml closed 3 months ago

gjgfml commented 3 months ago

Hi all,

I'm posting not so much an issue but more fishing for some insight (apologies if its not the appropriate forum). Below is a screenshot of same scan, m/z and rt of a data collected on an Orbitrap. Looking at the same region in different software/processing tools, it quickly became aparent that the extra peaks are truncation wiggles (without negative peaks!! nve peaks get zeroed??) Mzmine has some function/tool to "deal" with these ripples, but needs adjusting and parametrizing. My initial question is how is Qual browser doing this correction? It looks like its doing it on the fly (or maybe as it opens the files?) without any parametrization or user defined input. If so, it could imply that Qual browser is actually doing it in the time domain (FT, IFT, window functions etc ). Is the time domain data actually recorded on the .raw files? Can we access it? We have a ton of tools we could leverage from the NMR comunity if this is the case.

So tl;dr, do the .raw files contain hidden FIDs (I know it sounds almost like aconspiracy theory) and is it possible to extract it?

Hope you can help, Regards, G

image

caetera commented 3 months ago

Hi @gjgfml, Please, ensure you have the same setting (enable/disable) for the reference and exception data while converting to mzML and viewing the file in QualBrowser. If you use ThermoRawFileParser or MSConvert, reference and exception peaks are included by default, you can exclude them (in TRFP) by providing -x, --excludeExceptionData key. QualBrowser, to the best of my knowledge, excludes these peaks by default. You can find a bit more details in this comment https://github.com/compomics/ThermoRawFileParser/issues/171#issuecomment-1733602484

As to FID data stored in the RAW file, I believe it is better to address this question to Thermo. It is possible to switch to the "frequency" or "transient" signal in the Tune software (at least on tribrid instruments). However, I am not certain, if this is the "real" signal (i.e. directly from DAC) or the reconstructed one. Considering the amount of data in the FID and the speed of acquisition (up to 40 Hz in Orbitrap), it is likely that the FID signal never leaves the built-in computer. The library TRFP uses for reading RAW files does not expose any API to access FID data, even if it is stored in the RAW file.

gjgfml commented 3 months ago

Thank you! This was super useful! Indeed, when set to "exclude", the data is virtually identical to Qual browser. Its rather sneaky of them to still include it and add a flag. I found that there is a "flag" feature in the qualBrowser replacement software FreeStyle, but that column is essentially empty (probably a feature that was dropped from development or yet to come).

FID wise, "The library TRFP uses for reading RAW files does not expose any API to access FID data, even if it is stored in the RAW file." I assumed as much. Maybe in the future we will get access to those FIDs and find better alternatives to their eFT.

G

caetera commented 3 months ago

Out of my experience, almost every peak has an empty flag field, but these flags are set sometimes. If I recall, complete list of all possible flags can be found in QualBrowser help (cannot have access to it now).

A company named Spectoroswiss sells a device, that reads FID signal, but it plugs in parallel with original vendor acquisition system - https://spectroswiss.ch/hardware/. Maybe, it is something that might be relevant for you.