Metabolomics Society Forum

Software => MS-DIAL => Topic started by: joewandy on March 18, 2022, 07:27:43 AM

Title: Exporting CorrDec deconvolution results from the console app
Post by: joewandy on March 18, 2022, 07:27:43 AM
Dear Hiroshi and team,

Thank you for your hard work in developing and supporting this app. It's hugely valuable for our work. I have a problem with using MS-DIAL that I hope you could help.

Is there any way to run MS-DIAL CorrDec deconvolution from the console app and then export the identified peak list and spectra as .msp file? I would like to script MS-DIAL to process a large number of files, so it would really help if we can do this.

I saw this post http://www.metabolomics-forum.com/index.php?topic=1473.msg4376#msg4376, but that's for the GUI app. I'm not sure if it's possible from the console app?

I'm running MSDIAL ver.4.80 OSX, and below is my config file.
Code: [Select]
#Data type
MS1 data type: Centroid
MS2 data type: Centroid
Ion mode: Positive
DIA file: /path/to/AIF_MSDIAL_TEMPLATE.txt

#Data collection parameters
Retention time begin: 0
Retention time end: 100
Mass range begin: 70
Mass range end: 1100

#Centroid parameters
MS1 tolerance for centroid: 0.01
MS2 tolerance for centroid: 0.0025

#Peak detection parameters
Smoothing method: LinearWeightedMovingAverage
Smoothing level: 3
Minimum peak width: 5
Minimum peak height: 1000
Mass slice width: 0.1

#Deconvolution parameters
Sigma window value: 0.5
Amplitude cut off: 0

#Adduct list
Adduct list: [M+H]+

#MSP file and MS/MS identification setting
MSP file: /path/to/msp_file.msp
Retention time tolerance for identification: 100
Accurate ms1 tolerance for identification: 0.01
Accurate ms2 tolerance for identification: 0.05
Identification score cut off: 70

#Text file and post identification (retention time and accurate mass based) setting
#Text file:
Retention time tolerance for post identification: 0.1
Accurate ms1 tolerance for post identification: 0.01
Post identification score cut off: 85

#Alignment parameters setting
Retention time tolerance for alignment: 0.05
MS1 tolerance for alignment: 0.0015
Retention time factor for alignment: 0.5
MS1 factor for alignment: 0.5
Peak count filter: 0
QC at least filter: True

#CorrDec setting
CorrDec excute: TRUE
CorrDec MS2 tolerance: 0.01
CorrDec minimum MS2 peak height: 500
CorrDec minimum number of detected samples: 4
CorrDec exclude highly correlated spots: 0.9
CorrDec minimum correlation coefficient (MS2): 0.9
CorrDec margin 1 (target precursor): 0.1
CorrDec margin 2 (coeluted precursor): 0.1
CorrDec minimum detected rate: 0.7
CorrDec minimum MS2 relative intensity: 1
CorrDec remove peaks larger than precursor: FALSE


Any help here would be much appreciated! Thanks.

Joe
Title: Re: Exporting CorrDec deconvolution results from the console app
Post by: triston.groff on April 11, 2022, 12:29:15 PM
Hi joewandy,

I am currently doing something similar to generate an in-house AMRT spectral library, using the protocol in the SI of https://doi.org/10.3390/metabo9110251 (Tada et al, 2019). Essentially, I have created batch scripts to sort data files into compound-specific folders, then create MS-DIAL projects within the folders using the MsdialConsoleApp.exe similar to what you have shown below. MsdialConsoleApp.exe processes files on a per-folder basis, and during this process it creates *.msp2 files within the folder that may be able to be collected using a batch script and then imported to MS-FINDER using MsfinderConsoleApp.exe, but this I am unsure about. I think, though, it is best to view in the GUI even though this is tedious.

From my understanding (though I could be wrong), there are a couple of reasons it is necessary to manually inspect the results in the MS-DIAL GUI application. One is the RT correction from CorrDec; I have had times where my internal standards weren't detected for every sample and I needed to re-process. Another is that, at least for a library, you want to take a spectrum from an injection where the signal is not saturated/too low. Once you determine the optimal spectrum in the dilution series, this can be manually exported into MS-FINDER. If you don't care about choosing the optimal, it is pretty easy to export an entire peak/alignment spot table to MS-FINDER in MSP format. This does awhile, as I have 1600 project files to go through. Once the spectra are imported into MS-FINDER, they can all be exported as MSP or mgf. Maybe you know already know this though.

I had problems viewing the alignment result in the MSDIAL GUI ( v4.80 ) when opening project files created by the MsdialConsoleApp. I read somewhere on this forum that the problem began after v4.48 (starting with v4.6 ), so I started opening the project files with v4.48 GUI and had no more issues.

I have been processing my library files by first converting *.wiff files to *.mzML (performing centroiding with peakPicking ms levels 1- ), then converting the centroided *.mzML files to binary *.abf files. I have noticed that for my reverse-phase files (both *.abf and *.mzML), the data files in MS-DIAL do not have all the features that I can see in SeeMS.. even for the *.mzML files, the intensity is decreased by 10^3 or 10^4 compared to when viewing the same *.mzML files in SeeMS and all of the features are not detected in MSDIAL (I have used minimum peak intensity from 0-1000). I do not have this problem for my HILIC files, which were processed the same way. I would not have noticed this quickly without opening up the project files. Sorry to distract from your issues.. I will probably make a separate thread for this.
Title: Re: Exporting CorrDec deconvolution results from the console app
Post by: triston.groff on November 02, 2022, 08:27:32 PM
I recently replied to this thread about assigning Class ID using MsdialConsoleApp (http://www.metabolomics-forum.com/index.php?topic=1740.0), which is semi-related to this topic. Any help on the console app would be helpful to a lot of people I think, so I am attempting to link these unanswered questions.

Take care,
Triston