|
2
|
1 <tool id="2021_05_eics_centroids" name="MS .h5 or .dat -> MS-centroid" version="0.0.1">
|
|
|
2
|
|
|
3 <description> </description>
|
|
|
4
|
|
|
5 <requirements>
|
|
5
|
6 <requirement type="package" version="6.1.1">scilab</requirement>
|
|
2
|
7 </requirements>
|
|
|
8
|
|
|
9
|
|
|
10 <stdio>
|
|
|
11 <exit_code range="1:" level="fatal" />
|
|
|
12 </stdio>
|
|
|
13
|
|
|
14
|
|
|
15 <command>
|
|
|
16 <![CDATA[
|
|
|
17 $__root_dir__/packages/scilab-*/bin/scilab-cli -nb -quit -f ${script_file}
|
|
|
18 ]]>
|
|
|
19 </command>
|
|
|
20
|
|
|
21 <configfiles>
|
|
|
22 <configfile name="script_file">
|
|
|
23 <![CDATA[ exec("$__tool_directory__/src/mz_1bis_signal_threshold.sci",-1); ...
|
|
|
24 exec("$__tool_directory__/src/mz_2_barycenter_adjust2.sci",-1); ...
|
|
|
25 exec("$__tool_directory__/src/mz_2_savgol2.sci",-1); ...
|
|
|
26 exec("$__tool_directory__/src/mz_3_remove_zeros.sci",-1); ...
|
|
|
27 exec("$__tool_directory__/src/mz_eic5_step1.sci",-1); ...
|
|
|
28 exec("$__tool_directory__/src/mz_hdf5tosci.sci",-1); ...
|
|
|
29 if ~isdef('pls') then ...
|
|
|
30 atomsSystemUpdate(); ...
|
|
|
31 atomsInstall('FACT'); ...
|
|
|
32 atomsLoad('FACT'); ...
|
|
|
33 end; ...
|
|
|
34 lasterror(); ...
|
|
|
35 type_sm=${type_sm}; ...
|
|
|
36 format_io=${format_io}; ...
|
|
|
37 if type_sm==1 then ... // mode profil Orbitrap
|
|
|
38 if format_io==0 then ... // format Scilab
|
|
|
39 load("${filein}"); ... // la variable doit s'appeler res
|
|
|
40 elseif format_io==1 then ... // format HDF5
|
|
|
41 res=mz_hdf5tosci("${filein}"); ...
|
|
|
42 end; ...
|
|
|
43 resbary=mz_eic5_step1(res,${signalthresh}); ...
|
|
|
44 elseif type_sm==0 then ... // mode centroide
|
|
|
45 if format_io==0 then ... // format Scilab = on ne fait rien
|
|
|
46 load("${filein}"); ... // la variable doit deja s'appeler resbary
|
|
|
47 elseif format_io==1 then ... // format HDF5
|
|
|
48 res=mz_hdf5tosci("${filein}"); ...
|
|
|
49 resbary=mz_3_remove_zeros(res); ...
|
|
|
50 end; ...
|
|
|
51 end; ...
|
|
|
52 save("${resbary}",'resbary'); ...
|
|
|
53 if ~isempty(lasterror(%f)) then ...
|
|
|
54 write(0,lasterror()); ...
|
|
|
55 end; ]]>
|
|
|
56 </configfile>
|
|
|
57 </configfiles>
|
|
|
58
|
|
|
59
|
|
|
60 <inputs>
|
|
|
61 <param name="format_io" type="select" size="5" format="integer" label="MS format" >
|
|
|
62 <option value="0" > Scilab format .dat </option>
|
|
|
63 <option value="1" selected="true" > HDF5 format .h5 </option>
|
|
|
64 </param>
|
|
|
65 <param name="filein" format="mat,h5,dat" type="data" label="MS data" />
|
|
|
66 <param name="signalthresh" size="5" value="0" type="integer" label="Baseline threshold" help="if not applied during the spectrum acquisition" />
|
|
|
67 <param name="type_sm" type="select" size="5" format="integer" label="Mode during spectrum acquisition" help="if centroid: 0 are removed; if profile: centroids are calculated" >
|
|
|
68 <option value="0" selected="true" > Centroid </option>
|
|
|
69 <option value="1" > Profile mode with Orbitrap </option>
|
|
|
70 </param>
|
|
|
71 </inputs>
|
|
|
72
|
|
|
73
|
|
|
74 <outputs>
|
|
|
75 <data name="resbary" format="mat" label="MS-centroid" >
|
|
|
76 </data>
|
|
|
77 </outputs>
|
|
|
78
|
|
|
79
|
|
|
80 <tests>
|
|
|
81
|
|
|
82 <test>
|
|
|
83 <param name="format_io" value="0"/>
|
|
|
84 <param name="filein" value="VI2016_AC_4Areduit_1.dat"/>
|
|
|
85 <param name="signalthresh" value="0"/>
|
|
|
86 <param name="type_sm" value="1"/>
|
|
|
87 <output name="resbary" file="VI2016_AC_4Areduit_1centroide.mat" compare="sim_size" delta="2000" />
|
|
|
88 </test>
|
|
|
89
|
|
|
90 <test>
|
|
|
91 <param name="format_io" value="1"/>
|
|
|
92 <param name="filein" value="VI2016_AC_4Areduit_1.h5"/>
|
|
|
93 <param name="signalthresh" value="0"/>
|
|
|
94 <param name="type_sm" value="1"/>
|
|
|
95 <output name="resbary" file="VI2016_AC_4Areduit_1centroide.mat" compare="sim_size" delta="2000" />
|
|
|
96 </test>
|
|
|
97
|
|
|
98 </tests>
|
|
|
99
|
|
|
100
|
|
|
101 <help>
|
|
|
102
|
|
|
103
|
|
|
104 **Author** Jean-Claude Boulet (INRAE).
|
|
|
105
|
|
|
106
|
|
|
107 ---------------------------------------------------
|
|
|
108
|
|
|
109 ====================
|
|
|
110 CENTROID CALCULATION
|
|
|
111 ====================
|
|
|
112
|
|
|
113 -----------
|
|
|
114 Description
|
|
|
115 -----------
|
|
|
116
|
|
|
117
|
|
|
118 Centroids are calculated according to the reference cited below.
|
|
|
119
|
|
|
120
|
|
|
121 ------
|
|
|
122 Inputs
|
|
|
123 ------
|
|
|
124
|
|
|
125 **MS format**
|
|
|
126
|
|
|
127 Two formats are possible: HDF5 obtained from Scilab (.dat) or HDF5 obtained from MSconvert then HDFView (.h5)
|
|
|
128
|
|
|
129 The Scilab format contains a structure with two fields:
|
|
|
130
|
|
|
131 - time: the retention times, a vector;
|
|
|
132
|
|
|
133 - mzdata: a list of same length as time; each element of the list is a matrix of two columns representing a MS1 mass spectrum: m/zvalues and associated signals.
|
|
|
134
|
|
|
135 The HDF5 (.h5) file contains at least the following fields:
|
|
|
136
|
|
|
137 - ChomatogramTime: a vector containing the retention times of each mass spectrum.
|
|
|
138
|
|
|
139 - ChromatogramIndex: the indexes of the signals identified in ChomatogramTime; the last value of ChromatogramIndex is the size of ChomatogramTime.
|
|
|
140
|
|
|
141 - ChromatogramIntensity: the sum of intensities of the mass spectra associated to the RTs of ChomatogramTime; ChomatogramTime and ChromatogramIntensity are vectors of same length.
|
|
|
142
|
|
|
143 - SpectrumIndex: a vecteur of integers corresponding to the numbers of signals of each MS in SpectrumMZ et SpectrumIntensity. For example, if the two first values of SpectrumIndex are 1421 and 2887, then the first MS is between 0 à 1421, the second between 1422 and 2887. The last value of spectrumIndex is the number of values in SpectrumMZ and in SpectrumIntensity.
|
|
|
144
|
|
|
145 - SpectrumMz: the m/z values. For each mass spectrum, the first value is the real m/z value, but the following are obtained by the sum of the previous values. For example, if the three first values are: 220.0501, 0.1171 and 0.9856, then the real m/z values to be calculated will be: 220.0501, 220.1672=220.0501+0.1171, 220.2528=220.0501+0.1171+0.9856.
|
|
|
146
|
|
|
147 - SpectrumIntensity: a vector containing all the intensities recorded.
|
|
|
148
|
|
|
149 Even if the MS spectrum has been obtained with the centroid option of MSconvert, this function should be applied to remove all the zeros kept by the MSconcert peak picking option.
|
|
|
150
|
|
|
151
|
|
|
152 **MS data**
|
|
|
153
|
|
|
154 The series of mass spectra
|
|
|
155
|
|
|
156
|
|
|
157 ----------
|
|
|
158 Parameters
|
|
|
159 ----------
|
|
|
160
|
|
|
161
|
|
|
162 **Baseline threshold**
|
|
|
163
|
|
|
164 Signals under the threshold are dropped. Default value = 0.
|
|
|
165
|
|
|
166 Most of the peaks should be separated by regions with signal=0.
|
|
|
167
|
|
|
168
|
|
|
169 **Mode during spectrum acquisition**
|
|
|
170
|
|
|
171 Profile or centroid.
|
|
|
172
|
|
|
173
|
|
|
174
|
|
|
175 -------
|
|
|
176 Outputs
|
|
|
177 -------
|
|
|
178
|
|
|
179 **centroid MS data**
|
|
|
180
|
|
|
181 For each RT, the signals associated to the same m/z value have been replaced by their centroid.
|
|
|
182
|
|
|
183 The output is a structure with two fields:
|
|
|
184
|
|
|
185 - time: retention times;
|
|
|
186
|
|
|
187 - mzdata: m/z values and centroid signals.
|
|
|
188
|
|
|
189
|
|
|
190 </help>
|
|
|
191
|
|
|
192
|
|
|
193 <citations>
|
|
|
194
|
|
|
195 <citation type="bibtex">@article{sgcentroid,
|
|
|
196 title={High-resolution mass spectrometry (HRMS): focus on the m/z values estimated by the Savitzky-Golay first derivative},
|
|
|
197 author={Boulet, J.C. and Meudec, E. and Vallverdu-Queralt, A. and Cheynier, V.},
|
|
|
198 journal={Rapid Communications in Mass Spectrometry},
|
|
|
199 year={2020},
|
|
|
200 doi={10.1002/rcm.9036}
|
|
|
201 }
|
|
|
202 </citation>
|
|
|
203
|
|
|
204 </citations>
|
|
|
205
|
|
|
206
|
|
|
207 </tool>
|