michaelmarty / UniDec

Universal Deconvolution of Mass and Ion Mobility Spectra
Other
63 stars 19 forks source link

Converting data recorded with bunching factor to txt #46

Closed aretaon closed 4 years ago

aretaon commented 4 years ago

Hi @michaelmarty,

when converting IMS-data recorded on a Synapt instrument with bunching factor1 set to >1 to txt with the Data Conversion Wizard GUI (and also when using the main GUI directly), UniDec returns a compressed spectrum (e.g. a spectrum from 200-16000 m/z is converted to 200-800 m/z) for the MS and the IMS function. When using the "MS only" option in the Data Conversion Wizard, however, the spectrum is processed correctly.

MS only mode

IMS mode

As reference, the file unidec_bunching8.zip contains a rawfile and the converted txt files for data with bunching factor set to 8.

Thanks for developing and maintaining UniDec and best wishes

Julian

-- 1 Here, bunching refers to summing up a window of N m/z bins during acquisition to increase sensitivity and reduce file size.

michaelmarty commented 4 years ago

Hi Julian, Great to hear from you. This is definitely weird. Thanks for sending the file. I am able to reproduce the problem on that file, but I don't see the same problem on some old Synapt data I use for testing. What type of Synapt is this? Do you see this for all spectra or just some? I'm wondering if it has something to do with being a newer instrument. Thanks! MTM

michaelmarty commented 4 years ago

After digging around some more, I think the problem is with the CDT.dll library from Waters. I used an orthogonal script to access the data, and it had the same issue. The only common things was the Waters dll file. Could you try replacing the CDT.dll with the version from your instrument? Which version of MassLynx are you using?

aretaon commented 4 years ago

Hi Mike, thanks for looking into this even though it may not be directly related to UniDec. We actually see this behaviour for all IMS data recorded on the instrument (a Waters Synapt G1). Actually, we just recovered from damage induced by a power shortage and had to reinstall MassLynx (think it was SCN 872) during the process. I will replace the DLL with the one from the instrument tomorrow and report back.

aretaon commented 4 years ago

MassLynx on the instrument PC is 4.1 SCN Version 872. The CDT.dll was not present on the instrument as we did not reinstall Driftscope so far (seldom use it anyway) and MassLynx seems to either not have this DLL or call it differently. After installing Driftscope I can now reproduce the shifting behaviour also on the instrument PC.

Still, opening the bunched IMS-files works well on both my own computer and the instrument PC when using MassLynx. So somewhere the bunching setting must be hidden in the rawfile and MassLynx is able to parse it.

If ML is using another library to read IMS files, then maybe CDT.dll is in general not able to parse bunched spectra directly and we have to resort to not bunching the instrument during IMS analysis. So this would be no bug related to UniDec but rather an annoyance caused by Waters' dll.

michaelmarty commented 4 years ago

Hi Julian, Thanks for trying these things. I think what is happening is that there is some sort of calibration that needs to be applied after the data is extracted. I think the MassLynxRaw.dll is automatically applying the calibration whereas the CDT.dll is not applying it. DriftScope must know that CDT.dll is not applying it an apply it afterwards inside it's own software. Would that make sense?

Digging into the HEADER.txt file, it looks like it is missing the calibration data. Older data that worked had actual calibration data in there. Here is the old data:

$$ Version: 01.00 $$ Acquired Date: 21-Apr-2016 $$ Acquired Time: 16:28:48 $$ Job Code: $$ Task Code: $$ User Name: $$ Conditions: $$ Laboratory Name: $$ Solvent Delay: 0.0000 $$ Submitter: $$ SampleID: $$ Bottle Number: $$ Plate Desc: $$ Cal MS1 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Cal MS2 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Associated Datafile: $$ Cal MS1 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS1 Dynamic Params: 100,1500,0.0000,0.00,0.0,0.0,0.0,ESI_NaFormate_Pos,Commission 100-1500-2016-04-13-1tƒ` $$ Cal MS1 Fast Params: 0,0,0.0000,0.00,0.0,0.0,0.0,, $$ Cal MS2 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Dynamic Params: 0,0,0.0000,0.00,0.0,0.0,0.0,, $$ Cal MS2 Fast Params: 0,0,0.0000,0.00,0.0,0.0,0.0,, $$ Cal Time: 13:24 $$ Cal Date: 04/13/16 $$ Analog Channel 1 Offset: 0.000 $$ Analog Channel 2 Offset: 0.000 $$ Analog Channel 3 Offset: 0.000 $$ Analog Channel 4 Offset: 0.000 $$ Mux Stream: 0 $$ Cal Temperature: 0.0000000 $$ Inlet Method: $$ Inlet Prerun Method: $$ Inlet Postrun Method: $$ Inlet Switch Method: $$ HPLC Method: $$ FractionLynx Method: $$ Spare1: $$ Spare2: $$ Spare3: $$ Spare4: $$ Spare5: $$ Reinjections: 0 $$ PIC MRM Function:
$$ PIC Scan Function: 0,0 $$ ScanWave Func List: $$ Calibration File: $$ Cal Function 1: 2.474299427600910e-3,9.999812327772949e-1,-1.278036403184081e-5,4.129322409270364e-7,-5.773416196514294e-9,2.598621544438917e-11,T1 $$ Cal Function 2: 2.474299427600910e-3,9.999812327772949e-1,-1.278036403184081e-5,4.129322409270364e-7,-5.773416196514294e-9,2.598621544438917e-11,T1 $$ Cal StdDev Function 1: 0.000000000000000e0 $$ Cal StdDev Function 2: 0.000000000000000e0 $$ Cal CoVar 1: 1.545558797908783e-7,-3.525379565165780e-8,8.080755316593367e-9,3.095064573624027e-9,-7.128114705507551e-10,6.317270446689399e-11,-1.310173144526689e-10,3.030810021992309e-11,-2.698014824495288e-12,1.157240409474534e-13,2.682391506099195e-12,-6.230415575005768e-13,5.569236781992293e-14,-2.398447943141767e-15,4.990111720560640e-17,-2.131691743411582e-14,4.969583168825910e-15,-4.459043022002705e-16,1.927539368237774e-17,-4.024861063005003e-19,3.257427408895614e-21 $$ Cal CoVar 2: 1.545558797908783e-7,-3.525379565165780e-8,8.080755316593367e-9,3.095064573624027e-9,-7.128114705507551e-10,6.317270446689399e-11,-1.310173144526689e-10,3.030810021992309e-11,-2.698014824495288e-12,1.157240409474534e-13,2.682391506099195e-12,-6.230415575005768e-13,5.569236781992293e-14,-2.398447943141767e-15,4.990111720560640e-17,-2.131691743411582e-14,4.969583168825910e-15,-4.459043022002705e-16,1.927539368237774e-17,-4.024861063005003e-19,3.257427408895614e-21

Here is yours:

$$ Version: 01.00 $$ Acquired Name: 20200706_CYTC_WV600_WH18_BUN8_CV10_TEST $$ Acquired Date: 06-Jul-2020 $$ Acquired Time: 14:14:34 $$ Job Code: $$ Task Code: $$ User Name: $$ Instrument: $$ Conditions: $$ Laboratory Name: $$ Sample Description: 10 µM Cyt C in 200 mM AmAc Test mit Bunching factor 8 $$ Solvent Delay: 0.0000 $$ Submitter: $$ SampleID: $$ Bottle Number: $$ Plate Desc: $$ Cal MS1 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Cal MS2 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Associated Datafile: $$ Cal MS1 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS1 Dynamic Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS1 Fast Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Dynamic Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Fast Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal Time: 09:25 $$ Cal Date: 03/01/06 $$ Analog Channel 1 Offset: 0.000 $$ Analog Channel 2 Offset: 0.000 $$ Analog Channel 3 Offset: 0.000 $$ Analog Channel 4 Offset: 0.000 $$ Mux Stream: 0 $$ Cal Temperature: 0.0000000 $$ Inlet Method: $$ Inlet Prerun Method: $$ Inlet Postrun Method: $$ Inlet Switch Method: $$ HPLC Method: $$ MS Method: $$ Tune Method: $$ FractionLynx Method: $$ Spare1: $$ Spare2: $$ Spare3: $$ Spare4: $$ Spare5: $$ Cal Function 1: 0.000000000000000e0,1.000000000000000e0,T1 $$ Cal Function 2: 0.000000000000000e0,1.000000000000000e0,T1 $$ Cal StdDev Function 1: 0.000000000000000e0 $$ Cal StdDev Function 2: 0.000000000000000e0 $$ Cal CoVar 1: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0 $$ Cal CoVar 2: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0

Maybe try to recalibrate, save the calibration, and see if that fixes it. Beyond that, I'll need help from someone at Waters. Thanks! MTM

aretaon commented 4 years ago

Hi,

I would agree that MassLynxRaw.dll is obviously correcting the bunching in a manner CDT.dll is not able to. However, Driftscope does not handle the bunched files correctly, so I am not sure about the software-side correction for CDT.dll that you assume. The only programme that can handle the bunched files here is MassLynx.

I calibrated the bunching8.raw on the instrument and got the following in _HEADER.txt

$$ Cal Function 1: 2.034444198238601e-3,1.000067302461629e0,-7.265356427395022e-7,-3.456138702321864e-9,T1 $$ Cal Function 2: 0.000000000000000e0,1.000000000000000e0,T1 $$ Cal StdDev Function 1: 0.000000000000000e0 $$ Cal StdDev Function 2: 0.000000000000000e0 $$ Cal CoVar 1: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0 $$ Cal CoVar 2: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0

As you can see, my calibration only changed one of the calibration functions. Still, this does not improve the situation with UniDec. I then manually copied the line (as both lines were identical in your header) to serve as Cal Function 2:

$$ Cal Function 1: 2.034444198238601e-3,1.000067302461629e0,-7.265356427395022e-7,-3.456138702321864e-9,T1 $$ Cal Function 2: 2.034444198238601e-3,1.000067302461629e0,-7.265356427395022e-7,-3.456138702321864e-9,T1 $$ Cal StdDev Function 1: 0.000000000000000e0 $$ Cal StdDev Function 2: 0.000000000000000e0 $$ Cal CoVar 1: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0,0.000000000000000e0

In the end, this didn't help neither the data representation in Driftscope nor in UniDec. Thanks for your help! Julian

On 09.07.20 17:37, michaelmarty wrote:

Hi Julian, Thanks for trying these things. I think what is happening is that there is some sort of calibration that needs to be applied after the data is extracted. I think the MassLynxRaw.dll is automatically applying the calibration whereas the CDT.dll is not applying it. DriftScope must know that CDT.dll is not applying it an apply it afterwards inside it's own software. Would that make sense?

Digging into the HEADER.txt file, it looks like it is missing the calibration data. Older data that worked had actual calibration data in there. Here is the old data:

$$ Version: 01.00 $$ Acquired Date: 21-Apr-2016 $$ Acquired Time: 16:28:48 $$ Job Code: $$ Task Code: $$ User Name: $$ Conditions: $$ Laboratory Name: $$ Solvent Delay: 0.0000 $$ Submitter: $$ SampleID: $$ Bottle Number: $$ Plate Desc: $$ Cal MS1 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Cal MS2 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Associated Datafile: $$ Cal MS1 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS1 Dynamic Params: 100,1500,0.0000,0.00,0.0,0.0,0.0,ESI_NaFormate_Pos,Commission 100-1500-2016-04-13-1tƒ`� $$ Cal MS1 Fast Params: 0,0,0.0000,0.00,0.0,0.0,0.0,, $$ Cal MS2 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Dynamic Params: 0,0,0.0000,0.00,0.0,0.0,0.0,, $$ Cal MS2 Fast Params: 0,0,0.0000,0.00,0.0,0.0,0.0,, $$ Cal Time: 13:24 $$ Cal Date: 04/13/16 $$ Analog Channel 1 Offset: 0.000 $$ Analog Channel 2 Offset: 0.000 $$ Analog Channel 3 Offset: 0.000 $$ Analog Channel 4 Offset: 0.000 $$ Mux Stream: 0 $$ Cal Temperature: 0.0000000 $$ Inlet Method: $$ Inlet Prerun Method: $$ Inlet Postrun Method: $$ Inlet Switch Method: $$ HPLC Method: $$ FractionLynx Method: $$ Spare1: $$ Spare2: $$ Spare3: $$ Spare4: $$ Spare5: $$ Reinjections: 0 $$ PIC MRM Function: $$ PIC Scan Function: 0,0 $$ ScanWave Func List: $$ Calibration File: $$ Cal Function 1: 2.474299427600910e-3,9.999812327772949e-1,-1.278036403184081e-5,4.129322409270364e-7,-5.773416196514294e-9,2.598621544438917e-11,T1 $$ Cal Function 2: 2.474299427600910e-3,9.999812327772949e-1,-1.278036403184081e-5,4.129322409270364e-7,-5.773416196514294e-9,2.598621544438917e-11,T1 $$ Cal StdDev Function 1: 0.000000000000000e0 $$ Cal StdDev Function 2: 0.000000000000000e0 $$ Cal CoVar 1: 1.545558797908783e-7,-3.525379565165780e-8,8.080755316593367e-9,3.095064573624027e-9,-7.128114705507551e-10,6.317270446689399e-11,-1.310173144526689e-10,3.030810021992309e-11,-2.698014824495288e-12,1.157240409474534e-13,2.682391506099195e-12,-6.230415575005768e-13,5.569236781992293e-14,-2.398447943141767e-15,4.990111720560640e-17,-2.131691743411582e-14,4.969583168825910e-15,-4.459043022002705e-16,1.927539368237774e-17,-4.024861063005003e-19,3.257427408895614e-21 $$ Cal CoVar 2: 1.545558797908783e-7,-3.525379565165780e-8,8.080755316593367e-9,3.095064573624027e-9,-7.128114705507551e-10,6.317270446689399e-11,-1.310173144526689e-10,3.030810021992309e-11,-2.698014824495288e-12,1.157240409474534e-13,2.682391506099195e-12,-6.230415575005768e-13,5.569236781992293e-14,-2.398447943141767e-15,4.990111720560640e-17,-2.131691743411582e-14,4.969583168825910e-15,-4.459043022002705e-16,1.927539368237774e-17,-4.024861063005003e-19,3.257427408895614e-21

Here is yours:

$$ Version: 01.00 $$ Acquired Name: 20200706_CYTC_WV600_WH18_BUN8_CV10_TEST $$ Acquired Date: 06-Jul-2020 $$ Acquired Time: 14:14:34 $$ Job Code: $$ Task Code: $$ User Name: $$ Instrument: $$ Conditions: $$ Laboratory Name: $$ Sample Description: 10 µM Cyt C in 200 mM AmAc Test mit Bunching factor 8 $$ Solvent Delay: 0.0000 $$ Submitter: $$ SampleID: $$ Bottle Number: $$ Plate Desc: $$ Cal MS1 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Cal MS2 Static: 0.000000000000000e0,1.000000000000000e0,T0 $$ Associated Datafile: $$ Cal MS1 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS1 Dynamic Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS1 Fast Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Static Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Dynamic Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal MS2 Fast Params: 0,0,0.00,0.00,0.0,0.0,0.0,, $$ Cal Time: 09:25 $$ Cal Date: 03/01/06 $$ Analog Channel 1 Offset: 0.000 $$ Analog Channel 2 Offset: 0.000 $$ Analog Channel 3 Offset: 0.000 $$ Analog Channel 4 Offset: 0.000 $$ Mux Stream: 0 $$ Cal Temperature: 0.0000000 $$ Inlet Method: $$ Inlet Prerun Method: $$ Inlet Postrun Method: $$ Inlet Switch Method: $$ HPLC Method: $$ MS Method: $$ Tune Method: $$ FractionLynx Method: $$ Spare1: $$ Spare2: $$ Spare3: $$ Spare4: $$ Spare5: $$ Cal Function 1: 0.000000000000000e0,1.000000000000000e0,T1 $$ Cal Function 2: 0.000000000000000e0,1.000000000000000e0,T1 $$ Cal StdDev Function 1: 0.000000000000000e0 $$ Cal StdDev Function 2: 0.000000000000000e0 $$ Cal CoVar 1: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0 $$ Cal CoVar 2: 0.000000000000000e0,0.000000000000000e0,0.000000000000000e0

Maybe try to recalibrate, save the calibration, and see if that fixes it. Beyond that, I'll need help from someone at Waters. Thanks! MTM

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/michaelmarty/UniDec/issues/46#issuecomment-656199407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEENPF5VH6IF35RQWDW55LLR2XP2JANCNFSM4ORTZ57Q.

michaelmarty commented 4 years ago

Bummer! Sounds like a problem for Waters. Let me know if they are able to solve it. I'll be curious to see what happens. Let me know if there is anything else I can do to help. Thanks!