Codebase list minexpert2 / 5e3c874
New upstream version 7.4.0 Filippo Rusconi (Uploading Debian Developer) 3 years ago
157 changed file(s) with 2153 addition(s) and 2184 deletion(s). Raw diff Collapse all Expand all
+123
-0
BUILD less more
0 INSTALLATION ON DEBIAN/UBUNTU
1 =============================
2
3 sudo apt install minexpert2
4
5 #optionally install the user manual (HTML and PDF formats).
6 sudo apt install minexpert2-doc
7
8
9 BUILDING MINEXPERT2
10 ===================
11
12 The mineXpert2 software build is under the control of the CMake build system.
13 There are a number of dependencies to install prior to trying to build the
14 software, as described below.
15
16
17 DEPENDENCIES
18 ============
19
20 The dependencies to be installed are listed here with package names matching the
21 packages that are in Debian/Ubuntu. In other RPM-based software, most often the
22 package names are similar, albeit with some slight differences.
23
24 # The build system
25 cmake (>= 3.12),
26
27 # For the conversion of svg files to png.
28 graphicsmagick-imagemagick-compat,
29
30 # For the parallel computations
31 libgomp1,
32
33 # For the isotopic cluster calculations
34 libisospec++-dev (>=2.1.2),
35
36 # For all the raw mass calculations like
37 # the data model, the mass spectral combinations...
38 libpappsomspp-dev (>= 0.8.8),
39 libpappsomspp-widget-dev (>= 0.8.8),
40
41 # For all the plotting
42 libqcustomplot-dev(>= 2.0),
43
44 # For the C++ objects (GUI and non-GUI)
45 qtbase5-dev (>= 5.11.3),
46 libqt5svg5-dev (>= 5.11.3),
47 qttools5-dev-tools,
48 qtchooser
49
50 # For the man page
51 docbook-to-man,
52
53 # For the documentation (optional, with -DMAKE_USER_MANUAL=1 as a flag to the
54 # cmake call, see below.
55 daps (>= 3.0.0)
56 libjeuclid-core-java,
57 libjeuclid-fop-java,
58 docbook-mathml,
59 libjs-jquery,
60 libjs-highlight.js,
61 libjs-mathjax,
62 fonts-mathjax,
63 fonts-mathjax-extras,
64 texlive-fonts-extra,
65 fonts-ebgaramond-extra,
66
67
68 GETTING THE SOURCE TARBALL
69 ==========================
70
71 In the example below, the version of the software to be installed is 7.3.0.
72 Replace that version with any latest version of interest, which can be looked
73 for at https://gitlab.com/msxpertsuite/minexpert2/-/releases.
74
75
76 Using git
77 ---------
78
79 The rather convoluted command below only downloads the branch of interest. The
80 whole git repos is very large...
81
82 git clone https://gitlab.com/msxpertsuite/minexpert2.git --branch master/7.3.0-1 --single-branch minexpert2-7.3.0
83
84 Using wget to download the tarball
85 ----------------------------------
86
87 wget https://gitlab.com/msxpertsuite/minexpert2/-/archive/7.3.0/minexpert2-7.3.0.tar.gz
88
89 Untar the tarball:
90
91 tar xvzf minexpert2-7.3.0.tar.gz
92
93 Now start using the source tree to build the software
94 -----------------------------------------------------
95
96 Change directory:
97
98 cd minexpert2-7.3.0
99
100 Create a build directory:
101
102 mkdir build
103
104 Change directory:
105
106 cd build
107
108 Configure the build:
109
110 cmake ../ -DCMAKE_BUILD_TYPE=Release
111
112 Build the software:
113
114 make
115
116 Run the software:
117
118 src/minexpert2
119
120
121
122
77 # Basic information about project
88
99 project(mineXpert2
10 DESCRIPTION "A program to visualize and mine mass spectrometric data"
10 DESCRIPTION "A program to visualize and explore mass spectrometric data"
1111 HOMEPAGE_URL "http://wwww.msxpertsuite.org/minexpert2")
1212
13 set(VERSION 7.3.0)
13 set(VERSION 7.4.0)
1414
1515 # Set additional project information
1616 set(COMPANY "msXpertSuite.org")
235235 #############################################################
236236 ####################
237237 # BUILD OF THE TESTS
238 if(TESTS)
238 if(MAKE_TESTS)
239 #MESSAGE("MAKE_TEST was set to ${MAKE_TEST}")
240 enable_testing()
241 include(CTest)
242
243 if(BUILD_TESTING)
244
239245 add_subdirectory(tests)
246
247 endif(BUILD_TESTING)
248
240249 endif()
241250
242251
5151
5252 if(PappsoMSpp_FOUND)
5353
54 message(STATUS "PappsoMSpp was found at: ${PappsoMSpp_LIBRARY}")
54 message(STATUS "PappsoMSpp and PappsoMSppWidget were found at: ${PappsoMSpp_LIBRARY}")
5555 message(STATUS "Include dir for PappsoMSpp is at: ${PappsoMSpp_INCLUDE_DIRS}")
5656
5757 endif()
192192 "directory": "/home/rusconi/devel/minexpert2/build-area/unix/src",
193193 "command": "/usr/bin/c++ -DQCUSTOMPLOT_USE_LIBRARY -DQT_CORE_LIB -DQT_GUI_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -I/home/rusconi/devel/minexpert2/build-area/unix/src -I/home/rusconi/devel/minexpert2/development/src -I/home/rusconi/devel/minexpert2/build-area/unix/src/minexpert2_autogen/include -I/home/rusconi/devel/minexpert2/build-area/unix -I/home/rusconi/devel/minexpert2/development -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/IsoSpec++ -isystem /usr/include/pappsomspp -fopenmp -g -Wno-unknown-pragmas -Wall -pedantic -Wextra -ggdb3 -fPIC -std=gnu++17 -o CMakeFiles/minexpert2.dir/nongui/ProcessingType.cpp.o -c /home/rusconi/devel/minexpert2/development/src/nongui/ProcessingType.cpp",
194194 "file": "/home/rusconi/devel/minexpert2/development/src/nongui/ProcessingType.cpp"
195 },
196 {
197 "directory": "/home/rusconi/devel/minexpert2/build-area/unix/src",
198 "command": "/usr/bin/c++ -DQCUSTOMPLOT_USE_LIBRARY -DQT_CORE_LIB -DQT_GUI_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -I/home/rusconi/devel/minexpert2/build-area/unix/src -I/home/rusconi/devel/minexpert2/development/src -I/home/rusconi/devel/minexpert2/build-area/unix/src/minexpert2_autogen/include -I/home/rusconi/devel/minexpert2/build-area/unix -I/home/rusconi/devel/minexpert2/development -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/IsoSpec++ -isystem /usr/include/pappsomspp -fopenmp -g -Wno-unknown-pragmas -Wall -pedantic -Wextra -ggdb3 -fPIC -std=gnu++17 -o CMakeFiles/minexpert2.dir/nongui/MzIntegrationParams.cpp.o -c /home/rusconi/devel/minexpert2/development/src/nongui/MzIntegrationParams.cpp",
199 "file": "/home/rusconi/devel/minexpert2/development/src/nongui/MzIntegrationParams.cpp"
200195 },
201196 {
202197 "directory": "/home/rusconi/devel/minexpert2/build-area/unix/src",
2929
3030 </dedication>
3131
32 <xi:include href="preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
33 </xi:include>
32 <!--<xi:include href="preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
33 <!--</xi:include>-->
3434
35 <xi:include href="generalities.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
36 </xi:include>
35 <!--<xi:include href="generalities.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
36 <!--</xi:include>-->
3737
3838 <xi:include href="graphical-user-interface.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
3939 </xi:include>
4141 <xi:include href="mass-data-integrations.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
4242 </xi:include>
4343
44 <xi:include href="mass-spectral-deconvolutions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
45 </xi:include>
44 <!--<xi:include href="mass-spectral-deconvolutions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
45 <!--</xi:include>-->
4646
47 <xi:include href="isotopic-cluster-computations.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
48 </xi:include>
47 <!--<xi:include href="isotopic-cluster-computations.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
48 <!--</xi:include>-->
4949
5050 <!--<xi:include href="processing-flows.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
51
52 <!--<xi:include href="record-data-mining-discoveries.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
5153 <!--</xi:include>-->
5254
53 <xi:include href="record-data-mining-discoveries.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
54 </xi:include>
55 <!--<xi:include href="gpl-3.0.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
56 <!--</xi:include>-->
5557
56 <xi:include href="gpl-3.0.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
57 </xi:include>
58
59 <xi:include href="colophon.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
60 </xi:include>
58 <!--<xi:include href="colophon.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
59 <!--</xi:include>-->
6160
6261 <!--<xi:include href="feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude">-->
6362 <!--</xi:include>-->
1717 <title>&PRODUCT; User Manual</title>
1818 <productnumber>&VERSION;</productnumber>
1919 <productname>&PRODUCT;</productname>
20 <subtitle>Visualizing, analyzing and mining of MS<superscript>n</superscript> mass spectrometric data</subtitle>
20 <subtitle>Visualization, exploration and analysis of MS<superscript>n</superscript> mass spectrometric data</subtitle>
2121 <releaseinfo>&VERSION;</releaseinfo>
2222 <date>
2323 <?dbtimestamp format="B d, Y"?>
1414 ]>
1515
1616 <chapter
17 xml:id="chap_generalities"
18 xmlns="http://docbook.org/ns/docbook" version="5.0"
19 xmlns:xlink="http://www.w3.org/1999/xlink">
20
21 <info>
22
23 <title>Generalities</title>
24
25 <keywordset>
26 <keyword>general concepts</keyword>
27 <keyword>combinations</keyword>
28 <keyword>integrations</keyword>
29 </keywordset>
30
31 </info>
32
33 <para>In this chapter, I wish to introduce some general concepts around the
34 &mineXp2; program and the way data elements are named in this manual and in
35 the program.</para>
36
37 <para>A mass spectrometry experiment generally involves monitoring the &mz;
38 value of analytes injected in the mass spectrometer along a certain time
39 duration. The &mz; value of each detected analyte is recorded along with the
40 corresponding signal intensity&nbsp;&int;, so that a mass spectrum is nothing but
41 a series of &mzi; pairs recorded along the acquisition duration. All along
42 the acquisition, the precise moment at which a given analyte is detected
43 (and its &mzi; pair is recorded), is called the retention time of that
44 analyte (&rt;). This retention time is not to be misunderstood as the drift
45 time of that analyte in an ion mobility mass spectrometry experiment.
46 </para>
47
48 <sect1>
49
50 <title>General concepts and terminologies</title>
51
52 <para> Most generally, the mass spectrometer acquires an important number of
53 spectra in, say, one second. But all these spectra are
54 <emphasis>combined</emphasis> together, and, on the surface, the massist
55 only sees a <quote>slow</quote> acquisition of 1&nbsp;spectrum per second.
56 This apparent slow acquisition rate is configurable. At the time of
57 writing, generally 1&nbsp;spectrum per second is recorded on disk. So, say
58 we record mass spectra for 5 minutes, we would have recorded
59 (5*60)&nbsp;spectra.
60 </para>
61
62 </sect1>
63
64 <sect1>
65
66 <title>Acquiring Mass Data Along Time: To Profile or Not To Profile?</title>
67
68 <para>
69 As a mass spectrometry user, the reader of this manual certainly has used mass
70 spectrometers where mass spectra are acquired and stored in different ways:
71
72 <itemizedlist>
73
74 <listitem>
75
76 <para>Mass spectra are acquired and summed&mdash;the next to the
77 previous&mdash;in such a manner that one is left, at the end of the
78 acquisition, with a single spectrum of which the various peak
79 intensities have been increasing all along the acquisition. Indeed,
80 in this mode, each new spectrum is actually
81 <emphasis><quote>combined</quote></emphasis> to the previously
82 acquired ones. The resulting mass spectrum that is displayed on
83 screen and that gets ultimately stored on disk is called a
84 <emphasis>combined spectrum</emphasis>. This is typically the way
85 MALDI-TOF mass spectrometers are used when manually acquiring data
86 from samples deposited onto sample plates. We refer to this kind of
87 acquisition as an <quote>accumulation</quote> mode
88 acquisition;</para>
89
90 </listitem>
91
92 <listitem>
93
94 <para>Mass spectra are acquired and stored on disk as a single file
95 containing all the spectra, appended one after the other. There is
96 no combination of the spectra: each time a new spectrum is displayed
97 on screen, that spectrum is appended to the
98 file.<footnote><para>Although there certainly is spectrum
99 combination going on in the guts of the software, because the
100 system actually acquires much more spectra than is visible on
101 screen and each newly displayed spectrum is actually the
102 combination of many spectra acquired under the
103 surface.</para></footnote> This is typically the case when mass
104 spectra are acquired all along a chromatography run and is
105 generally called a <emphasis><quote>profile</quote></emphasis>
106 mode acquisition. Note that this profile mode acquisition must
107 not be mistaken as the profile mass peak type that negates the
108 centroid mass peak type.</para>
109
110 </listitem>
111
112 </itemizedlist>
113
114 </para>
115
116 </sect1>
117
118 <sect1>
119
120 <title>Mass Data Visualisation: To Combine or Not To Combine?</title>
121
122 <para> In the previous section, we mentioned <emphasis>spectrum
123 combination</emphasis> a number of times. What does that mean, that
124 spectra are <emphasis><quote>combined</quote></emphasis> together into
125 a single <emphasis><quote>combined spectrum</quote></emphasis>? Say we
126 have 200&nbsp;spectra that need to be combined together into a
127 <emphasis>single</emphasis> spectrum that summatively represents the
128 data of these 200&nbsp;spectra.</para>
129
130 <para>First, a new spectrum would be allocated <emphasis>(result
131 spectrum)</emphasis>, entirely empty at first. Then, the very first
132 spectrum of the 200&nbsp;spectra is literally copied into that result
133 spectrum. At this point the combination occurs, according to an
134 iterative process that has the following steps:
135
136 <itemizedlist>
137
138 <listitem>
139
140 <para>Pick the next spectrum of the 200-spectra dataset;</para>
141
142
143 <orderedlist>
144
145 <listitem>
146
147 <para> Pick the first &mzi; pair of the currently iterated
148 spectrum;</para>
149
150 </listitem>
151
152 <listitem>
153
154 <para> Look up in the <emphasis>result spectrum</emphasis> if a
155 &mz;&nbsp;value identical to the &mz;&nbsp;value of the current
156 &mzi; pair is already present;</para>
157
158 </listitem>
159
160 <listitem>
161
162 <para> If the &mz;&nbsp;value is found, increment its intensity by
163 the intensity of the &mzi; pair;</para>
164
165 </listitem>
166
167 <listitem>
168
169 <para> Else, if the &mz;&nbsp;value is not found, add the current
170 &mzi; pair to the result spectrum;</para>
171
172 </listitem>
173
174 <listitem>
175
176 <para> Iterate over all the remaining &mzi; pairs of the current
177 spectrum and redo these steps.</para>
178
179 </listitem>
180
181 </orderedlist>
182
183 </listitem>
184
185 <listitem>
186
187 <para>Iterate over all the 198&nbsp;remaining spectra of the dataset
188 and do the steps above for each single iterated spectrum.</para>
189
190 </listitem>
191
192 </itemizedlist>
193
194 </para>
195
196 <para> At the end of the two nested loops above, the combined spectrum is
197 still a single spectrum that represents&mdash;summatively&mdash;all the
198 200 spectra. This whole process is very computing-intensive, in particular
199 if:
200
201 <itemizedlist>
202
203 <listitem>
204
205 <para> The &mz;&nbsp;range is large: there are lots of points in
206 each spectrum, which means that for each new &mzi; pair we need
207 to iterate in the long list of &mz;&nbsp;values that make the
208 result spectrum;</para>
209
210 </listitem>
211
212 <listitem>
213
214 <para> The resolving power of the mass spectrometer is high: there
215 are many points per &mz;&nbsp;range unit. </para>
216
217 </listitem>
218
219 </itemizedlist>
220
221 </para>
222
223 <para>When a profile mode acquisition is performed, the user gets an
224 innumerable number of distinct spectra, all appended to a single file.
225 These unitary spectra are virtually unusable if an initial processing is
226 not performed. This initial processing of the spectra is called
227 <emphasis><quote>total ion current chromatogram
228 calculation</quote></emphasis>. What is it? Let's say that the user
229 has performed a profile mode mass spectrometry acquisition on the eluate
230 of a chromatography column. Now, imagine that the spectrometer stores the
231 mass data at a rate of one spectrum per second and that the chromatography
232 gradient develops over 45&nbsp;min: there would be a total of (45 *
233 60)&nbsp;spectra in that file. The question is:
234 &mdash;<emphasis><quote>How can we provide the user with a data
235 representation that might be both meaningful and useful to start
236 mining the data?</quote></emphasis> The conventional way of doing so
237 is to load all the mass spectra and compute the <emphasis><quote>total ion
238 current chromatogram</quote></emphasis> (the TIC chromatogram). The
239 analogy with chromatography is evident: the TIC chromatogram is the same
240 as the UV chromatogram unless optical density is not the physical property
241 that is measured over time; instead, the amount of ions that are detected
242 in the mass spectrometer is measured over time. That amount is actually
243 the sum of the intensities of all the &mzi; pairs detected in each
244 spectrum. When mass data are acquired during a chromatography run, often,
245 the total ion current chromatogram mirrors (mimicks) the UV
246 chromatogram<footnote><para>Unless eluted analytes do absorb UV light but
247 do not either desorb/desolvate or ionize, or both.</para></footnote>.
248 For each retention time (RT) a TIC value is computed by summing the
249 intensities of all the &mzi; pairs detected at that specific RT.</para>
17 xml:id="chap_generalities"
18 xmlns="http://docbook.org/ns/docbook" version="5.0"
19 xmlns:xlink="http://www.w3.org/1999/xlink">
20
21 <info>
22
23 <title>Generalities</title>
24
25 <keywordset>
26 <keyword>general concepts</keyword>
27 <keyword>combinations</keyword>
28 <keyword>integrations</keyword>
29 </keywordset>
30
31 </info>
32
33 <para>In this chapter, I wish to introduce some general concepts around the
34 &mineXp2; program and the way data elements are named in this manual and in
35 the program.</para>
36
37 <para>A mass spectrometry experiment generally involves monitoring the &mz;
38 value of analytes injected in the mass spectrometer along a certain time
39 duration. The &mz; value of each detected analyte is recorded along with the
40 corresponding signal intensity&nbsp;&int;, so that a mass spectrum is nothing but
41 a series of &mzi; pairs recorded along the acquisition duration. All along
42 the acquisition, the precise moment at which a given analyte is detected
43 (and its &mzi; pair is recorded), is called the retention time of that
44 analyte (&rt;). This retention time is not to be misunderstood as the drift
45 time of that analyte in an ion mobility mass spectrometry experiment.
46 </para>
47
48 <sect1>
49
50 <title>General concepts and terminologies</title>
51
52 <para> Most generally, the mass spectrometer acquires an important number of
53 spectra in, say, one second. But all these spectra are
54 <emphasis>combined</emphasis> together, and, on the surface, the massist
55 only sees a <quote>slow</quote> acquisition of 1&nbsp;spectrum per second.
56 This apparent slow acquisition rate is configurable. At the time of
57 writing, generally 1&nbsp;spectrum per second is recorded on disk. So, say
58 we record mass spectra for 5 minutes, we would have recorded
59 (5*60)&nbsp;spectra.
60 </para>
61
62 </sect1>
63
64 <sect1>
65
66 <title>Acquiring Mass Data Along Time: To Profile or Not To Profile?</title>
67
68 <para>
69 As a mass spectrometry user, the reader of this manual certainly has used mass
70 spectrometers where mass spectra are acquired and stored in different ways:
71
72 <itemizedlist>
73
74 <listitem>
75
76 <para>Mass spectra are acquired and summed&mdash;the next to the
77 previous&mdash;in such a manner that one is left, at the end of the
78 acquisition, with a single spectrum of which the various peak
79 intensities have been increasing all along the acquisition. Indeed,
80 in this mode, each new spectrum is actually
81 <emphasis><quote>combined</quote></emphasis> to the previously
82 acquired ones. The resulting mass spectrum that is displayed on
83 screen and that gets ultimately stored on disk is called a
84 <emphasis>combined spectrum</emphasis>. This is typically the way
85 MALDI-TOF mass spectrometers are used when manually acquiring data
86 from samples deposited onto sample plates. We refer to this kind of
87 acquisition as an <quote>accumulation</quote> mode
88 acquisition;</para>
89
90 </listitem>
91
92 <listitem>
93
94 <para>Mass spectra are acquired and stored on disk as a single file
95 containing all the spectra, appended one after the other. There is
96 no combination of the spectra: each time a new spectrum is displayed
97 on screen, that spectrum is appended to the
98 file.<footnote><para>Although there certainly is spectrum
99 combination going on in the guts of the software, because the
100 system actually acquires much more spectra than is visible on
101 screen and each newly displayed spectrum is actually the
102 combination of many spectra acquired under the
103 surface.</para></footnote> This is typically the case when mass
104 spectra are acquired all along a chromatography run and is
105 generally called a <emphasis><quote>profile</quote></emphasis>
106 mode acquisition. Note that this profile mode acquisition must
107 not be mistaken as the profile mass peak type that negates the
108 centroid mass peak type.</para>
109
110 </listitem>
111
112 </itemizedlist>
113
114 </para>
115
116 </sect1>
117
118 <sect1>
119
120 <title>Mass Data Visualisation: To Combine or Not To Combine?</title>
121
122 <para> In the previous section, we mentioned <emphasis>spectrum
123 combination</emphasis> a number of times. What does that mean, that
124 spectra are <emphasis><quote>combined</quote></emphasis> together into
125 a single <emphasis><quote>combined spectrum</quote></emphasis>? Say we
126 have 200&nbsp;spectra that need to be combined together into a
127 <emphasis>single</emphasis> spectrum that summatively represents the
128 data of these 200&nbsp;spectra.</para>
129
130 <para>First, a new spectrum would be allocated <emphasis>(result
131 spectrum)</emphasis>, entirely empty at first. Then, the very first
132 spectrum of the 200&nbsp;spectra is literally copied into that result
133 spectrum. At this point the combination occurs, according to an
134 iterative process that has the following steps:
135
136 <itemizedlist>
137
138 <listitem>
139
140 <para>Pick the next spectrum of the 200-spectra dataset;</para>
141
142
143 <orderedlist>
144
145 <listitem>
146
147 <para> Pick the first &mzi; pair of the currently iterated
148 spectrum;</para>
149
150 </listitem>
151
152 <listitem>
153
154 <para> Look up in the <emphasis>result spectrum</emphasis> if a
155 &mz;&nbsp;value identical to the &mz;&nbsp;value of the current
156 &mzi; pair is already present;</para>
157
158 </listitem>
159
160 <listitem>
161
162 <para> If the &mz;&nbsp;value is found, increment its intensity by
163 the intensity of the &mzi; pair;</para>
164
165 </listitem>
166
167 <listitem>
168
169 <para> Else, if the &mz;&nbsp;value is not found, add the current
170 &mzi; pair to the result spectrum;</para>
171
172 </listitem>
173
174 <listitem>
175
176 <para> Iterate over all the remaining &mzi; pairs of the current
177 spectrum and redo these steps.</para>
178
179 </listitem>
180
181 </orderedlist>
182
183 </listitem>
184
185 <listitem>
186
187 <para>Iterate over all the 198&nbsp;remaining spectra of the dataset
188 and do the steps above for each single iterated spectrum.</para>
189
190 </listitem>
191
192 </itemizedlist>
193
194 </para>
195
196 <para> At the end of the two nested loops above, the combined spectrum is
197 still a single spectrum that represents&mdash;summatively&mdash;all the
198 200 spectra. This whole process is very computing-intensive, in particular
199 if:
200
201 <itemizedlist>
202
203 <listitem>
204
205 <para> The &mz;&nbsp;range is large: there are lots of points in
206 each spectrum, which means that for each new &mzi; pair we need
207 to iterate in the long list of &mz;&nbsp;values that make the
208 result spectrum;</para>
209
210 </listitem>
211
212 <listitem>
213
214 <para> The resolving power of the mass spectrometer is high: there
215 are many points per &mz;&nbsp;range unit. </para>
216
217 </listitem>
218
219 </itemizedlist>
220
221 </para>
222
223 <para>When a profile mode acquisition is performed, the user gets an
224 innumerable number of distinct spectra, all appended to a single file.
225 These unitary spectra are virtually unusable if an initial processing is
226 not performed. This initial processing of the spectra is called
227 <emphasis><quote>total ion current chromatogram
228 calculation</quote></emphasis>. What is it? Let's say that the user
229 has performed a profile mode mass spectrometry acquisition on the eluate
230 of a chromatography column. Now, imagine that the spectrometer stores the
231 mass data at a rate of one spectrum per second and that the chromatography
232 gradient develops over 45&nbsp;min: there would be a total of (45 *
233 60)&nbsp;spectra in that file. The question is:
234 &mdash;<emphasis><quote>How can we provide the user with a data
235 representation that might be both meaningful and useful to start
236 mining the data?</quote></emphasis> The conventional way of doing so
237 is to load all the mass spectra and compute the <emphasis><quote>total ion
238 current chromatogram</quote></emphasis> (the TIC chromatogram). The
239 analogy with chromatography is evident: the TIC chromatogram is the same
240 as the UV chromatogram unless optical density is not the physical property
241 that is measured over time; instead, the amount of ions that are detected
242 in the mass spectrometer is measured over time. That amount is actually
243 the sum of the intensities of all the &mzi; pairs detected in each
244 spectrum. When mass data are acquired during a chromatography run, often,
245 the total ion current chromatogram mirrors (mimicks) the UV
246 chromatogram<footnote><para>Unless eluted analytes do absorb UV light but
247 do not either desorb/desolvate or ionize, or both.</para></footnote>.
248 For each retention time (RT) a TIC value is computed by summing the
249 intensities of all the &mzi; pairs detected at that specific RT.</para>
250250
251251 <para>How is this total ion current chromatogram computed? This is an
252 iterative process: from the first spectrum (retention time value
253 0&nbsp;s), to the second spectrum (retention time value 1&nbsp;s) up to
254 the last spectrum (retention time 45&nbsp;min), the program computes the
255 sum of the intensities of all the spectrum's &mzi; pairs. That
256 computation ends up with a map that relates each RT value with the
257 corresponding TIC value. The TIC chromatogram is nothing but a plot of
258 the TIC values as a function of RT values. In that sense, it is indeed a
252 iterative process: from the first spectrum (retention time value
253 0&nbsp;s), to the second spectrum (retention time value 1&nbsp;s) up to
254 the last spectrum (retention time 45&nbsp;min), the program computes the
255 sum of the intensities of all the spectrum's &mzi; pairs. That
256 computation ends up with a map that relates each RT value with the
257 corresponding TIC value. The TIC chromatogram is nothing but a plot of
258 the TIC values as a function of RT values. In that sense, it is indeed a
259259 chromatogram.</para>
260260
261 <para>&mineXp2; works exactly in this way. When mass spectrometry data are
262 loaded from a file, the TIC chromatogram is computed and displayed. This
263 TIC chromatogram serves as the basis for the mass data mining, as
264 described in this manual. The TIC chromatogram serves as the basis for
265 spectral combinations that can be performed in various ways, and not all
266 formally <emphasis>combinations</emphasis>, which is why I prefer the term
267 <emphasis><quote>integrations</quote></emphasis>. Some of these
268 integrations are described below:
269
270 <itemizedlist>
271
272 <listitem>
273
274 <para>Integrating data from the TIC chromatogram to a single mass
275 spectrum;</para>
276
277 </listitem>
278
279 <listitem>
280
281 <para>Integrating data from the TIC chromatogram to a single drift
282 spectrum;</para>
283
284 </listitem>
285
286 </itemizedlist>
287
288 </para>
289
290 <para>Note that the reverse actions are possible (and indeed necessary for
291 a thorough data mining): selecting a region of a mass spectrum and asking
292 that the TIC chromatogram be reconstituted from there; or selecting a
293 region of a drift spectrum and asking that the TIC chromatogram be
294 reconstituted from there also. Finally, integrations may, of course, be
295 performed from a mass spectrum to a drift spectrum, and reverse.</para>
296
297 </sect1>
298
299 <sect1>
300
301 <title>Examples of Various Mass Spectral Data Integrations</title>
302
303 <para> In the sections below, the inner workings of &mineXp2; are
304 described for some exemplary mass data integrations. For example,
305 when doing ion mobility mass spectrometry data mining, it is
306 essential to be able to characterize most finely the drift time of
307 each and any analyte. Since each analyte is actually defined as one
308 or more &mzi; pairs, it is essential to be able to ask questions
309 like the following:
310
311 <itemizedlist>
312
313 <listitem>
314
315 <para>What is the drift time of the ions below this mass
316 peak?</para>
317
318 </listitem>
319
320 <listitem>
321
322 <para>What are all the drift times of all the analytes going
323 through the mobility cell for a given retention time range?</para>
324
325 </listitem>
326
327 <listitem>
328
329 <para>What are all the ions that are responsible for this
330 shoulder in the drift spectrum?</para>
331
332 </listitem>
333
334 </itemizedlist>
335
336 </para>
337
338 <sect2>
339
340 <title>TIC -> MZ integration</title>
341
342 <para>What computation does actually &mineXp2; do when a mass spectrum
343 is computed starting from a TIC chromatogram region, say between
344 retention time RT&nbsp;minute&nbsp;7 and
345 RT&nbsp;minute&nbsp;8.5?</para>
346
347 <orderedlist>
348
349 <listitem>
350
351 <para>List all the mass spectra that were acquired between RT&nbsp;7
352 and RT&nbsp;8.5. In this <emphasis>spectral set</emphasis>, there
353 might be many hundreds of spectra that match this criterion, if we
354 think that, in ion mobility mass spectrometry,
355 &ap;&thinsp;200&nbsp;spectra are acquired and stored individually
356 every second (I mean it, every 1&nbsp;s time lapse);</para>
357
358 </listitem>
359
360 <listitem>
361
362 <para> Allocate a new empty spectrum&mdash;the
363 <emphasis><quote>combined spectrum</quote></emphasis>&mdash;and
364 copy into it without modification the first spectrum of the
365 spectral set;</para>
366
367 </listitem>
368
369 <listitem xml:id="each-1-spectrum">
370
371 <para> Go to the next spectrum of the spectral
372 set and iterate into each &mzi; pair:</para>
373
374 <itemizedlist>
375
376 <listitem>
377
378 <para> Check if the &mz;&nbsp;value of the iterated pair is
379 already present in the combined spectrum. If so, increment the
380 combined spectrum's &mzi; pair's intensity value by the
381 intensity of the iterated &mzi; pair's intensity. If not, simply
382 copy the iterated &mzi; pair in the combined spectrum; </para>
383
384 </listitem>
385
386 <listitem>
387
388 <para> Iterate over all the remaining &mzi; pairs and
389 perform the same action as above.</para>
390
391 </listitem>
392
393 </itemizedlist>
394
395 </listitem>
396
397 <listitem>
398
399 <para> Iterate over all the remaining spectra of the spectral set and
400 perform step number&nbsp;<xref linkend="each-1-spectrum"/>.</para>
401
402 </listitem>
403
404 </orderedlist>
405
406 <para> &mineXp2; then displays the combined spectrum.</para>
407
408 </sect2>
409
410 <sect2>
411
412 <title>TIC -> DT integration</title>
413
414 <para> What computation does &mineXp2; actually do when a drift
415 spectrum is computed starting from a given TIC chromatogram region,
416 say between retention time RT&nbsp;minute&nbsp;7 and
417 RT&nbsp;minute&nbsp;8.5?</para>
418
419 <para> What is a drift spectrum? A drift spectrum (mobilogram) is a
420 plot where the cumulated ion current of the detected ions is plotted
421 against the drift time at which they were detected. Let's see how
422 that computation is handled in &mineXp2;:
423
424 <orderedlist>
425
426 <listitem>
427
428 <para>Create a map to store all the (drift time, intensity) pairs
429 that are to be computed below, the (dt,i) map;</para>
430
431 </listitem>
432
433 <listitem>
434
435 <para>List all the mass spectra that were acquired between
436 RT&nbsp;7 and RT&nbsp;8.5. The obtained list of mass spectra is
437 called the <emphasis><quote>spectral
438 set</quote></emphasis>;</para>
439
440 </listitem>
441
442 <listitem xml:id="each-2-spectrum">
443
444 <para>Go to the first spectrum of the spectral set and compute its
445 TIC value (sum of all the intensities of all the &mzi; pairs of
446 that spectrum). Get the drift time value at which this mass
447 spectrum was acquired. We thus have a value pair: (dt, i), that
448 is, for drift time <emphasis>dt</emphasis>, the intensity of the
449 total ion current is <emphasis>i</emphasis>;</para>
450
451 <para> At this point, we need to do a short digression: we saw
452 earlier that, at the time of this writing, one of the
453 commercial instruments on which the author of these lines does
454 his experiments stores 200&nbsp;spectra each second. These
455 200&nbsp;spectra actually correspond to the way the drift
456 cycle is divided into 200&nbsp;bin (time bins). That means
457 that in the retention time range [7&ndash;8.5], there are
458 (1.5*60) complete drift cycles. And thus there are (1.5*60)
459 spectra with drift time&nbsp;x, the same amount of spectra
460 with drift time&nbsp;y, and so on for the reminaing
461 198&nbsp;time bins. Of course, a large number of these
462 spectra might be almost empty, but these spectra are there and
463 we need to cope with them.</para>
464
465 <para>The paragraph above must thus lead to one interrogation about
466 the current (dt,i) pair: &mdash;<emphasis><quote>Has the current
467 dt value be seen before, during the previous iterations in
468 this loop?</quote></emphasis>. If not, then create the (dt, i)
469 pair and add it to the (dt,i) map; if yes, get the
470 <emphasis>dt</emphasis> element in the map and increment its
471 intensity value by the TIC value computed above;</para>
472
473 </listitem>
474
475 <listitem>
476
477 <para>Iterate over all the remaining spectra of the spectral set and
478 perform step number&nbsp;<xref linkend="each-2-spectrum"/>.</para>
479
480 </listitem>
481
482 </orderedlist>
483
484 </para>
485
486 <para> At the end of the loop above, we get a map in which each item
487 relates a given drift time with a TIC value. This can be understood
488 this way: &mdash;<emphasis><quote>For each drift time value, what is
489 the accumulated ion current of all the ions having that specific
490 drift time?</quote></emphasis>.</para>
491
492 <para>At this point, &mineXp2; displays the drift spectrum
493 (mobilogram).</para>
494
495 </sect2>
496
497 </sect1>
498
499
500 </chapter>
501
261 <para>&mineXp2; works exactly in this way. When mass spectrometry data are
262 loaded from a file, the TIC chromatogram is computed and displayed. This
263 TIC chromatogram serves as the basis for the mass data mining, as
264 described in this manual. The TIC chromatogram serves as the basis for
265 spectral combinations that can be performed in various ways, and not all
266 formally <emphasis>combinations</emphasis>, which is why I prefer the term
267 <emphasis><quote>integrations</quote></emphasis>. Some of these
268 integrations are described below:
269
270 <itemizedlist>
271
272 <listitem>
273
274 <para>Integrating data from the TIC chromatogram to a single mass
275 spectrum;</para>
276
277 </listitem>
278
279 <listitem>
280
281 <para>Integrating data from the TIC chromatogram to a single drift
282 spectrum;</para>
283
284 </listitem>
285
286 </itemizedlist>
287
288 </para>
289
290 <para>Note that the reverse actions are possible (and indeed necessary for
291 a thorough data mining): selecting a region of a mass spectrum and asking
292 that the TIC chromatogram be reconstituted from there; or selecting a
293 region of a drift spectrum and asking that the TIC chromatogram be
294 reconstituted from there also. Finally, integrations may, of course, be
295 performed from a mass spectrum to a drift spectrum, and reverse.</para>
296
297 </sect1>
298
299 <sect1>
300
301 <title>Examples of Various Mass Spectral Data Integrations</title>
302
303 <para> In the sections below, the inner workings of &mineXp2; are
304 described for some exemplary mass data integrations. For example,
305 when doing ion mobility mass spectrometry data mining, it is
306 essential to be able to characterize most finely the drift time of
307 each and any analyte. Since each analyte is actually defined as one
308 or more &mzi; pairs, it is essential to be able to ask questions
309 like the following:
310
311 <itemizedlist>
312
313 <listitem>
314
315 <para>What is the drift time of the ions below this mass
316 peak?</para>
317
318 </listitem>
319
320 <listitem>
321
322 <para>What are all the drift times of all the analytes going
323 through the mobility cell for a given retention time range?</para>
324
325 </listitem>
326
327 <listitem>
328
329 <para>What are all the ions that are responsible for this
330 shoulder in the drift spectrum?</para>
331
332 </listitem>
333
334 </itemizedlist>
335
336 </para>
337
338 <sect2>
339
340 <title>TIC -> MZ integration</title>
341
342 <para>What computation does actually &mineXp2; do when a mass spectrum
343 is computed starting from a TIC chromatogram region, say between
344 retention time RT&nbsp;minute&nbsp;7 and
345 RT&nbsp;minute&nbsp;8.5?</para>
346
347 <orderedlist>
348
349 <listitem>
350
351 <para>List all the mass spectra that were acquired between RT&nbsp;7
352 and RT&nbsp;8.5. In this <emphasis>spectral set</emphasis>, there
353 might be many hundreds of spectra that match this criterion, if we
354 think that, in ion mobility mass spectrometry,
355 &ap;&thinsp;200&nbsp;spectra are acquired and stored individually
356 every second (I mean it, every 1&nbsp;s time lapse);</para>
357
358 </listitem>
359
360 <listitem>
361
362 <para> Allocate a new empty spectrum&mdash;the
363 <emphasis><quote>combined spectrum</quote></emphasis>&mdash;and
364 copy into it without modification the first spectrum of the
365 spectral set;</para>
366
367 </listitem>
368
369 <listitem xml:id="each-1-spectrum">
370
371 <para> Go to the next spectrum of the spectral
372 set and iterate into each &mzi; pair:</para>
373
374 <itemizedlist>
375
376 <listitem>
377
378 <para> Check if the &mz;&nbsp;value of the iterated pair is
379 already present in the combined spectrum. If so, increment the
380 combined spectrum's &mzi; pair's intensity value by the
381 intensity of the iterated &mzi; pair's intensity. If not, simply
382 copy the iterated &mzi; pair in the combined spectrum; </para>
383
384 </listitem>
385
386 <listitem>
387
388 <para> Iterate over all the remaining &mzi; pairs and
389 perform the same action as above.</para>
390
391 </listitem>
392
393 </itemizedlist>
394
395 </listitem>
396
397 <listitem>
398
399 <para> Iterate over all the remaining spectra of the spectral set and
400 perform step number&nbsp;<xref linkend="each-1-spectrum"/>.</para>
401
402 </listitem>
403
404 </orderedlist>
405
406 <para> &mineXp2; then displays the combined spectrum.</para>
407
408 </sect2>
409
410 <sect2>
411
412 <title>TIC -> DT integration</title>
413
414 <para> What computation does &mineXp2; actually do when a drift
415 spectrum is computed starting from a given TIC chromatogram region,
416 say between retention time RT&nbsp;minute&nbsp;7 and
417 RT&nbsp;minute&nbsp;8.5?</para>
418
419 <para> What is a drift spectrum? A drift spectrum (mobilogram) is a
420 plot where the cumulated ion current of the detected ions is plotted
421 against the drift time at which they were detected. Let's see how
422 that computation is handled in &mineXp2;:
423
424 <orderedlist>
425
426 <listitem>
427
428 <para>Create a map to store all the (drift time, intensity) pairs
429 that are to be computed below, the (dt,i) map;</para>
430
431 </listitem>
432
433 <listitem>
434
435 <para>List all the mass spectra that were acquired between
436 RT&nbsp;7 and RT&nbsp;8.5. The obtained list of mass spectra is
437 called the <emphasis><quote>spectral
438 set</quote></emphasis>;</para>
439
440 </listitem>
441
442 <listitem xml:id="each-2-spectrum">
443
444 <para>Go to the first spectrum of the spectral set and compute its
445 TIC value (sum of all the intensities of all the &mzi; pairs of
446 that spectrum). Get the drift time value at which this mass
447 spectrum was acquired. We thus have a value pair: (dt, i), that
448 is, for drift time <emphasis>dt</emphasis>, the intensity of the
449 total ion current is <emphasis>i</emphasis>;</para>
450
451 <para> At this point, we need to do a short digression: we saw
452 earlier that, at the time of this writing, one of the
453 commercial instruments on which the author of these lines does
454 his experiments stores 200&nbsp;spectra each second. These
455 200&nbsp;spectra actually correspond to the way the drift
456 cycle is divided into 200&nbsp;bin (time bins). That means
457 that in the retention time range [7&ndash;8.5], there are
458 (1.5*60) complete drift cycles. And thus there are (1.5*60)
459 spectra with drift time&nbsp;x, the same amount of spectra
460 with drift time&nbsp;y, and so on for the reminaing
461 198&nbsp;time bins. Of course, a large number of these
462 spectra might be almost empty, but these spectra are there and
463 we need to cope with them.</para>
464
465 <para>The paragraph above must thus lead to one interrogation about
466 the current (dt,i) pair: &mdash;<emphasis><quote>Has the current
467 dt value be seen before, during the previous iterations in
468 this loop?</quote></emphasis>. If not, then create the (dt, i)
469 pair and add it to the (dt,i) map; if yes, get the
470 <emphasis>dt</emphasis> element in the map and increment its
471 intensity value by the TIC value computed above;</para>
472
473 </listitem>
474
475 <listitem>
476
477 <para>Iterate over all the remaining spectra of the spectral set and
478 perform step number&nbsp;<xref linkend="each-2-spectrum"/>.</para>
479
480 </listitem>
481
482 </orderedlist>
483
484 </para>
485
486 <para> At the end of the loop above, we get a map in which each item
487 relates a given drift time with a TIC value. This can be understood
488 this way: &mdash;<emphasis><quote>For each drift time value, what is
489 the accumulated ion current of all the ions having that specific
490 drift time?</quote></emphasis>.</para>
491
492 <para>At this point, &mineXp2; displays the drift spectrum
493 (mobilogram).</para>
494
495 </sect2>
496
497 </sect1>
498
499 <sect1>
500
501 <title>Installation of the software</title>
502
503 <para>
504
505 The installation material is available at <uri
506 type="website">http://msxpertsuite.org</uri>.
507
508 </para>
509
510 <para>
511
512 The installation of the software is extremely easy on the MS-Windows and
513 macOS platforms. In both cases, the installator programs are standard and
514 require no explanation.
515
516 </para>
517
518 <para>
519
520 The installation on GNU/Linux platforms is also extremely easy (even more
521 than in the above situations) on Debian/Ubuntu systems. &mineXp2; is
522 indeed packaged for these systems and the only command to run to install
523 it is:
524
525 </para>
526
527 <para>
528
529 <prompt>$</prompt><footnote><para>The prompt character might be
530 <keysym>%</keysym> in some shells, like
531 <application>zsh</application></para></footnote> <command>sudo apt install
532 &lt;package_name&gt;</command>
533
534 </para>
535
536 <para>
537
538 In the command above, the typical <emphasis>package_name</emphasis> is
539 in the form <filename>minexpert2</filename> for the program package and
540 <filename>minexpert2-doc</filename> for the user manual package.
541
542 </para>
543
544 <para>Once the package has been installed the program shows up in the
545 <emphasis>Science</emphasis> menu. It can also be launched from the shell
546 using the following command: </para>
547
548 <para>
549
550 <prompt>$</prompt> <command>minexpert2</command>
551
552 </para>
553
554 </sect1>
555
556 <sect1>
557
558 <title>Building the software from source</title>
559
560 <para>
561
562 The &minexp2; software build is under the control of the
563 <application>>CMake</application> build system. There are a number of
564 dependencies to install prior to trying to build the software, as
565 described below.
566
567 </para>
568
569 <sect2>
570
571 <title>The dependencies required to build &minexp2;</title>
572
573 <para>
574
575 The dependencies to be installed are listed here with package names
576 matching the packages that are in <orgname>Debian/Ubuntu</orgname>. In
577 other RPM-based software, most often the package names are similar, albeit
578 with some slight differences.
579
580 </para>
581
582 <variablelist><title>Dependencies</title>
583
584 <varlistentry>
585
586 <term>The build system</term>
587
588 <listitem>
589 <para>cmake</para>
590 </listitem>
591
592 </varlistentry>
593
594 <varlistentry>
595
596 <term>Conversion of <filename>svg</filename> files to
597 <filename>png</filename> files</term>
598
599 <listitem>
600 <para>graphicsmagick-imagemagick-compat</para>
601 </listitem>
602
603 </varlistentry>
604
605 <varlistentry>
606
607 <term>For the parallel computations</term>
608
609 <listitem>
610 <para>libgomp1</para>
611 </listitem>
612
613 </varlistentry>
614
615 <varlistentry>
616
617 <term>For the isotopic cluster calculations</term>
618
619 <listitem>
620 <para>libisospec++-dev</para>
621 </listitem>
622
623 </varlistentry>
624
625 <varlistentry>
626
627 <term>For all the raw mass calculations like the data model, the mass
628 spectral combinations…</term>
629
630 <listitem> <para>libpappsomspp-dev, libpappsomspp-widget-dev</para>
631 </listitem>
632
633 </varlistentry>
634
635 <varlistentry>
636
637 <term>For all the plotting</term>
638
639 <listitem>
640 <para>libqcustomplot-dev</para>
641 </listitem>
642
643 </varlistentry>
644
645 <varlistentry>
646
647 <term>For the C++ objects (GUI and non-GUI)</term>
648
649 <listitem> <para>qtbase5-dev, libqt5svg5-dev,
650 qttools5-dev-tools, qtchooser</para> </listitem>
651
652 </varlistentry>
653
654 <varlistentry>
655
656 <term>For the man page</term>
657
658 <listitem>
659 <para>docbook-to-man</para>
660 </listitem>
661
662 </varlistentry>
663
664 <varlistentry>
665
666 <term>For the documentation (optional, with
667 <option>-DMAKE_USER_MANUAL=1</option> as a flag to the call of
668 <application>cmake</application>, see below.)</term>
669
670 <listitem> <para>daps, libjeuclid-core-java,
671 libjeuclid-fop-java, docbook-mathml, libjs-jquery, libjs-highlight.js,
672 libjs-mathjax, fonts-mathjax, fonts-mathjax-extras, texlive-fonts-extra,
673 fonts-ebgaramond-extra</para> </listitem>
674
675 </varlistentry>
676
677 </variablelist>
678
679 </sect2>
680
681 <sect2>
682
683 <title>Getting the source tarball</title>
684
685 <para>
686
687 In the example below, the version of the software to be installed is
688 <parameter>7.3.0</parameter>. Replace that version with any latest version
689 of interest, which can be looked for at
690 https://gitlab.com/msxpertsuite/minexpert2/-/releases.
691
692 </para>
693
694 <sect3>
695
696 <title> Using git</title>
697
698 <para>The rather convoluted command below only downloads the branch of
699 interest. The whole git repos is very large&hellip;</para>
700
701 <para>
702
703 <command> git clone https://gitlab.com/msxpertsuite/minexpert2.git --branch
704 master/7.3.0-1 --single-branch minexpert2-7.3.0</command>
705
706 </para>
707
708 </sect3>
709
710 <sect3>
711
712 <title> Using wget to download the tarball</title>
713
714 <para>
715
716 <command>wget
717 https://gitlab.com/msxpertsuite/minexpert2/-/archive/7.3.0/minexpert2-7.3.0.tar.gz</command>
718
719 </para>
720
721 <para>
722
723 Untar the tarball, which creates the
724 <filename>minexpert2-7.3.0</filename> directory:
725
726 </para>
727
728 <para>
729
730 <command>tar xvzf minexpert2-7.3.0.tar.gz</command>
731
732 </para>
733
734 </sect3>
735
736 </sect2>
737
738 <sect2>
739
740 <title> Build the software</title>
741
742 <para>
743
744 <literallayout language="shell">
745
746 Change directory:
747
748 <prompt>$</prompt> <command>cd minexpert2-7.3.0</command>
749
750 Create a build directory:
751
752 <prompt>$</prompt> <command>mkdir build</command>
753
754 Change directory:
755
756 <prompt>$</prompt> <command>cd build</command>
757
758 Configure the build:
759
760 <prompt>$</prompt> <command>cmake ../ -DCMAKE_BUILD_TYPE=Release</command>
761
762 Build the software:
763
764 <prompt>$</prompt> <command>make</command>
765
766 </literallayout>
767
768 </para>
769
770 </sect2>
771
772 </sect1>
773
774 </chapter>
775
9898
9999 <title>The Window Layout</title>
100100
101 <para>The graphical interface of comprises a number of windows where data and
102 informations are displayed. When first started, the program shows the main
103 program window. Upon loading of a MS run data set from file, new windows do show up as
104 described below (see <xref linkend="fig_minexpert-whole-window-set"/>):</para>
101 <para>The graphical interface of comprises a number of windows where data
102 and informations are displayed. When first started, the program shows the
103 main program window. Upon loading of a MS run data set from file, new
104 windows do show up as described below (see <xref
105 linkend="fig_minexpert-whole-window-set"/>):</para>
105106
106107 <itemizedlist>
107108
1212
1313 <revhistory xmlns="http://docbook.org/ns/docbook" version="5.0">
1414
15 <revision>
16 <revnumber>7.0.1</revnumber>
17 <date>october 2020</date>
18 <authorinitials>fr</authorinitials>
19
20 <revremark>
15 <revision>
16 <revnumber>7.4.0</revnumber>
17 <date>december 2020</date>
18 <authorinitials>fr</authorinitials>
19
20 <revdescription>
21
22 <para>
23
24 This revision introduces updates to document the following new features.
25
26 <itemizedlist>
27
28 <listitem><para>
29
30 User-definable limitation of the number of threads usable for the
31 combination computations (good request from a reviewer of the
32 article).
33
34 </para></listitem>
35
36 <listitem><para>
37
38 GUI shortcut to the MS level to be targeted for the next
39 integration (good request from a reviewer of the article).
40
41 </para></listitem>
42
43 </itemizedlist>
44
45 </para>
46
47 <para>
48
49 Document the build and installation of the software (another good
50 request from a reviewer).
51
52 </para>
53
54 </revdescription>
55
56 </revision>
57
58 <revision>
59 <revnumber>7.0.1</revnumber>
60 <date>october 2020</date>
61 <authorinitials>fr</authorinitials>
62
63 <revremark>
2164
2265 Update of the user manual to document the new combine+ and combine-
2366 combinations features.
2467
25 </revremark>
26
27 </revision>
28
29 <revision>
30 <revnumber>7.0.0</revnumber>
31 <date>september 2020</date>
32 <authorinitials>fr</authorinitials>
33
34 <revremark>
68 </revremark>
69
70 </revision>
71
72 <revision>
73 <revnumber>7.0.0</revnumber>
74 <date>september 2020</date>
75 <authorinitials>fr</authorinitials>
76
77 <revremark>
3578
3679 Update of the user manual to document new features, in particular the
3780 MS<superscript>n</superscript> mass spectrometric data mining and new mass
3881 data plotting features.
3982
40 </revremark>
41
42 </revision>
43
44 <revision>
45 <revnumber>6.0.0</revnumber>
46 <date>january 2020</date>
47 <authorinitials>fr</authorinitials>
48
49 <revremark>
50
51 Full rewrite of the user manual to document the new mineXpert2 software
52 program. The new mineXpert2 version is a full rewrite of the previous
53 version such that it can handle MS<superscript>n</superscript> mass
54 spectrometric data. Major features were included in the new version that
55 are described in detail in this user manual.
56
57 </revremark>
58
59 </revision>
60
61 <revision>
62 <revnumber>5.8.2</revnumber>
63 <date>february 2019</date>
64 <authorinitials>fr</authorinitials>
65
66 <revremark>
67
68 Rework the IsoSpec-based isotopic clust calculations to better describe
69 the three available processes. Also, describe the new FWHM calculation
70 feature in the PeakShaperDlg.
71
72 </revremark>
73
74 </revision>
75
76 <revision>
77 <revnumber>5.8.0</revnumber>
78 <date>end january 2019</date>
79 <authorinitials>fr</authorinitials>
80
81 <revremark>
82
83 Add section to described the newly developed feature about isotopic
84 cluster calculations based on the IsoSpec library;
85
86 </revremark>
87
88 </revision>
89
90 <revision>
91 <revnumber>5.7.0</revnumber>
92 <date>beginning january 2019</date>
93 <authorinitials>fr</authorinitials>
94
95 <revremark>
96
97 Finished porting of the historical LaTeX-based documentation to the
98 DocBook/DAPS/FOP publishing system. Please, see Colophon for details;
99
100 </revremark>
101
102 </revision>
103
104 <revision>
105 <revnumber>not_set</revnumber>
106 <date>september 2018</date>
107 <authorinitials>fr</authorinitials>
108
109 <revremark>Update the document to include new features and to make fixes.
110 Insist on the fact that mineXpert reads mzML data files. </revremark>
111
112 </revision>
113
114 <revision>
115 <revnumber>not_set</revnumber>
116 <date>march 2018</date>
117 <authorinitials>fr</authorinitials>
118
119 <revremark>Update the document to include new m/z~integration features and
120 scripting capabilities.</revremark>
121
122 </revision>
123
124 <revision>
125 <revnumber>not_set</revnumber>
126 <date>december 2016</date>
127 <authorinitials>fr</authorinitials>
128
129 <revremark>Major rewriting of the document to incorporate all the new
130 features. Large chapter on the scripting of mineXpert. </revremark>
131
132 </revision>
133
134 <revision>
135 <revnumber>not_set</revnumber>
136 <date>december 2017</date>
137 <authorinitials>fr</authorinitials>
138
139 <revremark>Refactored document. First version documenting almost all the of
140 current features of the software program. </revremark>
141
142 </revision>
143
144 <revision>
145 <revnumber>not_set</revnumber>
146 <date>may 2017</date>
147 <authorinitials>fr</authorinitials>
148
149 <revremark> Refactored document. First version documenting almost all the of
150 current features of the mineXpert software program. </revremark>
151
152 </revision>
153
154 <revision>
155 <revnumber>not_set</revnumber>
156 <date>november 2016</date>
157 <authorinitials>fr</authorinitials>
158
159 <revremark>Resume writing, with new program name: mineXpert.</revremark>
160
161 </revision>
162
163 <revision>
164 <revnumber>not_set</revnumber>
165 <date>september 2016</date>
166 <authorinitials>fr</authorinitials>
167
168 <revremark>Start of writing.</revremark>
83 </revremark>
84
85 </revision>
86
87 <revision>
88 <revnumber>6.0.0</revnumber>
89 <date>january 2020</date>
90 <authorinitials>fr</authorinitials>
91
92 <revremark>
93
94 Full rewrite of the user manual to document the new mineXpert2 software
95 program. The new mineXpert2 version is a full rewrite of the previous
96 version such that it can handle MS<superscript>n</superscript> mass
97 spectrometric data. Major features were included in the new version that
98 are described in detail in this user manual.
99
100 </revremark>
101
102 </revision>
103
104 <revision>
105 <revnumber>5.8.2</revnumber>
106 <date>february 2019</date>
107 <authorinitials>fr</authorinitials>
108
109 <revremark>
110
111 Rework the IsoSpec-based isotopic clust calculations to better describe
112 the three available processes. Also, describe the new FWHM calculation
113 feature in the PeakShaperDlg.
114
115 </revremark>
116
117 </revision>
118
119 <revision>
120 <revnumber>5.8.0</revnumber>
121 <date>end january 2019</date>
122 <authorinitials>fr</authorinitials>
123
124 <revremark>
125
126 Add section to described the newly developed feature about isotopic
127 cluster calculations based on the IsoSpec library;
128
129 </revremark>
130
131 </revision>
132
133 <revision>
134 <revnumber>5.7.0</revnumber>
135 <date>beginning january 2019</date>
136 <authorinitials>fr</authorinitials>
137
138 <revremark>
139
140 Finished porting of the historical LaTeX-based documentation to the
141 DocBook/DAPS/FOP publishing system. Please, see Colophon for details;
142
143 </revremark>
144
145 </revision>
146
147 <revision>
148 <revnumber>not_set</revnumber>
149 <date>september 2018</date>
150 <authorinitials>fr</authorinitials>
151
152 <revremark>Update the document to include new features and to make fixes.
153 Insist on the fact that mineXpert reads mzML data files. </revremark>
154
155 </revision>
156
157 <revision>
158 <revnumber>not_set</revnumber>
159 <date>march 2018</date>
160 <authorinitials>fr</authorinitials>
161
162 <revremark>Update the document to include new m/z~integration features and
163 scripting capabilities.</revremark>
164
165 </revision>
166
167 <revision>
168 <revnumber>not_set</revnumber>
169 <date>december 2016</date>
170 <authorinitials>fr</authorinitials>
171
172 <revremark>Major rewriting of the document to incorporate all the new
173 features. Large chapter on the scripting of mineXpert. </revremark>
174
175 </revision>
176
177 <revision>
178 <revnumber>not_set</revnumber>
179 <date>december 2017</date>
180 <authorinitials>fr</authorinitials>
181
182 <revremark>Refactored document. First version documenting almost all the of
183 current features of the software program. </revremark>
184
185 </revision>
186
187 <revision>
188 <revnumber>not_set</revnumber>
189 <date>may 2017</date>
190 <authorinitials>fr</authorinitials>
191
192 <revremark> Refactored document. First version documenting almost all the of
193 current features of the mineXpert software program. </revremark>
194
195 </revision>
196
197 <revision>
198 <revnumber>not_set</revnumber>
199 <date>november 2016</date>
200 <authorinitials>fr</authorinitials>
201
202 <revremark>Resume writing, with new program name: mineXpert.</revremark>
203
204 </revision>
205
206 <revision>
207 <revnumber>not_set</revnumber>
208 <date>september 2016</date>
209 <authorinitials>fr</authorinitials>
210
211 <revremark>Start of writing.</revremark>
169212
170213 </revision>
171214
Binary diff not shown
160160 id="tspan831"
161161 x="392.0386"
162162 y="984.63959"
163 style="stroke-width:0.39535946px">version 7.3.0</tspan></text>
163 style="stroke-width:0.39535946px">version 7.4.0</tspan></text>
164164 </g>
165165 </svg>
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2019 Filippo Rusconi
4 * Copyright (C) 2009-2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
1616 Icon=minexpert2
1717
1818 Categories=Science;Chemistry;Biology;Qt
19 Categories[fr]=Science;Chimie;Biologie;Qt
20 Categories[it]=Scienza;Chimica;Biologia;Qt
2119
2220 Keywords=Mass spectrometry;Biology;Chemistry
2321 Keywords[fr]=Spectrométrie de masse;Biologie;Chimie
6565 #
6666 # The classes that handle the parameters for the various integrations and the
6767 # display of traces.
68 nongui/MzIntegrationParams.cpp
6968 nongui/MsFragmentationSpec.cpp
7069 #
7170 # Peak-shaping classes (Gaussian Lorentzian peak shapes).
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
5555
5656 /////////////////////// Local includes
5757 #include "Application.hpp"
58 #include "nongui/MzIntegrationParams.hpp"
58 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5959 #include "gui/MsRunDataSetTableView.hpp"
6060 #include "gui/MsRunDataSetTableViewItem.hpp"
6161 #include "gui/MsRunDataSetTableViewModel.hpp"
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
5252 #include "BasePlotCompositeWidget.hpp"
5353 #include "../nongui/MsRunDataSet.hpp"
5454 #include "../nongui/ProcessingFlow.hpp"
55 #include "../nongui/MzIntegrationParams.hpp"
55 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5656
5757
5858 namespace msxps
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
3636 /////////////////////// Qt includes
3737 #include <QMessageBox>
3838 #include <QSvgGenerator>
39 #include <QSpinBox>
3940
4041 /////////////////////// QCustomPlot
4142
8384 // to setup the ui so that the widgets are known when we use them below.
8485 m_ui.setupUi(dynamic_cast<QWidget *>(this));
8586
87 // Connect the integrate to Mz pushbutton so that we can show the MS level
88 // slider.
89
90 // connect(m_ui.msLevelSpinBox,
91 // static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
92 connect(m_ui.msLevelSpinBox,
93 QOverload<int>::of(&QSpinBox::valueChanged),
94 this,
95 &BasePlotCompositeWidget::msLevelValueChanged);
96
8697 // Construct the context menu that will be associated to the main menu push
8798 // button.
8899
99110 m_ui.pushPinPushButton->setShortcut(QKeySequence("Ctrl+T, P"));
100111 m_ui.pushPinPushButton->setToolTip("Toggle push pin status (Ctrl+T,P)");
101112
102 m_ui.keepTraceCreateNewPushButton->setToolTip("Overlay new trace onto the other(s) (Ctrl+T, O)");
113 m_ui.keepTraceCreateNewPushButton->setToolTip(
114 "Overlay new trace onto the other(s) (Ctrl+T, O)");
103115 m_ui.keepTraceCreateNewPushButton->setShortcut(QKeySequence("Ctrl+T, O"));
104116
105 m_ui.eraseTraceCreateNewPushButton->setToolTip("Replace currently selected trace(s) with new one (Ctrl+T, R)");
117 m_ui.eraseTraceCreateNewPushButton->setToolTip(
118 "Replace currently selected trace(s) with new one (Ctrl+T, R)");
106119 m_ui.eraseTraceCreateNewPushButton->setShortcut(QKeySequence("Ctrl+T, R"));
107120
108121 // The red cross pixmap plot widget closing button. Clicking this button
109122 // triggers the signal that is trapped by the containing window that then
110123 // handle the destruction of the widget.
111124
112 m_ui.closeCompositePlotWidgetPushButton->setShortcut(QKeySequence("Ctrl+P, C"));
113 m_ui.closeCompositePlotWidgetPushButton->setToolTip("Close the composite plot widget (Ctrl+P,C)");
125 m_ui.closeCompositePlotWidgetPushButton->setShortcut(
126 QKeySequence("Ctrl+P, C"));
127 m_ui.closeCompositePlotWidgetPushButton->setToolTip(
128 "Close the composite plot widget (Ctrl+P,C)");
114129 connect(
115130 m_ui.closeCompositePlotWidgetPushButton, &QPushButton::clicked, [this]() {
116131 mp_parentWnd->plotCompositeWidgetDestructionRequested(this);
146161 void
147162 BasePlotCompositeWidget::createMainMenu()
148163 {
149 //qDebug() << "ENTER";
164 // qDebug() << "ENTER";
150165
151166 if(mp_mainMenu != nullptr)
152167 delete mp_mainMenu;
220235
221236 mp_mainMenu->addAction(save_plot_to_clipboard_p);
222237
223 //qDebug() << "EXIT";
238 // qDebug() << "EXIT";
224239 }
225240
226241
244259 void
245260 BasePlotCompositeWidget::mainMenuPushButtonClicked()
246261 {
247 //qDebug() << "ENTER";
262 // qDebug() << "ENTER";
248263
249264 //// Create the contextual menu that will show when the button is clicked (see
250265 //// below).
252267 createMainMenu();
253268 m_ui.mainMenuPushButton->showMenu();
254269
255 //qDebug() << "EXIT";
270 // qDebug() << "EXIT";
256271 }
257272
258273
492507
493508
494509 void
495 BasePlotCompositeWidget::plotWidgetMouseReleaseEvent([
496 [maybe_unused]] const pappso::BasePlotContext &context)
510 BasePlotCompositeWidget::plotWidgetMouseReleaseEvent(
511 [[maybe_unused]] const pappso::BasePlotContext &context)
497512 {
498513 // qDebug();
499514
841856 ProcessingFlow *processing_flow_p =
842857 getProcessingFlowPtrForPlottable(source_plottable_p);
843858
859 // Set the default ms frag spec.
860 processing_flow_p->setDefaultMsFragmentationSpec(ms_fragmentation_spec);
861
862 qDebug() << "Now setting the MS level to the spin box.";
863
864 // Change the MS level value in the spinbox.
865 // But we need to disconnect the spin box' value changed signal, because
866 // otherwise, the msLevelValueChanged() is called and it will update the ms
867 // frag spec's ms level again.
868
869 disconnect(m_ui.msLevelSpinBox,
870 QOverload<int>::of(&QSpinBox::valueChanged),
871 this,
872 &BasePlotCompositeWidget::msLevelValueChanged);
873
874 m_ui.msLevelSpinBox->setValue(ms_fragmentation_spec.getMsLevel());
875
876 // And connect back
877 connect(m_ui.msLevelSpinBox,
878 QOverload<int>::of(&QSpinBox::valueChanged),
879 this,
880 &BasePlotCompositeWidget::msLevelValueChanged);
881
882
883 }
884
885
886 void
887 BasePlotCompositeWidget::msLevelValueChanged(int value)
888 {
889 // The user has selected a new MS level value, we need to ensure that this
890 // value is record in the MsFragmentationSpec.
891
892 qDebug() << "Value: " << value;
893
894 QCPAbstractPlottable *source_plottable_p =
895 plottableToBeUsedAsIntegrationSource();
896
897 if(source_plottable_p == nullptr)
898 {
899 QMessageBox::information(
900 this,
901 "Please select *one* trace",
902 "In order to set the MS level for the next integration, the source "
903 "graph needs to be selected.",
904 QMessageBox::StandardButton::Ok,
905 QMessageBox::StandardButton::NoButton);
906
907 return;
908 }
909
910 // Next get the processing flow for that specific graph.
911
912 ProcessingFlow *processing_flow_p =
913 getProcessingFlowPtrForPlottable(source_plottable_p);
914
915 // Now get the MsFragmentationSpec out of that ProcessingFlow.
916
917 MsFragmentationSpec ms_fragmentation_spec =
918 processing_flow_p->getDefaultMsFragmentationSpec();
919
920 // Update the value of the MS level.
921
922 ms_fragmentation_spec.setMsLevel(value);
923
844924 // And finally set the default ms frag spec.
845925 processing_flow_p->setDefaultMsFragmentationSpec(ms_fragmentation_spec);
846926 }
847927
848928
849 MzIntegrationParams
929 pappso::MzIntegrationParams
850930 BasePlotCompositeWidget::getMzIntegrationParams(
851931 const QCPAbstractPlottable *plottable_p)
852932 {
860940 // Now extract mz integration parameters from where they sit. That might
861941 // be multiple places.
862942
863 MzIntegrationParams mz_integration_params;
943 pappso::MzIntegrationParams mz_integration_params;
864944
865945 // First check if the processing flow has default mz integration params.
866946
871951 // Check if there is at least one step in the flow that has mz integration
872952 // params set.
873953
874 const MzIntegrationParams *most_recent_mz_integration_params_p =
954 const pappso::MzIntegrationParams *most_recent_mz_integration_params_p =
875955 processing_flow.mostRecentMzIntegrationParams();
876956
877957 if(most_recent_mz_integration_params_p == nullptr)
9351015 }
9361016
9371017 // Get the mz integration params for the plottable.
938 MzIntegrationParams mz_integration_params =
1018 pappso::MzIntegrationParams mz_integration_params =
9391019 getMzIntegrationParams(source_plottable_p);
9401020
9411021 // qDebug().noquote() << "Found mz integration params:"
9721052
9731053 mp_mzIntegrationParamsDlg->show();
9741054 }
975 } // namespace minexpert
1055 }
9761056
9771057
9781058 void
9791059 BasePlotCompositeWidget::mzIntegrationParamsChanged(
980 MzIntegrationParams mz_integration_params)
1060 pappso::MzIntegrationParams mz_integration_params)
9811061 {
9821062 // qDebug();
9831063
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
4444
4545 /////////////////////// pappsomspp includes
4646 #include <pappsomspp/widget/plotwidget/baseplotwidget.h>
47 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4748
4849
4950 /////////////////////// Local includes
5051 #include "ui_BasePlotCompositeWidget.h"
5152 #include "../nongui/MsRunDataSet.hpp"
5253 #include "../nongui/ProcessingFlow.hpp"
53 #include "../nongui/MzIntegrationParams.hpp"
5454 #include "../nongui/AnalysisPreferences.hpp"
55 #include "MzIntegrationParamsDlg.hpp"
5556
5657
5758 namespace msxps
6162
6263 class BasePlotWnd;
6364 class MsFragmentationSpecDlg;
64 class MzIntegrationParamsDlg;
65 //class pappso::MzIntegrationParamsDlg;
6566 class ProcessingFlowViewerDlg;
6667
6768
106107
107108 virtual void
108109 msFragmentationSpecReady(const MsFragmentationSpec &ms_fragmentation_spec);
109 void setMzIntegrationParams(const MzIntegrationParams &mz_integration_params);
110 void setMzIntegrationParams(const pappso::MzIntegrationParams &mz_integration_params);
110111
111112 public slots:
112113
123124 virtual void plottableSelectionChanged(QCPAbstractPlottable *plottable_p,
124125 bool is_selected);
125126
126 void mzIntegrationParamsChanged(MzIntegrationParams mz_integration_params);
127 void mzIntegrationParamsChanged(pappso::MzIntegrationParams mz_integration_params);
127128
128129 virtual void newTicIntensityCalculated(double tic_intensity) const;
129130 virtual void resetTicIntensity();
130131
131 MzIntegrationParams
132 pappso::MzIntegrationParams
132133 getMzIntegrationParams(const QCPAbstractPlottable *plottable_p);
133134 void msFragmentationSpecChanged(MsFragmentationSpec ms_fragmentation_spec);
134135
190191 QString craftAnalysisStanza(const pappso::BasePlotContext &context);
191192
192193 void setPlottingColor(QCPAbstractPlottable *plottable_p, const QColor &color);
194
195 void msLevelValueChanged(int value);
193196
194197 signals:
195198
485485 {
486486 // qDebug();
487487
488 MzIntegrationParams mz_integration_params;
488 pappso::MzIntegrationParams mz_integration_params;
489489
490490 MzIntegrationParamsDlg *mz_integration_params_dlg_p =
491491 new MzIntegrationParamsDlg(this, mz_integration_params, Qt::black);
509509
510510 void
511511 BasePlotWnd::mzIntegrationParamsChanged(
512 MzIntegrationParams mz_integration_params)
512 pappso::MzIntegrationParams mz_integration_params)
513513 {
514514 // We now know what are the mz integ params. We need to propagate them to all
515515 // the pinned-down widgets.
535535 // know some params like the smallest/greatest m/z bin, for example.
536536 // Then, we'll update it with the new params set here.
537537
538 MzIntegrationParams iter_mz_integration_params =
538 pappso::MzIntegrationParams iter_mz_integration_params =
539539 processing_flow_p->getDefaultMzIntegrationParams();
540540
541541 // Now modify the values according to the new settings:
554554 processing_flow_p->setDefaultMzIntegrationParams(
555555 iter_mz_integration_params);
556556
557 MzIntegrationParams mz_integration_params =
557 pappso::MzIntegrationParams mz_integration_params =
558558 processing_flow_p->getDefaultMzIntegrationParams();
559559
560560 // qDebug() << "Set the mz integration params to one plottable:"
871871 new QualifiedMassSpectrumVectorMassDataIntegratorToTicInt(
872872 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
873873
874 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
875
874876 // Ensure the mass data integrator messages are used.
875877
876878 connect(
4040
4141
4242 /////////////////////// pappsomspp includes
43 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4344
4445
4546 /////////////////////// Local includes
122123 void savePinnedPlotsToGraphicsFile();
123124
124125 void setMzIntegrationParamsForAllPlotWidgets();
125 void mzIntegrationParamsChanged(MzIntegrationParams mz_integration_params);
126 void mzIntegrationParamsChanged(pappso::MzIntegrationParams mz_integration_params);
126127
127128 void setMsFragmentationSpecForAllPlotWidgets();
128129 void msFragmentationSpecChanged(MsFragmentationSpec ms_fragmentation_spec);
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
431431 // Now we need to set the parameters of the SavGol filter.
432432
433433 // Get the mz integration params for the plottable.
434 MzIntegrationParams mz_integration_params =
434 pappso::MzIntegrationParams mz_integration_params =
435435 getMzIntegrationParams(source_plottable_p);
436436
437437 pappso::SavGolParams sav_gol_params = mz_integration_params.getSavGolParams();
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
5252 #include "BasePlotCompositeWidget.hpp"
5353 #include "../nongui/MsRunDataSet.hpp"
5454 #include "../nongui/ProcessingFlow.hpp"
55 #include "../nongui/MzIntegrationParams.hpp"
55 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5656
5757
5858 namespace msxps
6262
6363 class BaseTracePlotWnd;
6464 class MsFragmentationSpecDlg;
65 class MzIntegrationParamsDlg;
6665
6766
6867 // The BaseTracePlotCompositeWidget class is aimed at receiving QCPGraph_s, not
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
390390 // This is a multi-layer work: the graph has a ProcessingFlow associated
391391 // to it via the m_graphProcessingFlowMap. We have gotten it above.
392392
393 // Extract from it the default MzIntegrationParams:
394
395 MzIntegrationParams mz_integration_params =
393 // Extract from it the default pappso::MzIntegrationParams:
394
395 pappso::MzIntegrationParams mz_integration_params =
396396 local_processing_flow.getDefaultMzIntegrationParams();
397397
398398 // If it is not valid, then try mz integration params from the various
426426 if(m_ui.integrateToDtMzPushButton->isChecked() ||
427427 m_ui.integrateToRtMzPushButton->isChecked())
428428 {
429 mz_integration_params.setBinningType(BinningType::NONE);
429 mz_integration_params.setBinningType(pappso::BinningType::NONE);
430430 mz_integration_params.setDecimalPlaces(0);
431431 }
432432
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
152152 *mass_data_integrator_p =
153153 new QualifiedMassSpectrumVectorMassDataIntegratorToDtRtMz(
154154 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
155
156 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
155157
156158 // Ensure the mass data integrator messages are used.
157159
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4141
4242 /////////////////////// pappsomspp includes
4343 #include <pappsomspp/widget/plotwidget/driftspectraceplotwidget.h>
44 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4445
4546
4647 /////////////////////// Local includes
315316 // This is a multi-layer work: the graph has a ProcessingFlow associated
316317 // to it via the m_graphProcessingFlowMap. We have gotten it above.
317318
318 // Extract from it the default MzIntegrationParams:
319
320 MzIntegrationParams mz_integration_params =
319 // Extract from it the default pappso::MzIntegrationParams:
320
321 pappso::MzIntegrationParams mz_integration_params =
321322 local_processing_flow.getDefaultMzIntegrationParams();
322323
323324 // If it is not valid, then try mz integration params from the various
350351 // here. We need to reduce the resolution to integer resolution.
351352 if(m_ui.integrateToDtMzPushButton->isChecked())
352353 {
353 mz_integration_params.setBinningType(BinningType::NONE);
354 mz_integration_params.setBinningType(pappso::BinningType::NONE);
354355 mz_integration_params.setDecimalPlaces(0);
355356 }
356357
452453
453454 processing_step_p->newSpec(ProcessingType("DT_TO_MZ"), processing_spec_p);
454455
455 MzIntegrationParams mz_integration_params =
456 pappso::MzIntegrationParams mz_integration_params =
456457 local_processing_flow.getDefaultMzIntegrationParams();
457458
458459 // If it is not valid, then try mz integration params from the various
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
151151 QualifiedMassSpectrumVectorMassDataIntegratorToDt *mass_data_integrator_p =
152152 new QualifiedMassSpectrumVectorMassDataIntegratorToDt(
153153 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
154
155 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
154156
155157 // Ensure the mass data integrator messages are used.
156158
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
659659 if(match.hasMatch())
660660 continue;
661661
662 QStringList dataStringList = line.split("\t", QString::SkipEmptyParts);
662 QStringList dataStringList = line.split("\t", Qt::SkipEmptyParts);
663663
664664 if(dataStringList.size() <
665665 static_cast<int>(IsoSpecTableViewColumns::TOTAL_COLUMNS))
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
264264
265265 QString input_data_string = m_ui.inputDataPointsPlainTextEdit->toPlainText();
266266 QStringList input_data_string_list =
267 input_data_string.split("\n", QString::SkipEmptyParts);
267 input_data_string.split("\n", Qt::SkipEmptyParts);
268268
269269 QString line;
270270
335335
336336 QString input_data_string = m_ui.inputDataPointsPlainTextEdit->toPlainText();
337337 QStringList input_data_string_list =
338 input_data_string.split("\n", QString::SkipEmptyParts);
338 input_data_string.split("\n", Qt::SkipEmptyParts);
339339
340340 QString line;
341341
373373
374374 QString input_data_string = m_ui.inputDataPointsPlainTextEdit->toPlainText();
375375 QStringList input_data_string_list =
376 input_data_string.split("\n", QString::SkipEmptyParts);
376 input_data_string.split("\n", Qt::SkipEmptyParts);
377377
378378 // The stratey is to convert each line into a DataPoint object that is
379379 // appended to a vector. Then, the vector is sorted on the basis of the
807807 }
808808
809809 m_mzIntegrationParams =
810 MzIntegrationParams(minMz,
810 pappso::MzIntegrationParams(minMz,
811811 maxMz,
812 BinningType::ARBITRARY,
812 pappso::BinningType::ARBITRARY,
813813 -1,
814814 pappso::PrecisionFactory::getDaltonInstance(binSize),
815815 false,
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4444 /////////////////////// pappsomspp includes
4545 #include <pappsomspp/trace/trace.h>
4646 #include <pappsomspp/trace/maptrace.h>
47 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4748
4849
4950 /////////////////////// Local includes
5051 #include "ui_MassPeakShaperDlg.h"
5152 #include "../nongui/MassPeakShaper.hpp"
5253 #include "../nongui/MassPeakShaperConfig.hpp"
53 #include "../nongui/MzIntegrationParams.hpp"
5454
5555
5656 namespace msxps
8989
9090 pappso::MapTrace m_mapTrace;
9191
92 MzIntegrationParams m_mzIntegrationParams;
92 pappso::MzIntegrationParams m_mzIntegrationParams;
9393
9494 // Each (m/z,i) pair (the i is in fact a probability that can later be
9595 // converted to a relative intensity) in the text edit widget will be
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
949949 // This is a multi-layer work: the graph has a ProcessingFlow associated
950950 // to it via the m_graphProcessingFlowMap. We have gotten it above.
951951
952 // Extract from it the default MzIntegrationParams:
953
954 MzIntegrationParams mz_integration_params =
952 // Extract from it the default pappso::MzIntegrationParams:
953
954 pappso::MzIntegrationParams mz_integration_params =
955955 local_processing_flow.getDefaultMzIntegrationParams();
956956
957957 // If it is not valid, then try mz integration params from the various
986986 if(m_ui.integrateToDtMzPushButton->isChecked() ||
987987 m_ui.integrateToRtMzPushButton->isChecked())
988988 {
989 mz_integration_params.setBinningType(BinningType::NONE);
989 mz_integration_params.setBinningType(pappso::BinningType::NONE);
990990 mz_integration_params.setDecimalPlaces(0);
991991 }
992992
11521152 // Since we are asked that an integration to a mass spectrum be
11531153 // performed, there must be a non-nullptr mz integration pointer in
11541154 // the step.
1155 const MzIntegrationParams *mz_integration_params_p =
1155 const pappso::MzIntegrationParams *mz_integration_params_p =
11561156 processing_flow.mostRecentMzIntegrationParams();
11571157
11581158 if(mz_integration_params_p == nullptr)
11611161 "integration "
11621162 "params are not available in the processing flow.");
11631163
1164 if(mz_integration_params_p->getBinningType() == BinningType::NONE)
1164 if(mz_integration_params_p->getBinningType() == pappso::BinningType::NONE)
11651165 {
11661166 pappso::TraceMinusCombiner trace_minus_combiner;
11671167 pappso::TracePlusCombiner trace_plus_combiner;
12291229 }
12301230 }
12311231 else if(mz_integration_params_p->getBinningType() ==
1232 BinningType::ARBITRARY)
1232 pappso::BinningType::ARBITRARY)
12331233 {
12341234 pappso::MassSpectrumMinusCombiner mass_spectrum_minus_combiner;
12351235 pappso::MassSpectrumPlusCombiner mass_spectrum_plus_combiner;
12431243 // flow we get as parameters. Make a copy of them as we'll need
12441244 // to set the mz smallest and greatest values to them.
12451245
1246 const MzIntegrationParams *mz_integration_params_p =
1246 const pappso::MzIntegrationParams *mz_integration_params_p =
12471247 processing_flow.mostRecentMzIntegrationParams();
12481248
12491249 if(mz_integration_params_p == nullptr)
12511251 "Pointer to the returned mz integration parameters cannot be "
12521252 "nullptr.");
12531253
1254 MzIntegrationParams copy_mz_integration_params =
1254 pappso::MzIntegrationParams copy_mz_integration_params =
12551255 *processing_flow.mostRecentMzIntegrationParams();
12561256
12571257 // Because we are making an integration to a mass spectrum plot
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
195195
196196 #if 0
197197 // NO BINNING
198 MzIntegrationParams mz_integration_params(
198 pappso::MzIntegrationParams mz_integration_params(
199199 std::numeric_limits<double>::max(), // smallest m/z
200200 std::numeric_limits<double>::min(), // greatest m/z
201 BinningType::NONE,
201 pappso::BinningType::NONE,
202202 -1, // decimal_places
203203 pappso::PrecisionFactory::getDaltonInstance(0.05),
204204 false, // apply_mz_shift
207207 #endif
208208 #if 0
209209 // ARBITRARY BINNING
210 MzIntegrationParams mz_integration_params(
210 pappso::MzIntegrationParams mz_integration_params(
211211 std::numeric_limits<double>::max(),
212212 std::numeric_limits<double>::min(),
213 BinningType::ARBITRARY,
213 pappso::BinningType::ARBITRARY,
214214 -1,
215215 // pappso::PrecisionFactory::getDaltonInstance(0.05),
216216 pappso::PrecisionFactory::getDaltonInstance(0.1),
231231 // integration params.
232232
233233 // Set aside an object for later use.
234 const MzIntegrationParams *mz_integration_params_p =
234 const pappso::MzIntegrationParams *mz_integration_params_p =
235235 processing_flow.mostRecentStep()->getMzIntegrationParamsPtr();
236236
237237 if(mz_integration_params_p == nullptr || !mz_integration_params_p->isValid())
495495 // integration params.
496496
497497 // Set aside an object for later use.
498 const MzIntegrationParams *mz_integration_params_p =
498 const pappso::MzIntegrationParams *mz_integration_params_p =
499499 processing_flow.mostRecentStep()->getMzIntegrationParamsPtr();
500500
501501 if(mz_integration_params_p == nullptr || !mz_integration_params_p->isValid())
521521 QualifiedMassSpectrumVectorMassDataIntegratorToMz *mass_data_integrator_p =
522522 new QualifiedMassSpectrumVectorMassDataIntegratorToMz(
523523 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
524
525 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
524526
525527 // Ensure the mass data integrator messages are used.
526528
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11021102 // single-element list containing this string.
11031103
11041104 QStringList mz_value_string_list(
1105 data.split(';', QString::SkipEmptyParts));
1105 data.split(';', Qt::SkipEmptyParts));
11061106
11071107 if(!mz_value_string_list.isEmpty())
11081108 {
12121212 // single-element list containing this string.
12131213
12141214 QStringList cell_data_z_value_string_list(
1215 cell_data.split(';', QString::SkipEmptyParts));
1215 cell_data.split(';', Qt::SkipEmptyParts));
12161216
12171217 if(!cell_data_z_value_string_list.isEmpty())
12181218 {
13231323 // single-element list containing this string.
13241324
13251325 QStringList z_value_list_left(
1326 leftData.toString().split(';', QString::SkipEmptyParts));
1326 leftData.toString().split(';', Qt::SkipEmptyParts));
13271327
13281328 // qDebug() << "left_value_string_list:" << z_value_list_left;
13291329
13351335 // qDebug() << "left_value_string:" << left_value_string;
13361336
13371337 QStringList z_value_list_right(
1338 rightData.toString().split(';', QString::SkipEmptyParts));
1338 rightData.toString().split(';', Qt::SkipEmptyParts));
13391339
13401340 if(z_value_list_right.isEmpty())
13411341 return false;
13891389 // single-element list containing this string.
13901390
13911391 QStringList mz_value_list_left(
1392 leftData.toString().split(';', QString::SkipEmptyParts));
1392 leftData.toString().split(';', Qt::SkipEmptyParts));
13931393
13941394 // qDebug() << "left_value_string_list:" << mz_value_list_left;
13951395
14011401 // qDebug() << "left_value_string:" << left_value_string;
14021402
14031403 QStringList mz_value_list_right(
1404 rightData.toString().split(';', QString::SkipEmptyParts));
1404 rightData.toString().split(';', Qt::SkipEmptyParts));
14051405
14061406 if(mz_value_list_right.isEmpty())
14071407 return false;
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
410410
411411 void
412412 MsRunDataSetTableViewWnd::mzIntegrationParamsChanged(
413 MzIntegrationParams mz_integration_params)
413 pappso::MzIntegrationParams mz_integration_params)
414414 {
415415 // qDebug().noquote() << "The validated mz integration parameters:"
416416 //<< mz_integration_params.toString();
420420 // ms run data set upon creation of this window.
421421
422422 // Create a local copy of the processing flow's default mz integration params.
423 MzIntegrationParams local_mz_integration_params =
423 pappso::MzIntegrationParams local_mz_integration_params =
424424 m_processingFlow.getDefaultMzIntegrationParams();
425425
426426 // Update some of the values with the params after change.
4545 #include <pappsomspp/msrun/msrundatasettree.h>
4646 #include <pappsomspp/massspectrum/qualifiedmassspectrum.h>
4747 #include <pappsomspp/widget/precisionwidget/precisionwidget.h>
48 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4849
4950
5051 /////////////////////// Local includes
5354 #include "MsRunDataSetTableViewModel.hpp"
5455 #include "MsRunDataSetTableViewProxyModel.hpp"
5556 #include "../nongui/MsRunDataSet.hpp"
56 #include "../nongui/MzIntegrationParams.hpp"
5757 #include "../nongui/ProcessingFlow.hpp"
58 #include "MzIntegrationParamsDlg.hpp"
5859
5960
6061 namespace msxps
6667 class MsRunDataSet;
6768 class ProgramWindow;
6869 class MsFragmentationSpecDlg;
69 class MzIntegrationParamsDlg;
7070
7171
7272 class MsRunDataSetTableViewWnd : public QMainWindow
9292 void executeFilteringPushButtonClicked();
9393
9494 void showMzIntegrationParamsDlg();
95 void mzIntegrationParamsChanged(MzIntegrationParams mz_integration_params);
95 void mzIntegrationParamsChanged(pappso::MzIntegrationParams mz_integration_params);
9696
9797 public slots:
9898
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
6565
6666 MzIntegrationParamsDlg::MzIntegrationParamsDlg(
6767 QWidget *parent,
68 const MzIntegrationParams &mz_integration_params,
68 const pappso::MzIntegrationParams &mz_integration_params,
6969 const QColor &color)
7070 : QDialog(parent),
7171 m_mzIntegrationParams(mz_integration_params),
161161 m_ui.arbitraryBinningRadioButton->setChecked(true);
162162 });
163163
164 m_ui.noBinningRadioButton->setChecked(m_mzIntegrationParams.m_binningType ==
165 BinningType::NONE);
164 m_ui.noBinningRadioButton->setChecked(m_mzIntegrationParams.getBinningType() ==
165 pappso::BinningType::NONE);
166166 m_ui.arbitraryBinningRadioButton->setChecked(
167 m_mzIntegrationParams.m_binningType == BinningType::ARBITRARY);
167 m_mzIntegrationParams.getBinningType() == pappso::BinningType::ARBITRARY);
168168
169169 connect(m_ui.arbitraryBinningRadioButton,
170170 &QRadioButton::toggled,
171171 [this](bool checked) { mp_precisionWidget->setEnabled(checked); });
172172
173173 m_ui.removeZeroValueCheckBox->setCheckState(
174 m_mzIntegrationParams.m_removeZeroValDataPoints ? Qt::Checked
174 m_mzIntegrationParams.isRemoveZeroValDataPoints() ? Qt::Checked
175175 : Qt::Unchecked);
176176
177177 /********* Savitzky-Golay parameters **********/
179179 m_ui.savitzkyGolayGroupBox->setChecked(
180180 m_mzIntegrationParams.isApplySavGolFilter());
181181
182 m_ui.nlSpinBox->setValue(m_mzIntegrationParams.m_savGolParams.nL);
183 m_ui.nrSpinBox->setValue(m_mzIntegrationParams.m_savGolParams.nR);
184 m_ui.mSpinBox->setValue(m_mzIntegrationParams.m_savGolParams.m);
185 m_ui.ldSpinBox->setValue(m_mzIntegrationParams.m_savGolParams.lD);
182 m_ui.nlSpinBox->setValue(m_mzIntegrationParams.getSavGolParams().nL);
183 m_ui.nrSpinBox->setValue(m_mzIntegrationParams.getSavGolParams().nR);
184 m_ui.mSpinBox->setValue(m_mzIntegrationParams.getSavGolParams().m);
185 m_ui.ldSpinBox->setValue(m_mzIntegrationParams.getSavGolParams().lD);
186186
187187 connect(m_ui.applyPushButton,
188188 &QPushButton::clicked,
201201 if(radioButton == m_ui.noBinningRadioButton)
202202 {
203203 if(checked == true)
204 m_mzIntegrationParams.m_binningType = BinningType::NONE;
204 m_mzIntegrationParams.setBinningType(pappso::BinningType::NONE);
205205 }
206206 else if(radioButton == m_ui.arbitraryBinningRadioButton)
207207 {
208208 if(checked == true)
209 m_mzIntegrationParams.m_binningType = BinningType::ARBITRARY;
209 m_mzIntegrationParams.setBinningType(pappso::BinningType::ARBITRARY);
210210 }
211211 else
212212 qFatal("Programming error.");
221221
222222
223223 void
224 MzIntegrationParamsDlg::setBinningType(BinningType binningType)
225 {
226 if(binningType == BinningType::NONE)
224 MzIntegrationParamsDlg::setBinningType(pappso::BinningType binningType)
225 {
226 if(binningType == pappso::BinningType::NONE)
227227 m_ui.noBinningRadioButton->setChecked(true);
228 else if(binningType == BinningType::ARBITRARY)
228 else if(binningType == pappso::BinningType::ARBITRARY)
229229 m_ui.arbitraryBinningRadioButton->setChecked(true);
230230 else
231231 qFatal("Programming error.");
282282 // qDebug();
283283
284284 // We need to check all the widgets, extract their information and then craft
285 // a MzIntegrationParams instance that we'll pass to any widget (the trace
285 // a pappso::MzIntegrationParams instance that we'll pass to any widget (the trace
286286 // plot composite widget) that might be listening. We make a new instance by
287287 // copying the member instance because that member instance has data that are
288288 // not configured in this dialog. We would loose those data if we created a
289289 // default mz integration params instance.
290290
291 MzIntegrationParams mz_integration_params(m_mzIntegrationParams);
291 pappso::MzIntegrationParams mz_integration_params(m_mzIntegrationParams);
292292
293293 // qDebug().noquote() << "Before reading all the widgets' values::"
294294 //<< mz_integration_params.toString();
295295
296296 if(m_ui.noBinningRadioButton->isChecked())
297 mz_integration_params.m_binningType = BinningType::NONE;
297 mz_integration_params.setBinningType(pappso::BinningType::NONE);
298298 else if(m_ui.arbitraryBinningRadioButton->isChecked())
299 mz_integration_params.m_binningType = BinningType::ARBITRARY;
299 mz_integration_params.setBinningType(pappso::BinningType::ARBITRARY);
300300
301301 mz_integration_params.setPrecision(mp_precision);
302302
303303 mz_integration_params.setDecimalPlaces(m_ui.decimalPlacesSpinBox->value());
304304
305 mz_integration_params.m_removeZeroValDataPoints =
306 m_ui.removeZeroValueCheckBox->isChecked();
305 mz_integration_params.setRemoveZeroValDataPoints(m_ui.removeZeroValueCheckBox->isChecked());
307306
308307 if(m_ui.savitzkyGolayGroupBox->isChecked())
309308 {
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4747
4848 /////////////////////// Local includes
4949 #include "ui_MzIntegrationParamsDlg.h"
50 #include "../nongui/MzIntegrationParams.hpp"
50 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5151
5252
5353 namespace msxps
6363 public:
6464 MzIntegrationParamsDlg(QWidget *parent = nullptr);
6565 MzIntegrationParamsDlg(QWidget *parent,
66 const MzIntegrationParams &mz_integration_params,
66 const pappso::MzIntegrationParams &mz_integration_params,
6767 const QColor &color);
6868 ~MzIntegrationParamsDlg();
6969
7373 void keyPressEvent(QKeyEvent *event);
7474
7575 void show();
76 void setBinningType(BinningType binningType);
76 void setBinningType(pappso::BinningType binningType);
7777 void setBinSizePrecisionPtr(pappso::PrecisionPtr bin_size_precsion_p);
7878 void setDecimalPlaces(int decimal_places);
7979 void setRemoveZeroValDataPoints(bool apply);
8787 void binningRadioButtonToggled(bool checked);
8888
8989 signals:
90 void mzIntegrationParamsChangedSignal(MzIntegrationParams params);
90 void mzIntegrationParamsChangedSignal(pappso::MzIntegrationParams params);
9191 void mzIntegrationParamsDlgShouldBeDestroyedSignal();
9292
9393 protected:
9494 Ui::MzIntegrationParamsDlg m_ui;
95 MzIntegrationParams m_mzIntegrationParams;
95 pappso::MzIntegrationParams m_mzIntegrationParams;
9696 pappso::PrecisionWidget *mp_precisionWidget;
9797 pappso::PrecisionPtr mp_precision =
9898 pappso::PrecisionFactory::getDaltonInstance(0.05);
662662 std::vector<MsRunDataSetCstSPtr> vector_of_ms_run_data_set_csp;
663663
664664 QList<QListWidgetItem *> item_list =
665 m_ui.openMsRunDataSetsListWidget->findItems(".*", Qt::MatchRegExp);
665 m_ui.openMsRunDataSetsListWidget->findItems(".*", Qt::MatchRegularExpression);
666666
667667 for(int iter = 0; iter < item_list.size(); ++iter)
668668 {
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
6565 #include "MsRunDataSetTableViewProxyModel.hpp"
6666 #include "../nongui/globals.hpp"
6767 #include "MsRunReadTask.hpp"
68 #include "../nongui/MzIntegrationParams.hpp"
68 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
6969 #include "../nongui/MassDataIntegrator.hpp"
7070 #include "ColorSelector.hpp"
7171 #include "MsRunSelectorDlg.hpp"
426426
427427 mp_utilitiesMenu->addAction(action_p);
428428
429
430 // Preferences menu
431 mp_preferencesMenu = menuBar()->addMenu("&Preferences");
432
433 action_p =
434 new QAction("Set max. thread count", dynamic_cast<QObject *>(this));
435 action_p->setStatusTip("Set the maximum number of threads to be used for the integrations");
436 action_p->setShortcut(tr("Ctrl+P, T"));
437
438 connect(
439 action_p, &QAction::triggered, [this]()
440 {
441 std::size_t ideal_thread_count = QThread::idealThreadCount();
442
443 m_maxThreadUseCount = QInputDialog::getInt(this, "Set max. thread count",
444 "Count", ideal_thread_count, 1, ideal_thread_count, 1);
445
446 //qDebug() << "Set the max. thread use count to : " << m_maxThreadUseCount;
447 });
448
449 mp_preferencesMenu->addAction(action_p);
450
451
429452 // Help menu
430453 mp_helpMenu = menuBar()->addMenu("&Help");
431454
477500 dlg->show();
478501
479502 return dlg;
503 }
504
505
506 void
507 ProgramWindow::setMaxThreadUseCount(std::size_t count)
508 {
509 m_maxThreadUseCount = count;
510 }
511
512
513 std::size_t
514 ProgramWindow::getMaxThreadUseCount()
515 {
516 return m_maxThreadUseCount;
480517 }
481518
482519
13721409 new QualifiedMassSpectrumVectorMassDataIntegratorToRt(
13731410 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp);
13741411
1412 mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount);
1413
13751414 MassDataIntegratorTask *mass_data_integrator_task_p =
13761415 new MassDataIntegratorTask();
13771416
15601599 ms_run_data_set_csp,
15611600 processing_flow,
15621601 vector_of_qualified_mass_spectra_sp);
1602
1603 mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount);
15631604
15641605 MassDataIntegratorTask *mass_data_integrator_task_p =
15651606 new MassDataIntegratorTask();
17301771 new QualifiedMassSpectrumVectorMassDataIntegratorToMz(
17311772 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp);
17321773
1774 mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount);
1775
17331776 // qDebug() << "Receiving processing flow:" << processing_flow.toString();
17341777
17351778 MassDataIntegratorTask *mass_data_integrator_task_p =
19191962 new QualifiedMassSpectrumVectorMassDataIntegratorToTicInt(
19201963 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp);
19211964
1965 mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount);
1966
19221967 MassDataIntegratorTask *mass_data_integrator_task_p =
19231968 new MassDataIntegratorTask();
19241969
21142159 *mass_data_integrator_p =
21152160 new QualifiedMassSpectrumVectorMassDataIntegratorToDtRtMz(
21162161 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp);
2162
2163 mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount);
21172164
21182165 MassDataIntegratorTask *mass_data_integrator_task_p =
21192166 new MassDataIntegratorTask();
23752422 new QualifiedMassSpectrumVectorMassDataIntegratorToRtDt(
23762423 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp);
23772424
2425 mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount);
2426
23782427 MassDataIntegratorTask *mass_data_integrator_task_p =
23792428 new MassDataIntegratorTask();
23802429
124124 virtual ~ProgramWindow();
125125
126126 const QString &moduleName() const;
127
128 void setMaxThreadUseCount(std::size_t count);
129 std::size_t getMaxThreadUseCount();
127130
128131 bool openMassSpectrometryFileDlg(const QString &dir_name = QDir::homePath(),
129132 bool full_in_memory = false);
324327 *mass_data_integrator_p);
325328
326329 void integrateQualifiedMassSpectrumVectorToRtDtSignal(
327 QualifiedMassSpectrumVectorMassDataIntegratorToRtDt
328 *mass_data_integrator_p,
330 QualifiedMassSpectrumVectorMassDataIntegratorToRtDt *mass_data_integrator_p,
329331 pappso::DataKind data_kind);
330332
331333 void integrateQualifiedMassSpectrumVectorToDtRtMzSignal(
347349
348350 int m_selectedMsRunIndex = -1;
349351
352 // The user can limit the max number of threads to use. 0 is no limitation
353 // (all the available threads are going to be used).
354 std::size_t m_maxThreadUseCount = 0;
355
350356 // We need to track all the plot widgets and plottables. This tree aims at
351357 // storing the structure of all the plottables in all the plot widgets, in all
352358 // the windows, for all the ms run data sets.
363369 MassSpecTracePlotWnd *mp_massSpecPlotWnd = nullptr;
364370 DriftSpecTracePlotWnd *mp_driftSpecPlotWnd = nullptr;
365371
366 DriftSpecMassSpecColorMapWnd *mp_driftSpecMassSpecColorMapWnd = nullptr;
367 TicXicChromMassSpecColorMapWnd *mp_ticXicChromMassSpecColorMapWnd = nullptr;
372 DriftSpecMassSpecColorMapWnd *mp_driftSpecMassSpecColorMapWnd = nullptr;
373 TicXicChromMassSpecColorMapWnd *mp_ticXicChromMassSpecColorMapWnd = nullptr;
368374 TicXicChromDriftSpecColorMapWnd *mp_ticXicChromDriftSpecColorMapWnd = nullptr;
369375
370376 XicExtractionWnd *mp_xicExtractionWnd = nullptr;
397403 QMenu *mp_fileMenu = nullptr;
398404 QMenu *mp_windowsMenu = nullptr;
399405 QMenu *mp_utilitiesMenu = nullptr;
406 QMenu *mp_preferencesMenu = nullptr;
400407 QMenu *mp_helpMenu = nullptr;
401408 QAction *mp_openFullMsFileAct = nullptr;
402409 QAction *mp_openStreamedMsFileAct = nullptr;
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
402402
403403 {
404404
405 //#if 0
405 bool result = true;
406
407 //#if 0
406408 std::chrono::time_point<std::chrono::system_clock> now =
407409 std::chrono::system_clock::now();
408410
412414 if(time_lag.count() >= m_timeLag)
413415 {
414416 m_lastTimePoint = now;
415 return true;
416 }
417
418 return false;
419 //#endif
420
421 // return true;
417 result = true;
418 }
419
420 //qDebug() << "Returning:" << result;
421 //#endif
422
423 return result;
422424 }
423425
424426
557559 void
558560 TaskMonitorCompositeWidget::setStatusText(QString text)
559561 {
562 //qDebug() << "m_isLocked:" << m_isLocked << "shouldUpdate:" << shouldUpdate();
563
560564 if(!m_isLocked && shouldUpdate())
561565 m_ui.statusLineEdit->setText(text);
562566 }
673677 return text;
674678 }
675679
676 QStringList string_list = text.split("%c", QString::KeepEmptyParts);
680 QStringList string_list = text.split("%c", Qt::KeepEmptyParts);
677681
678682 QString new_text;
679683
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
134134 // Start with an unlocked widget.
135135 bool m_isLocked = false;
136136
137 double m_timeLag = 100; /* milliseconds */
137 double m_timeLag = 50; /* milliseconds */
138138 std::chrono::system_clock::time_point m_lastTimePoint;
139139 double m_currentValue = 0;
140140 QString craftStringIfFormattedText(const QString &text) const;
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
405405 // This is a multi-layer work: the graph has a ProcessingFlow associated
406406 // to it via the m_graphProcessingFlowMap. We have gotten it above.
407407
408 // Extract from it the default MzIntegrationParams:
409
410 MzIntegrationParams mz_integration_params =
408 // Extract from it the default pappso::MzIntegrationParams:
409
410 pappso::MzIntegrationParams mz_integration_params =
411411 local_processing_flow.getDefaultMzIntegrationParams();
412412
413413 // If it is not valid, then try mz integration params from the various
441441 if(m_ui.integrateToDtMzPushButton->isChecked() ||
442442 m_ui.integrateToRtMzPushButton->isChecked())
443443 {
444 mz_integration_params.setBinningType(BinningType::NONE);
444 mz_integration_params.setBinningType(pappso::BinningType::NONE);
445445 mz_integration_params.setDecimalPlaces(0);
446446 }
447447
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
161161 QualifiedMassSpectrumVectorMassDataIntegratorToRtDt *mass_data_integrator_p =
162162 new QualifiedMassSpectrumVectorMassDataIntegratorToRtDt(
163163 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
164
165 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
164166
165167 // Ensure the mass data integrator messages are used.
166168
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
395395 // This is a multi-layer work: the graph has a ProcessingFlow associated
396396 // to it via the m_graphProcessingFlowMap. We have gotten it above.
397397
398 // Extract from it the default MzIntegrationParams:
399
400 MzIntegrationParams mz_integration_params =
398 // Extract from it the default pappso::MzIntegrationParams:
399
400 pappso::MzIntegrationParams mz_integration_params =
401401 local_processing_flow.getDefaultMzIntegrationParams();
402402
403403 // If it is not valid, then try mz integration params from the various
431431 if(m_ui.integrateToDtMzPushButton->isChecked() ||
432432 m_ui.integrateToRtMzPushButton->isChecked())
433433 {
434 mz_integration_params.setBinningType(BinningType::NONE);
434 mz_integration_params.setBinningType(pappso::BinningType::NONE);
435435 mz_integration_params.setDecimalPlaces(0);
436436 }
437437
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
150150 *mass_data_integrator_p =
151151 new QualifiedMassSpectrumVectorMassDataIntegratorToDtRtMz(
152152 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
153
154 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
153155
154156 // Ensure the mass data integrator messages are used.
155157
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
399399 // This is a multi-layer work: the graph has a ProcessingFlow associated
400400 // to it via the m_graphProcessingFlowMap. We have gotten it above.
401401
402 // Extract from it the default MzIntegrationParams:
403
404 MzIntegrationParams mz_integration_params =
402 // Extract from it the default pappso::MzIntegrationParams:
403
404 pappso::MzIntegrationParams mz_integration_params =
405405 local_processing_flow.getDefaultMzIntegrationParams();
406406
407407 // If it is not valid, then try mz integration params from the various
411411 // qDebug()
412412 //<< "The processing flow's default mz integ params are not valid.";
413413
414 const MzIntegrationParams *mz_integration_params_p =
414 const pappso::MzIntegrationParams *mz_integration_params_p =
415415 local_processing_flow.mostRecentMzIntegrationParams();
416416
417417 if(mz_integration_params_p != nullptr)
438438 if(m_ui.integrateToDtMzPushButton->isChecked() ||
439439 m_ui.integrateToRtMzPushButton->isChecked())
440440 {
441 mz_integration_params.setBinningType(BinningType::NONE);
441 mz_integration_params.setBinningType(pappso::BinningType::NONE);
442442 mz_integration_params.setDecimalPlaces(0);
443443 }
444444
22 *
33 * msXpertSuite - mass spectrometry software suite
44 * -----------------------------------------------
5 * Copyright(C) 2009,...,2018 Filippo Rusconi
5 * Copyright (C) 2009--2020 Filippo Rusconi
66 *
77 * http://www.msxpertsuite.org
88 *
497497 qualified_mass_spectra_sp,
498498 const ProcessingFlow &processing_flow)
499499 {
500 qDebug().noquote() << "Integrating to RT with processing flow:"
501 << processing_flow.toString();
500 //qDebug().noquote() << "Integrating to RT with processing flow:"
501 //<< processing_flow.toString();
502502
503503 // Get the ms run data set that for the graph we are going to base the
504504 // integration on.
526526 if(!qualified_mass_spectra_count)
527527 return;
528528
529 qDebug() << "The number of remaining mass spectra:"
530 << qualified_mass_spectra_count;
529 //qDebug() << "The number of remaining mass spectra:"
530 //<< qualified_mass_spectra_count;
531531
532532 // Now start the actual integration work.
533533
536536 QualifiedMassSpectrumVectorMassDataIntegratorToRt *mass_data_integrator_p =
537537 new QualifiedMassSpectrumVectorMassDataIntegratorToRt(
538538 ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp);
539
540 mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount());
539541
540542 // Ensure the mass data integrator messages are used.
541543
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
423423 <property name="spacing">
424424 <number>1</number>
425425 </property>
426 <item row="8" column="0">
427 <widget class="QPushButton" name="integrateToDtMzPushButton">
428 <property name="sizePolicy">
429 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
430 <horstretch>0</horstretch>
431 <verstretch>0</verstretch>
432 </sizepolicy>
433 </property>
434 <property name="minimumSize">
435 <size>
436 <width>20</width>
437 <height>20</height>
438 </size>
439 </property>
440 <property name="toolTip">
441 <string>Integration will generate a mass spectrum /drift spectrum colormap</string>
442 </property>
443 <property name="text">
444 <string/>
445 </property>
446 <property name="icon">
447 <iconset resource="../../../minexpert2.qrc">
448 <normaloff>:/images/integrate-to-dt-mz-pushbutton-32x32.png</normaloff>:/images/integrate-to-dt-mz-pushbutton-32x32.png</iconset>
449 </property>
450 <property name="iconSize">
451 <size>
452 <width>16</width>
453 <height>16</height>
454 </size>
455 </property>
456 <property name="shortcut">
457 <string>Ctrl+O, Ctrl+D, Ctrl+C</string>
458 </property>
459 <property name="checkable">
460 <bool>true</bool>
461 </property>
462 <property name="autoExclusive">
463 <bool>true</bool>
464 </property>
465 <property name="flat">
466 <bool>true</bool>
467 </property>
468 </widget>
469 </item>
470 <item row="5" column="0">
471 <widget class="QPushButton" name="integrateToRtPushButton">
472 <property name="sizePolicy">
473 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
474 <horstretch>0</horstretch>
475 <verstretch>0</verstretch>
476 </sizepolicy>
477 </property>
478 <property name="minimumSize">
479 <size>
480 <width>20</width>
481 <height>20</height>
482 </size>
483 </property>
484 <property name="toolTip">
485 <string>Integration will generate a TIC/XIC chromatogram trace (Ctrl-O,Ctrl-R)</string>
486 </property>
487 <property name="text">
488 <string/>
489 </property>
490 <property name="icon">
491 <iconset resource="../../../minexpert2.qrc">
492 <normaloff>:/images/integrate-to-rt-pushbutton-32x32.png</normaloff>:/images/integrate-to-rt-pushbutton-32x32.png</iconset>
493 </property>
494 <property name="iconSize">
495 <size>
496 <width>16</width>
497 <height>16</height>
498 </size>
499 </property>
500 <property name="shortcut">
501 <string>Ctrl+O, Ctrl+R</string>
502 </property>
503 <property name="checkable">
504 <bool>true</bool>
505 </property>
506 <property name="autoExclusive">
507 <bool>true</bool>
508 </property>
509 <property name="flat">
510 <bool>true</bool>
511 </property>
512 </widget>
513 </item>
514 <item row="0" column="0">
515 <widget class="QPushButton" name="duplicateTracePushButton">
516 <property name="enabled">
517 <bool>true</bool>
518 </property>
519 <property name="sizePolicy">
520 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
521 <horstretch>0</horstretch>
522 <verstretch>0</verstretch>
523 </sizepolicy>
524 </property>
525 <property name="minimumSize">
526 <size>
527 <width>20</width>
528 <height>20</height>
529 </size>
530 </property>
531 <property name="maximumSize">
532 <size>
533 <width>32</width>
534 <height>32</height>
535 </size>
536 </property>
537 <property name="focusPolicy">
538 <enum>Qt::NoFocus</enum>
539 </property>
540 <property name="toolTip">
541 <string>Duplication of the trace (Ctrl-O,Ctrl-U)</string>
542 </property>
543 <property name="text">
544 <string/>
545 </property>
546 <property name="icon">
547 <iconset resource="../../../minexpert2.qrc">
548 <normaloff>:/images/duplicate-trace-pushbutton-32x32.png</normaloff>:/images/duplicate-trace-pushbutton-32x32.png</iconset>
549 </property>
550 <property name="iconSize">
551 <size>
552 <width>16</width>
553 <height>16</height>
554 </size>
555 </property>
556 <property name="shortcut">
557 <string>Ctrl+O, Ctrl+U</string>
558 </property>
559 <property name="checkable">
560 <bool>false</bool>
561 </property>
562 <property name="autoExclusive">
563 <bool>false</bool>
564 </property>
565 <property name="flat">
566 <bool>false</bool>
567 </property>
568 </widget>
569 </item>
570 <item row="7" column="0">
571 <widget class="QPushButton" name="integrateToRtMzPushButton">
572 <property name="sizePolicy">
573 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
574 <horstretch>0</horstretch>
575 <verstretch>0</verstretch>
576 </sizepolicy>
577 </property>
578 <property name="minimumSize">
579 <size>
580 <width>20</width>
581 <height>20</height>
582 </size>
583 </property>
584 <property name="toolTip">
585 <string>Integration will generate a TIC|XIC chromatogram / mass spectrum colormap</string>
586 </property>
587 <property name="text">
588 <string/>
589 </property>
590 <property name="icon">
591 <iconset resource="../../../minexpert2.qrc">
592 <normaloff>:/images/integrate-to-rt-mz-pushbutton-32x32.png</normaloff>:/images/integrate-to-rt-mz-pushbutton-32x32.png</iconset>
593 </property>
594 <property name="iconSize">
595 <size>
596 <width>16</width>
597 <height>16</height>
598 </size>
599 </property>
600 <property name="shortcut">
601 <string>Ctrl+O, Ctrl+R, Ctrl+C</string>
602 </property>
603 <property name="checkable">
604 <bool>true</bool>
605 </property>
606 <property name="autoExclusive">
607 <bool>true</bool>
608 </property>
609 <property name="flat">
610 <bool>true</bool>
611 </property>
612 </widget>
613 </item>
614 <item row="10" column="0">
426 <item row="2" column="0">
427 <widget class="QPushButton" name="integrateToMzPushButton">
428 <property name="sizePolicy">
429 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
430 <horstretch>0</horstretch>
431 <verstretch>0</verstretch>
432 </sizepolicy>
433 </property>
434 <property name="minimumSize">
435 <size>
436 <width>20</width>
437 <height>20</height>
438 </size>
439 </property>
440 <property name="toolTip">
441 <string>Integration will generate a mass spectrum trace (Ctrl-O,Ctrl-M)</string>
442 </property>
443 <property name="text">
444 <string/>
445 </property>
446 <property name="icon">
447 <iconset resource="../../../minexpert2.qrc">
448 <normaloff>:/images/integrate-to-mz-pushbutton-32x32.png</normaloff>:/images/integrate-to-mz-pushbutton-32x32.png</iconset>
449 </property>
450 <property name="iconSize">
451 <size>
452 <width>16</width>
453 <height>16</height>
454 </size>
455 </property>
456 <property name="shortcut">
457 <string>Ctrl+O, Ctrl+M</string>
458 </property>
459 <property name="checkable">
460 <bool>true</bool>
461 </property>
462 <property name="autoExclusive">
463 <bool>true</bool>
464 </property>
465 <property name="flat">
466 <bool>true</bool>
467 </property>
468 </widget>
469 </item>
470 <item row="4" column="0">
471 <widget class="QPushButton" name="integrateToDtPushButton">
472 <property name="sizePolicy">
473 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
474 <horstretch>0</horstretch>
475 <verstretch>0</verstretch>
476 </sizepolicy>
477 </property>
478 <property name="minimumSize">
479 <size>
480 <width>20</width>
481 <height>20</height>
482 </size>
483 </property>
484 <property name="toolTip">
485 <string>Integration will generate a drift spectrum trace (Ctrl-O,Ctrl-D)</string>
486 </property>
487 <property name="text">
488 <string/>
489 </property>
490 <property name="icon">
491 <iconset resource="../../../minexpert2.qrc">
492 <normaloff>:/images/integrate-to-dt-pushbutton-32x32.png</normaloff>:/images/integrate-to-dt-pushbutton-32x32.png</iconset>
493 </property>
494 <property name="iconSize">
495 <size>
496 <width>16</width>
497 <height>16</height>
498 </size>
499 </property>
500 <property name="shortcut">
501 <string>Ctrl+O, Ctrl+D</string>
502 </property>
503 <property name="checkable">
504 <bool>true</bool>
505 </property>
506 <property name="autoExclusive">
507 <bool>true</bool>
508 </property>
509 <property name="flat">
510 <bool>true</bool>
511 </property>
512 </widget>
513 </item>
514 <item row="11" column="0">
615515 <spacer name="verticalSpacer5">
616516 <property name="orientation">
617517 <enum>Qt::Vertical</enum>
624524 </property>
625525 </spacer>
626526 </item>
627 <item row="3" column="0">
628 <widget class="QPushButton" name="integrateToDtPushButton">
629 <property name="sizePolicy">
630 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
631 <horstretch>0</horstretch>
632 <verstretch>0</verstretch>
633 </sizepolicy>
634 </property>
635 <property name="minimumSize">
636 <size>
637 <width>20</width>
638 <height>20</height>
639 </size>
640 </property>
641 <property name="toolTip">
642 <string>Integration will generate a drift spectrum trace (Ctrl-O,Ctrl-D)</string>
643 </property>
644 <property name="text">
645 <string/>
646 </property>
647 <property name="icon">
648 <iconset resource="../../../minexpert2.qrc">
649 <normaloff>:/images/integrate-to-dt-pushbutton-32x32.png</normaloff>:/images/integrate-to-dt-pushbutton-32x32.png</iconset>
650 </property>
651 <property name="iconSize">
652 <size>
653 <width>16</width>
654 <height>16</height>
655 </size>
656 </property>
657 <property name="shortcut">
658 <string>Ctrl+O, Ctrl+D</string>
527 <item row="9" column="0">
528 <widget class="QPushButton" name="integrateToDtMzPushButton">
529 <property name="sizePolicy">
530 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
531 <horstretch>0</horstretch>
532 <verstretch>0</verstretch>
533 </sizepolicy>
534 </property>
535 <property name="minimumSize">
536 <size>
537 <width>20</width>
538 <height>20</height>
539 </size>
540 </property>
541 <property name="toolTip">
542 <string>Integration will generate a mass spectrum /drift spectrum colormap</string>
543 </property>
544 <property name="text">
545 <string/>
546 </property>
547 <property name="icon">
548 <iconset resource="../../../minexpert2.qrc">
549 <normaloff>:/images/integrate-to-dt-mz-pushbutton-32x32.png</normaloff>:/images/integrate-to-dt-mz-pushbutton-32x32.png</iconset>
550 </property>
551 <property name="iconSize">
552 <size>
553 <width>16</width>
554 <height>16</height>
555 </size>
556 </property>
557 <property name="shortcut">
558 <string>Ctrl+O, Ctrl+D, Ctrl+C</string>
559 </property>
560 <property name="checkable">
561 <bool>true</bool>
562 </property>
563 <property name="autoExclusive">
564 <bool>true</bool>
565 </property>
566 <property name="flat">
567 <bool>true</bool>
568 </property>
569 </widget>
570 </item>
571 <item row="6" column="0">
572 <widget class="QPushButton" name="integrateToRtPushButton">
573 <property name="sizePolicy">
574 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
575 <horstretch>0</horstretch>
576 <verstretch>0</verstretch>
577 </sizepolicy>
578 </property>
579 <property name="minimumSize">
580 <size>
581 <width>20</width>
582 <height>20</height>
583 </size>
584 </property>
585 <property name="toolTip">
586 <string>Integration will generate a TIC/XIC chromatogram trace (Ctrl-O,Ctrl-R)</string>
587 </property>
588 <property name="text">
589 <string/>
590 </property>
591 <property name="icon">
592 <iconset resource="../../../minexpert2.qrc">
593 <normaloff>:/images/integrate-to-rt-pushbutton-32x32.png</normaloff>:/images/integrate-to-rt-pushbutton-32x32.png</iconset>
594 </property>
595 <property name="iconSize">
596 <size>
597 <width>16</width>
598 <height>16</height>
599 </size>
600 </property>
601 <property name="shortcut">
602 <string>Ctrl+O, Ctrl+R</string>
603 </property>
604 <property name="checkable">
605 <bool>true</bool>
606 </property>
607 <property name="autoExclusive">
608 <bool>true</bool>
609 </property>
610 <property name="flat">
611 <bool>true</bool>
612 </property>
613 </widget>
614 </item>
615 <item row="8" column="0">
616 <widget class="QPushButton" name="integrateToRtMzPushButton">
617 <property name="sizePolicy">
618 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
619 <horstretch>0</horstretch>
620 <verstretch>0</verstretch>
621 </sizepolicy>
622 </property>
623 <property name="minimumSize">
624 <size>
625 <width>20</width>
626 <height>20</height>
627 </size>
628 </property>
629 <property name="toolTip">
630 <string>Integration will generate a TIC|XIC chromatogram / mass spectrum colormap</string>
631 </property>
632 <property name="text">
633 <string/>
634 </property>
635 <property name="icon">
636 <iconset resource="../../../minexpert2.qrc">
637 <normaloff>:/images/integrate-to-rt-mz-pushbutton-32x32.png</normaloff>:/images/integrate-to-rt-mz-pushbutton-32x32.png</iconset>
638 </property>
639 <property name="iconSize">
640 <size>
641 <width>16</width>
642 <height>16</height>
643 </size>
644 </property>
645 <property name="shortcut">
646 <string>Ctrl+O, Ctrl+R, Ctrl+C</string>
659647 </property>
660648 <property name="checkable">
661649 <bool>true</bool>
669657 </widget>
670658 </item>
671659 <item row="1" column="0">
672 <widget class="QPushButton" name="integrateToMzPushButton">
673 <property name="sizePolicy">
674 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
675 <horstretch>0</horstretch>
676 <verstretch>0</verstretch>
677 </sizepolicy>
678 </property>
679 <property name="minimumSize">
680 <size>
681 <width>20</width>
682 <height>20</height>
683 </size>
684 </property>
685 <property name="toolTip">
686 <string>Integration will generate a mass spectrum trace (Ctrl-O,Ctrl-M)</string>
687 </property>
688 <property name="text">
689 <string/>
690 </property>
691 <property name="icon">
692 <iconset resource="../../../minexpert2.qrc">
693 <normaloff>:/images/integrate-to-mz-pushbutton-32x32.png</normaloff>:/images/integrate-to-mz-pushbutton-32x32.png</iconset>
694 </property>
695 <property name="iconSize">
696 <size>
697 <width>16</width>
698 <height>16</height>
699 </size>
700 </property>
701 <property name="shortcut">
702 <string>Ctrl+O, Ctrl+M</string>
703 </property>
704 <property name="checkable">
705 <bool>true</bool>
706 </property>
707 <property name="autoExclusive">
708 <bool>true</bool>
709 </property>
710 <property name="flat">
711 <bool>true</bool>
712 </property>
713 </widget>
714 </item>
715 <item row="6" column="0">
660 <widget class="QPushButton" name="duplicateTracePushButton">
661 <property name="enabled">
662 <bool>true</bool>
663 </property>
664 <property name="sizePolicy">
665 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
666 <horstretch>0</horstretch>
667 <verstretch>0</verstretch>
668 </sizepolicy>
669 </property>
670 <property name="minimumSize">
671 <size>
672 <width>20</width>
673 <height>20</height>
674 </size>
675 </property>
676 <property name="maximumSize">
677 <size>
678 <width>32</width>
679 <height>32</height>
680 </size>
681 </property>
682 <property name="focusPolicy">
683 <enum>Qt::NoFocus</enum>
684 </property>
685 <property name="toolTip">
686 <string>Duplication of the trace (Ctrl-O,Ctrl-U)</string>
687 </property>
688 <property name="text">
689 <string/>
690 </property>
691 <property name="icon">
692 <iconset resource="../../../minexpert2.qrc">
693 <normaloff>:/images/duplicate-trace-pushbutton-32x32.png</normaloff>:/images/duplicate-trace-pushbutton-32x32.png</iconset>
694 </property>
695 <property name="iconSize">
696 <size>
697 <width>16</width>
698 <height>16</height>
699 </size>
700 </property>
701 <property name="shortcut">
702 <string>Ctrl+O, Ctrl+U</string>
703 </property>
704 <property name="checkable">
705 <bool>false</bool>
706 </property>
707 <property name="autoExclusive">
708 <bool>false</bool>
709 </property>
710 <property name="flat">
711 <bool>false</bool>
712 </property>
713 </widget>
714 </item>
715 <item row="7" column="0">
716716 <widget class="QPushButton" name="integrateToIntPushButton">
717717 <property name="sizePolicy">
718718 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
756756 </property>
757757 </widget>
758758 </item>
759 <item row="9" column="0">
759 <item row="10" column="0">
760760 <widget class="QPushButton" name="integrateToRtDtPushButton">
761761 <property name="sizePolicy">
762762 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
797797 </property>
798798 <property name="flat">
799799 <bool>true</bool>
800 </property>
801 </widget>
802 </item>
803 <item row="0" column="0">
804 <widget class="QSpinBox" name="msLevelSpinBox">
805 <property name="toolTip">
806 <string>Set MS level for next integration</string>
807 </property>
808 <property name="wrapping">
809 <bool>false</bool>
810 </property>
811 <property name="buttonSymbols">
812 <enum>QAbstractSpinBox::UpDownArrows</enum>
813 </property>
814 <property name="prefix">
815 <string/>
816 </property>
817 <property name="minimum">
818 <number>0</number>
819 </property>
820 <property name="maximum">
821 <number>11</number>
800822 </property>
801823 </widget>
802824 </item>
0 /* BEGIN software license
1 *
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright(C) 2009, 2017 Filippo Rusconi
5 *
6 * http://www.msxpertsuite.org
7 *
8 * This file is part of the msXpertSuite project.
9 *
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
12 *
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
0 /* BEGIN software license
1 *
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright (C) 2009--2020 Filippo Rusconi
5 *
6 * http://www.msxpertsuite.org
7 *
8 * This file is part of the msXpertSuite project.
9 *
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
12 *
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2828 *
2929 * END software license
3030 */
31
3132
3233
3334 namespace msxps
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
0 /* msXpertSuite - mass spectrometry software suite
1 * -----------------------------------------------
2 * Copyright(C) 2016 Filippo Rusconi
3 *
4 * http://www.{site}.org
5 *
6 * This file is part of the msXpertSuite project.
7 *
8 * The msXpertSuite project is the successor of the massXpert project. This
9 * project now includes various independent modules:
10 * - massXpert, the original mass spectrometry environment software (greatly
11 * refactored code);
12 * - mobXpert, a module to process and mine mobility mass spectrometry data;
13 * - viewXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
14 *
15 * This program is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program. If not, see <http://www.gnu.org/licenses/>.
0 /* BEGIN software license
1 *
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright (C) 2009--2020 Filippo Rusconi
5 *
6 * http://www.msxpertsuite.org
7 *
8 * This file is part of the msXpertSuite project.
9 *
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
12 *
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *
29 * END software license
2730 */
31
2832
2933
3034 /////////////////////// Local includes
0 /* msXpertSuite - mass spectrometry software suite
1 * -----------------------------------------------
2 * Copyright(C) 2016 Filippo Rusconi
0 /* BEGIN software license
31 *
4 * http://www.{site}.org
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
6 * This file is part of the msXpertSuite project.
6 * http://www.msxpertsuite.org
77 *
8 * The msXpertSuite project is the successor of the massXpert project. This
9 * project now includes various independent modules:
10 * - massXpert, the original mass spectrometry environment software (greatly
11 * refactored code);
12 * - mobXpert, a module to process and mine mobility mass spectrometry data;
13 * - viewXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
8 * This file is part of the msXpertSuite project.
149 *
15 * This program is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
1912 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
2415 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *
29 * END software license
2730 */
31
2832
2933
3034 #pragma once
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
6666 MsRunDataSetCstSPtr ms_run_data_set_csp,
6767 const ProcessingFlow &processing_flow,
6868 pappso::MassSpectrumPlusCombinerSPtr &mass_spectrum_combiner_sp,
69 const MzIntegrationParams &mz_integration_params)
69 const pappso::MzIntegrationParams &mz_integration_params)
7070 : BaseMsRunDataSetTreeNodeVisitor(ms_run_data_set_csp, processing_flow),
7171 msp_combiner(mass_spectrum_combiner_sp),
7272 m_mzIntegrationParams(mz_integration_params)
130130
131131 void
132132 MassSpectrumTreeNodeCombinerVisitor::setMzIntegrationParams(
133 const MzIntegrationParams &mz_integration_params)
133 const pappso::MzIntegrationParams &mz_integration_params)
134134 {
135135 m_mzIntegrationParams = mz_integration_params;
136136 }
137137
138138
139 const MzIntegrationParams &
139 const pappso::MzIntegrationParams &
140140 MassSpectrumTreeNodeCombinerVisitor::getMzIntegrationParams()
141141 {
142142 return m_mzIntegrationParams;
4949 #include "ProcessingFlow.hpp"
5050 #include "MsRunDataSet.hpp"
5151 #include "BaseMsRunDataSetTreeNodeVisitor.hpp"
52 #include "MzIntegrationParams.hpp"
52 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5353
5454
5555 namespace msxps
8080 MsRunDataSetCstSPtr ms_run_data_set_csp,
8181 const ProcessingFlow &processing_flow,
8282 pappso::MassSpectrumPlusCombinerSPtr &mass_spectrum_combiner_sp,
83 const MzIntegrationParams &mz_integration_params);
83 const pappso::MzIntegrationParams &mz_integration_params);
8484
8585 MassSpectrumTreeNodeCombinerVisitor(
8686 const MassSpectrumTreeNodeCombinerVisitor &other);
9393
9494 const pappso::MapTrace &getMapTrace() const;
9595
96 void setMzIntegrationParams(const MzIntegrationParams &mz_integration_params);
97 const MzIntegrationParams &getMzIntegrationParams();
96 void setMzIntegrationParams(const pappso::MzIntegrationParams &mz_integration_params);
97 const pappso::MzIntegrationParams &getMzIntegrationParams();
9898
9999 MassSpectrumTreeNodeCombinerVisitor &
100100 operator=(const MassSpectrumTreeNodeCombinerVisitor &other);
125125 protected:
126126 pappso::MassSpectrumPlusCombinerSPtr msp_combiner;
127127
128 MzIntegrationParams m_mzIntegrationParams;
128 pappso::MzIntegrationParams m_mzIntegrationParams;
129129 pappso::MapTrace m_mapTrace;
130130
131131 uint m_verifiedMsFragmentationLevels = 0;
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4444
4545 /////////////////////// pappsomspp includes
4646 #include <pappsomspp/massspectrum/qualifiedmassspectrum.h>
47 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4748
4849
4950 /////////////////////// Local includes
5051 #include "MsRunDataSet.hpp"
51 #include "MzIntegrationParams.hpp"
5252
5353
5454 int msRunDataSetMetaTypeId = qRegisterMetaType<msxps::minexpert::MsRunDataSet>(
217217 }
218218
219219
220 MzIntegrationParams
220 pappso::MzIntegrationParams
221221 MsRunDataSet::craftInitialMzIntegrationParams() const
222222 {
223 return MzIntegrationParams(
223 return pappso::MzIntegrationParams(
224224 // Absolute min m/z value of the whole data set
225225 m_msRunDataSetStats.m_minMz,
226226 // Absolute max m/z value of the whole data set
227227 m_msRunDataSetStats.m_maxMz,
228228 // Binning type
229 BinningType::ARBITRARY,
229 pappso::BinningType::ARBITRARY,
230230 // Decimal places
231231 3,
232232 // The size of the m/z bins in Dalton units.
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4848 #include <pappsomspp/massspectrum/qualifiedmassspectrum.h>
4949 #include <pappsomspp/msrun/msrundatasettree.h>
5050 #include <pappsomspp/msrun/msrundatasettreenode.h>
51 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5152
5253
5354 /////////////////////// Local includes
6768
6869
6970 class MsRunDataSetStats;
70 class MzIntegrationParams;
71 //class pappso::MzIntegrationParams;
7172
7273 class MsRunDataSet : public QObject
7374 {
130131 void
131132 mapMassSpectrum(pappso::QualifiedMassSpectrumCstSPtr mass_spectrum_csptr);
132133
133 MzIntegrationParams craftInitialMzIntegrationParams() const;
134 pappso::MzIntegrationParams craftInitialMzIntegrationParams() const;
134135
135136 using VectorConstIterator =
136137 std::vector<pappso::MsRunDataSetTreeNode *>::const_iterator;
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
177177
178178 // Since we are asked that an integration to a mass spectrum be performed,
179179 // there must be a non-nullptr mz integration pointer in the step.
180 const MzIntegrationParams *mz_integration_params_p =
180 const pappso::MzIntegrationParams *mz_integration_params_p =
181181 processing_step_p->getMzIntegrationParamsPtr();
182182
183183 if(mz_integration_params_p == nullptr)
192192 emit setTaskDescriptionTextSignal(
193193 "Computing the combination of the appropriate mass spectra");
194194
195 if(mz_integration_params_p->getBinningType() == BinningType::NONE)
195 if(mz_integration_params_p->getBinningType() == pappso::BinningType::NONE)
196196 {
197197 integrateToMzNoBinning();
198198 }
199 else if(mz_integration_params_p->getBinningType() == BinningType::ARBITRARY)
199 else if(mz_integration_params_p->getBinningType() == pappso::BinningType::ARBITRARY)
200200 {
201201 integrateToMzArbitraryBinning();
202202 }
296296 // Since we are asked that an integration to a mass spectrum be performed,
297297 // there must be a non-nullptr mz integration pointer in the most recent step.
298298
299 const MzIntegrationParams *mz_integration_params_p =
299 const pappso::MzIntegrationParams *mz_integration_params_p =
300300 m_processingFlow.mostRecentStep()->getMzIntegrationParamsPtr();
301301
302302 if(mz_integration_params_p == nullptr)
532532 // Since we are asked that an integration to a mass spectrum be performed,
533533 // there must be a non-nullptr mz integration pointer in the most recent step.
534534
535 const MzIntegrationParams *mz_integration_params_p =
535 const pappso::MzIntegrationParams *mz_integration_params_p =
536536 m_processingFlow.mostRecentStep()->getMzIntegrationParamsPtr();
537537
538538 if(mz_integration_params_p == nullptr)
542542 // to establish the bins. Create a local copy that we'll be able to modify
543543 // before using it.
544544
545 MzIntegrationParams local_mz_integration_params = *mz_integration_params_p;
545 pappso::MzIntegrationParams local_mz_integration_params = *mz_integration_params_p;
546546
547547 local_mz_integration_params.setSmallestMz(
548548 mcsp_msRunDataSet->getMsRunDataSetStats().m_minMz);
573573 {
574574 // qDebug() << "thread index:" << iter;
575575
576 if(local_mz_integration_params.getBinningType() != BinningType::ARBITRARY)
576 if(local_mz_integration_params.getBinningType() != pappso::BinningType::ARBITRARY)
577577 qFatal("Programming error.");
578578
579579 // We are using MassSpectrum combiner visitors because we are going to use
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4747 #include "ProcessingFlow.hpp"
4848 #include "MsRunDataSet.hpp"
4949 #include "BaseMsRunDataSetTreeNodeVisitor.hpp"
50 #include "MzIntegrationParams.hpp"
50 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5151 #include "MsRunDataSetStats.hpp"
5252
5353
4949 #include "ProcessingFlow.hpp"
5050 #include "MsRunDataSet.hpp"
5151 #include "BaseMsRunDataSetTreeNodeVisitor.hpp"
52 #include "MzIntegrationParams.hpp"
52 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5353
5454
5555 namespace msxps
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
2828 *
2929 * END software license
3030 */
31
3132
3233
3334 /////////////////////// Qt includes
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
112112
113113 void
114114 ProcessingFlow::setDefaultMzIntegrationParams(
115 const MzIntegrationParams &mz_integration_params)
115 const pappso::MzIntegrationParams &mz_integration_params)
116116 {
117117 m_defaultMzIntegrationParams = mz_integration_params;
118118 }
128128 }
129129
130130
131 const MzIntegrationParams &
131 const pappso::MzIntegrationParams &
132132 ProcessingFlow::getDefaultMzIntegrationParams() const
133133 {
134134 return m_defaultMzIntegrationParams;
460460 }
461461
462462
463 const MzIntegrationParams *
463 const pappso::MzIntegrationParams *
464464 ProcessingFlow::mostRecentMzIntegrationParams() const
465465 {
466466
8989 const ProcessingStep *mostRecentStep() const;
9090
9191 void setDefaultMzIntegrationParams(
92 const MzIntegrationParams &mz_integration_params);
93 const MzIntegrationParams &getDefaultMzIntegrationParams() const;
94 const MzIntegrationParams *mostRecentMzIntegrationParams() const;
92 const pappso::MzIntegrationParams &mz_integration_params);
93 const pappso::MzIntegrationParams &getDefaultMzIntegrationParams() const;
94 const pappso::MzIntegrationParams *mostRecentMzIntegrationParams() const;
9595
9696 void setDefaultMsFragmentationSpec(
9797 const MsFragmentationSpec &ms_fragmentation_spec);
105105 protected:
106106 MsRunDataSetCstSPtr mcsp_msRunDataSet = nullptr;
107107
108 // Note that each step has an optional MzIntegrationParams *. This one is the
108 // Note that each step has an optional pappso::MzIntegrationParams *. This one is the
109109 // default one when not a single step has mz integration params. This one is
110110 // set automatically in the first graph obtained when displaying the TIC
111111 // chromatogram right after having loaded the ms run from file.
112 MzIntegrationParams m_defaultMzIntegrationParams;
112 pappso::MzIntegrationParams m_defaultMzIntegrationParams;
113113
114114 // Same for MsFragmentationSpec
115115 MsFragmentationSpec m_defaultMsFragmentationSpec;
6262
6363 if(other.mpa_mzIntegrationParams != nullptr)
6464 mpa_mzIntegrationParams =
65 new MzIntegrationParams(*other.mpa_mzIntegrationParams);
65 new pappso::MzIntegrationParams(*other.mpa_mzIntegrationParams);
6666
6767 for(auto &&type_spec_pair : other.m_processingTypeSpecMultiMap)
6868 {
9494
9595 if(other.mpa_mzIntegrationParams != nullptr)
9696 mpa_mzIntegrationParams =
97 new MzIntegrationParams(*other.mpa_mzIntegrationParams);
97 new pappso::MzIntegrationParams(*other.mpa_mzIntegrationParams);
9898
9999 for(auto &&item : m_processingTypeSpecMultiMap)
100100 {
109109
110110 void
111111 ProcessingStep::setMzIntegrationParams(
112 const MzIntegrationParams &mz_integration_params)
113 {
114 mpa_mzIntegrationParams = new MzIntegrationParams(mz_integration_params);
115 }
116
117
118 const MzIntegrationParams *
112 const pappso::MzIntegrationParams &mz_integration_params)
113 {
114 mpa_mzIntegrationParams = new pappso::MzIntegrationParams(mz_integration_params);
115 }
116
117
118 const pappso::MzIntegrationParams *
119119 ProcessingStep::getMzIntegrationParamsPtr() const
120120 {
121121 return mpa_mzIntegrationParams;
4343
4444
4545 /////////////////////// pappsomspp includes
46 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
4647
4748
4849 /////////////////////// Local includes
8081
8182 ProcessingStep &operator=(const ProcessingStep &other);
8283
83 void setMzIntegrationParams(const MzIntegrationParams &mz_integration_params);
84 const MzIntegrationParams *getMzIntegrationParamsPtr() const;
84 void setMzIntegrationParams(const pappso::MzIntegrationParams &mz_integration_params);
85 const pappso::MzIntegrationParams *getMzIntegrationParamsPtr() const;
8586
8687 void newSpec(ProcessingType processing_type,
8788 ProcessingSpec *processing_spec_p);
125126 // class instance allows to do so. Because not all the specs need such
126127 // parameters, we do not make a member variable of that type, but we provide a
127128 // means to store a pointer.
128 MzIntegrationParams *mpa_mzIntegrationParams = nullptr;
129 pappso::MzIntegrationParams *mpa_mzIntegrationParams = nullptr;
129130 };
130131
131132
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
184184 }
185185
186186
187 void
188 QualifiedMassSpectrumVectorMassDataIntegrator::setMaxThreadUseCount(std::size_t number)
189 {
190 m_maxThreadUseCount = number;
191 }
192
193
194 std::size_t
195 QualifiedMassSpectrumVectorMassDataIntegrator::getMaxThreadUseCount()
196 {
197 return m_maxThreadUseCount;
198 }
199
200
187201 void
188202 QualifiedMassSpectrumVectorMassDataIntegrator::cancelOperation()
189203 {
190204 m_isOperationCancelled = true;
191205
192 qDebug() << "cancellation asked, setting m_isOperationCancelled to true and "
193 "emitting cancelOperationSignal";
206 //qDebug() << "cancellation asked, setting m_isOperationCancelled to true and "
207 //"emitting cancelOperationSignal";
194208
195209 emit cancelOperationSignal();
196210 }
202216
203217 std::size_t ideal_thread_count = QThread::idealThreadCount();
204218 // qDebug() << "ideal_thread_count:" << ideal_thread_count;
219
220 // If the user has limited the count of usable threads, then we need to honour
221 // that limitation. Only if the limitation value is not 0 (in which case there
222 // is no limitation).
223 if(m_maxThreadUseCount != 0 && ideal_thread_count > m_maxThreadUseCount)
224 ideal_thread_count = m_maxThreadUseCount;
205225
206226 // Depending on the number of nodes (node_count) and on the number of thread
207227 // available, we need to compute the right values to parallelize correctly the
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
9595 pappso::QualifiedMassSpectrumCstSPtr &qualified_mass_spectrum_csp);
9696
9797 const pappso::MapTrace &getMapTrace() const;
98
99 void setMaxThreadUseCount(std::size_t count);
100 std::size_t getMaxThreadUseCount();
98101
99102 public slots:
100103
131134 MsRunDataSetCstSPtr mcsp_msRunDataSet = nullptr;
132135
133136 ProcessingFlow m_processingFlow;
137
138 std::size_t m_maxThreadUseCount = 0;
134139
135140 std::pair<double, double> m_rtRange = std::pair<double, double>(
136141 std::numeric_limits<double>::max(), std::numeric_limits<double>::min());
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
303303 {
304304
305305 emit setStatusTextSignal(
306 QString("Consolidating TEST drift spectra from thread %1")
306 QString("Consolidating drift spectra from thread %1")
307307 .arg(iter));
308308
309309 emit setProgressBarCurrentValueSignal(iter);
661661 {
662662
663663 emit setStatusTextSignal(
664 QString("Consolidating TIC chromatograms from thread %1")
664 QString("Consolidating drift spectra from thread %1")
665665 .arg(iter));
666666
667667 emit setProgressBarCurrentValueSignal(iter);
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
125125 m_mapTrace.clear();
126126
127127 if(m_processingFlow.getDefaultMzIntegrationParams().getBinningType() ==
128 BinningType::NONE)
128 pappso::BinningType::NONE)
129129 {
130130 integrateToMzNoBinning();
131131 }
132132 else if(m_processingFlow.getDefaultMzIntegrationParams().getBinningType() ==
133 BinningType::ARBITRARY)
133 pappso::BinningType::ARBITRARY)
134134 {
135135 integrateToMzArbitraryBinning();
136136 }
252252 if(m_mzRange.first != std::numeric_limits<double>::max() &&
253253 m_mzRange.second != std::numeric_limits<double>::min())
254254 {
255 qDebug() << "The m_mzRange.first:" << m_mzRange.first
256 << "and m_mzRange.second:" << m_mzRange.second;
255 //qDebug() << "The m_mzRange.first:" << m_mzRange.first
256 //<< "and m_mzRange.second:" << m_mzRange.second;
257257
258258 trace_plus_combiner.setFilterResampleKeepXRange(
259259 pappso::FilterResampleKeepXRange(m_mzRange.first,
260260 m_mzRange.second));
261261 }
262 else
263 qDebug() << "There is no limitation on the m/z range.";
262 //else
263 //qDebug() << "There is no limitation on the m/z range.";
264264
265265 while(current_iterator != end_iterator)
266266 {
414414 ++iter;
415415
416416 emit setStatusTextSignal(
417 QString("Consolidating TEST mass spectra from thread %1").arg(iter));
417 QString("Consolidating mass spectra from thread %1").arg(iter));
418418
419419 // qDebug() << "In the consolidating loop, iter:" << iter
420420 //<< "with a MapTrace of this size : "
441441 QualifiedMassSpectrumVectorMassDataIntegratorToMz::
442442 integrateToMzArbitraryBinning()
443443 {
444 qDebug();
444 // qDebug();
445445
446446 // This function needs to be called by integrateToMz() that has setup all the
447447 // required parameters.
454454 if(!m_processingFlow.size())
455455 qFatal("The processing flow cannot be empty. Program aborted.");
456456
457 MzIntegrationParams local_mz_integration_params =
457 pappso::MzIntegrationParams local_mz_integration_params =
458458 m_processingFlow.getDefaultMzIntegrationParams();
459459
460460 if(!local_mz_integration_params.isValid())
461461 {
462 // qFatal("the mz integration paramas are not valid.");
463 qDebug() << "the mz integration paramas are not valid.";
462 qDebug() << "The mz integration paramas are not valid.";
464463
465464 // If the mz integration params are not valid, then we cannot know the
466465 // start and end of the bins ! We need to resort to the statistical data
562561 m_mzRange.second != std::numeric_limits<double>::min())
563562 {
564563
565 qDebug() << "The m_mzRange.first:" << m_mzRange.first
566 << "and m_mzRange.second:" << m_mzRange.second;
564 // qDebug() << "The m_mzRange.first:" << m_mzRange.first
565 //<< "and m_mzRange.second:" << m_mzRange.second;
567566
568567 mass_spectrum_plus_combiner.setFilterResampleKeepXRange(
569568 pappso::FilterResampleKeepXRange(m_mzRange.first,
570569 m_mzRange.second));
571570 }
572 else
573 qDebug() << "There is no limitation on the m/z range.";
571 // else
572 // qDebug() << "There is no limitation on the m/z range.";
574573
575574 // Configure the binning mass spectrum combiner.
576575
748747
749748 emit setStatusTextSignal(message);
750749
751 // qDebug() << message;
750 //qDebug() << message;
752751
753752 mass_spectrum_plus_combiner.combine(m_mapTrace, *current_map_trace_sp);
754753
755754 emit setProgressBarCurrentValueSignal(iter);
756755
757 // qDebug() << "Emitted current value:" << iter;
756 //qDebug() << "Emitted current value:" << iter;
758757 }
759758
760759 // Write the data to file so that we can check. It works !!!
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
4949 #include "ProcessingFlow.hpp"
5050 #include "MsRunDataSet.hpp"
5151 #include "BaseMsRunDataSetTreeNodeVisitor.hpp"
52 #include "MzIntegrationParams.hpp"
52 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5353
5454
5555 namespace msxps
4949 #include "ProcessingFlow.hpp"
5050 #include "MsRunDataSet.hpp"
5151 #include "BaseMsRunDataSetTreeNodeVisitor.hpp"
52 #include "MzIntegrationParams.hpp"
52 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5353
5454
5555 namespace msxps
6565 MsRunDataSetCstSPtr ms_run_data_set_csp,
6666 const ProcessingFlow &processing_flow,
6767 pappso::TracePlusCombinerSPtr &trace_combiner_sp,
68 const MzIntegrationParams &mz_integration_params)
68 const pappso::MzIntegrationParams &mz_integration_params)
6969 : BaseMsRunDataSetTreeNodeVisitor(ms_run_data_set_csp, processing_flow),
7070 msp_combiner(trace_combiner_sp),
7171 m_mzIntegrationParams(mz_integration_params)
129129
130130 void
131131 TraceTreeNodeCombinerVisitor::setMzIntegrationParams(
132 const MzIntegrationParams &mz_integration_params)
132 const pappso::MzIntegrationParams &mz_integration_params)
133133 {
134134 m_mzIntegrationParams = mz_integration_params;
135135 }
136136
137137
138 const MzIntegrationParams &
138 const pappso::MzIntegrationParams &
139139 TraceTreeNodeCombinerVisitor::getMzIntegrationParams()
140140 {
141141 return m_mzIntegrationParams;
4949 #include "ProcessingFlow.hpp"
5050 #include "MsRunDataSet.hpp"
5151 #include "BaseMsRunDataSetTreeNodeVisitor.hpp"
52 #include "MzIntegrationParams.hpp"
52 #include <pappsomspp/processing/combiners/mzintegrationparams.h>
5353
5454
5555 namespace msxps
7979 MsRunDataSetCstSPtr ms_run_data_set_csp,
8080 const ProcessingFlow &processing_flow,
8181 pappso::TracePlusCombinerSPtr &trace_combiner_sp,
82 const MzIntegrationParams &mz_integration_params);
82 const pappso::MzIntegrationParams &mz_integration_params);
8383
8484 TraceTreeNodeCombinerVisitor(const TraceTreeNodeCombinerVisitor &other);
8585
9090
9191 const pappso::MapTrace &getMapTrace() const;
9292
93 void setMzIntegrationParams(const MzIntegrationParams &mz_integration_params);
94 const MzIntegrationParams &getMzIntegrationParams();
93 void setMzIntegrationParams(const pappso::MzIntegrationParams &mz_integration_params);
94 const pappso::MzIntegrationParams &getMzIntegrationParams();
9595
9696 TraceTreeNodeCombinerVisitor &
9797 operator=(const TraceTreeNodeCombinerVisitor &other);
122122 protected:
123123 pappso::TracePlusCombinerSPtr msp_combiner;
124124
125 MzIntegrationParams m_mzIntegrationParams;
125 pappso::MzIntegrationParams m_mzIntegrationParams;
126126 pappso::MapTrace m_mapTrace;
127127 };
128128
+0
-781
src/nongui/about_gpl_v30.hpp less more
0 /* BEGIN software license
1 *
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright(C) 2009, 2017 Filippo Rusconi
5 *
6 * http://www.msxpertsuite.org
7 *
8 * This file is part of the msXpertSuite project.
9 *
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
12 *
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 *
29 * END software license
30 */
31
32
33 namespace msxps
34 {
35 namespace minexpert
36 {
37
38 QString gpl(
39 " GNU GENERAL PUBLIC LICENSE\n"
40 " Version 3, 29 June 2007\n"
41 "\n"
42 " Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n"
43 " Everyone is permitted to copy and distribute verbatim copies\n"
44 " of this license document, but changing it is not allowed.\n"
45 "\n"
46 " Preamble\n"
47 "\n"
48 " The GNU General Public License is a free, copyleft license for\n"
49 "software and other kinds of works.\n"
50 "\n"
51 " The licenses for most software and other practical works are designed\n"
52 "to take away your freedom to share and change the works. By contrast,\n"
53 "the GNU General Public License is intended to guarantee your freedom to\n"
54 "share and change all versions of a program--to make sure it remains free\n"
55 "software for all its users. We, the Free Software Foundation, use the\n"
56 "GNU General Public License for most of our software; it applies also to\n"
57 "any other work released this way by its authors. You can apply it to\n"
58 "your programs, too.\n"
59 "\n"
60 " When we speak of free software, we are referring to freedom, not\n"
61 "price. Our General Public Licenses are designed to make sure that you\n"
62 "have the freedom to distribute copies of free software (and charge for\n"
63 "them if you wish), that you receive source code or can get it if you\n"
64 "want it, that you can change the software or use pieces of it in new\n"
65 "free programs, and that you know you can do these things.\n"
66 "\n"
67 " To protect your rights, we need to prevent others from denying you\n"
68 "these rights or asking you to surrender the rights. Therefore, you have\n"
69 "certain responsibilities if you distribute copies of the software, or if\n"
70 "you modify it: responsibilities to respect the freedom of others.\n"
71 "\n"
72 " For example, if you distribute copies of such a program, whether\n"
73 "gratis or for a fee, you must pass on to the recipients the same\n"
74 "freedoms that you received. You must make sure that they, too, receive\n"
75 "or can get the source code. And you must show them these terms so they\n"
76 "know their rights.\n"
77 "\n"
78 " Developers that use the GNU GPL protect your rights with two steps:\n"
79 "(1) assert copyright on the software, and (2) offer you this License\n"
80 "giving you legal permission to copy, distribute and/or modify it.\n"
81 "\n"
82 " For the developers' and authors' protection, the GPL clearly explains\n"
83 "that there is no warranty for this free software. For both users' and\n"
84 "authors' sake, the GPL requires that modified versions be marked as\n"
85 "changed, so that their problems will not be attributed erroneously to\n"
86 "authors of previous versions.\n"
87 "\n"
88 " Some devices are designed to deny users access to install or run\n"
89 "modified versions of the software inside them, although the manufacturer\n"
90 "can do so. This is fundamentally incompatible with the aim of\n"
91 "protecting users' freedom to change the software. The systematic\n"
92 "pattern of such abuse occurs in the area of products for individuals to\n"
93 "use, which is precisely where it is most unacceptable. Therefore, we\n"
94 "have designed this version of the GPL to prohibit the practice for those\n"
95 "products. If such problems arise substantially in other domains, we\n"
96 "stand ready to extend this provision to those domains in future versions\n"
97 "of the GPL, as needed to protect the freedom of users.\n"
98 "\n"
99 " Finally, every program is threatened constantly by software patents.\n"
100 "States should not allow patents to restrict development and use of\n"
101 "software on general-purpose computers, but in those that do, we wish to\n"
102 "avoid the special danger that patents applied to a free program could\n"
103 "make it effectively proprietary. To prevent this, the GPL assures that\n"
104 "patents cannot be used to render the program non-free.\n"
105 "\n"
106 " The precise terms and conditions for copying, distribution and\n"
107 "modification follow.\n"
108 "\n"
109 " TERMS AND CONDITIONS\n"
110 "\n"
111 " 0. Definitions.\n"
112 "\n"
113 " \"This License\" refers to version 3 of the GNU General Public "
114 "License.\n"
115 "\n"
116 " \"Copyright\" also means copyright-like laws that apply to other kinds "
117 "of\n"
118 "works, such as semiconductor masks.\n"
119 "\n"
120 " \"The Program\" refers to any copyrightable work licensed under this\n"
121 "License. Each licensee is addressed as \"you\". \"Licensees\" and\n"
122 "\"recipients\" may be individuals or organizations.\n"
123 "\n"
124 " To \"modify\" a work means to copy from or adapt all or part of the "
125 "work\n"
126 "in a fashion requiring copyright permission, other than the making of an\n"
127 "exact copy. The resulting work is called a \"modified version\" of the\n"
128 "earlier work or a work \"based on\" the earlier work.\n"
129 "\n"
130 " A \"covered work\" means either the unmodified Program or a work based\n"
131 "on the Program.\n"
132 "\n"
133 " To \"propagate\" a work means to do anything with it that, without\n"
134 "permission, would make you directly or secondarily liable for\n"
135 "infringement under applicable copyright law, except executing it on a\n"
136 "computer or modifying a private copy. Propagation includes copying,\n"
137 "distribution (with or without modification), making available to the\n"
138 "public, and in some countries other activities as well.\n"
139 "\n"
140 " To \"convey\" a work means any kind of propagation that enables other\n"
141 "parties to make or receive copies. Mere interaction with a user through\n"
142 "a computer network, with no transfer of a copy, is not conveying.\n"
143 "\n"
144 " An interactive user interface displays \"Appropriate Legal Notices\"\n"
145 "to the extent that it includes a convenient and prominently visible\n"
146 "feature that (1) displays an appropriate copyright notice, and (2)\n"
147 "tells the user that there is no warranty for the work (except to the\n"
148 "extent that warranties are provided), that licensees may convey the\n"
149 "work under this License, and how to view a copy of this License. If\n"
150 "the interface presents a list of user commands or options, such as a\n"
151 "menu, a prominent item in the list meets this criterion.\n"
152 "\n"
153 " 1. Source Code.\n"
154 "\n"
155 " The \"source code\" for a work means the preferred form of the work\n"
156 "for making modifications to it. \"Object code\" means any non-source\n"
157 "form of a work.\n"
158 "\n"
159 " A \"Standard Interface\" means an interface that either is an official\n"
160 "standard defined by a recognized standards body, or, in the case of\n"
161 "interfaces specified for a particular programming language, one that\n"
162 "is widely used among developers working in that language.\n"
163 "\n"
164 " The \"System Libraries\" of an executable work include anything, other\n"
165 "than the work as a whole, that (a) is included in the normal form of\n"
166 "packaging a Major Component, but which is not part of that Major\n"
167 "Component, and (b) serves only to enable use of the work with that\n"
168 "Major Component, or to implement a Standard Interface for which an\n"
169 "implementation is available to the public in source code form. A\n"
170 "\"Major Component\", in this context, means a major essential component\n"
171 "(kernel, window system, and so on) of the specific operating system\n"
172 "(if any) on which the executable work runs, or a compiler used to\n"
173 "produce the work, or an object code interpreter used to run it.\n"
174 "\n"
175 " The \"Corresponding Source\" for a work in object code form means all\n"
176 "the source code needed to generate, install, and (for an executable\n"
177 "work) run the object code and to modify the work, including scripts to\n"
178 "control those activities. However, it does not include the work's\n"
179 "System Libraries, or general-purpose tools or generally available free\n"
180 "programs which are used unmodified in performing those activities but\n"
181 "which are not part of the work. For example, Corresponding Source\n"
182 "includes interface definition files associated with source files for\n"
183 "the work, and the source code for shared libraries and dynamically\n"
184 "linked subprograms that the work is specifically designed to require,\n"
185 "such as by intimate data communication or control flow between those\n"
186 "subprograms and other parts of the work.\n"
187 "\n"
188 " The Corresponding Source need not include anything that users\n"
189 "can regenerate automatically from other parts of the Corresponding\n"
190 "Source.\n"
191 "\n"
192 " The Corresponding Source for a work in source code form is that\n"
193 "same work.\n"
194 "\n"
195 " 2. Basic Permissions.\n"
196 "\n"
197 " All rights granted under this License are granted for the term of\n"
198 "copyright on the Program, and are irrevocable provided the stated\n"
199 "conditions are met. This License explicitly affirms your unlimited\n"
200 "permission to run the unmodified Program. The output from running a\n"
201 "covered work is covered by this License only if the output, given its\n"
202 "content, constitutes a covered work. This License acknowledges your\n"
203 "rights of fair use or other equivalent, as provided by copyright law.\n"
204 "\n"
205 " You may make, run and propagate covered works that you do not\n"
206 "convey, without conditions so long as your license otherwise remains\n"
207 "in force. You may convey covered works to others for the sole purpose\n"
208 "of having them make modifications exclusively for you, or provide you\n"
209 "with facilities for running those works, provided that you comply with\n"
210 "the terms of this License in conveying all material for which you do\n"
211 "not control copyright. Those thus making or running the covered works\n"
212 "for you must do so exclusively on your behalf, under your direction\n"
213 "and control, on terms that prohibit them from making any copies of\n"
214 "your copyrighted material outside their relationship with you.\n"
215 "\n"
216 " Conveying under any other circumstances is permitted solely under\n"
217 "the conditions stated below. Sublicensing is not allowed; section 10\n"
218 "makes it unnecessary.\n"
219 "\n"
220 " 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n"
221 "\n"
222 " No covered work shall be deemed part of an effective technological\n"
223 "measure under any applicable law fulfilling obligations under article\n"
224 "11 of the WIPO copyright treaty adopted on 20 December 1996, or\n"
225 "similar laws prohibiting or restricting circumvention of such\n"
226 "measures.\n"
227 "\n"
228 " When you convey a covered work, you waive any legal power to forbid\n"
229 "circumvention of technological measures to the extent such circumvention\n"
230 "is effected by exercising rights under this License with respect to\n"
231 "the covered work, and you disclaim any intention to limit operation or\n"
232 "modification of the work as a means of enforcing, against the work's\n"
233 "users, your or third parties' legal rights to forbid circumvention of\n"
234 "technological measures.\n"
235 "\n"
236 " 4. Conveying Verbatim Copies.\n"
237 "\n"
238 " You may convey verbatim copies of the Program's source code as you\n"
239 "receive it, in any medium, provided that you conspicuously and\n"
240 "appropriately publish on each copy an appropriate copyright notice;\n"
241 "keep intact all notices stating that this License and any\n"
242 "non-permissive terms added in accord with section 7 apply to the code;\n"
243 "keep intact all notices of the absence of any warranty; and give all\n"
244 "recipients a copy of this License along with the Program.\n"
245 "\n"
246 " You may charge any price or no price for each copy that you convey,\n"
247 "and you may offer support or warranty protection for a fee.\n"
248 "\n"
249 " 5. Conveying Modified Source Versions.\n"
250 "\n"
251 " You may convey a work based on the Program, or the modifications to\n"
252 "produce it from the Program, in the form of source code under the\n"
253 "terms of section 4, provided that you also meet all of these conditions:\n"
254 "\n"
255 " a) The work must carry prominent notices stating that you modified\n"
256 " it, and giving a relevant date.\n"
257 "\n"
258 " b) The work must carry prominent notices stating that it is\n"
259 " released under this License and any conditions added under section\n"
260 " 7. This requirement modifies the requirement in section 4 to\n"
261 " \"keep intact all notices\".\n"
262 "\n"
263 " c) You must license the entire work, as a whole, under this\n"
264 " License to anyone who comes into possession of a copy. This\n"
265 " License will therefore apply, along with any applicable section 7\n"
266 " additional terms, to the whole of the work, and all its parts,\n"
267 " regardless of how they are packaged. This License gives no\n"
268 " permission to license the work in any other way, but it does not\n"
269 " invalidate such permission if you have separately received it.\n"
270 "\n"
271 " d) If the work has interactive user interfaces, each must display\n"
272 " Appropriate Legal Notices; however, if the Program has interactive\n"
273 " interfaces that do not display Appropriate Legal Notices, your\n"
274 " work need not make them do so.\n"
275 "\n"
276 " A compilation of a covered work with other separate and independent\n"
277 "works, which are not by their nature extensions of the covered work,\n"
278 "and which are not combined with it such as to form a larger program,\n"
279 "in or on a volume of a storage or distribution medium, is called an\n"
280 "\"aggregate\" if the compilation and its resulting copyright are not\n"
281 "used to limit the access or legal rights of the compilation's users\n"
282 "beyond what the individual works permit. Inclusion of a covered work\n"
283 "in an aggregate does not cause this License to apply to the other\n"
284 "parts of the aggregate.\n"
285 "\n"
286 " 6. Conveying Non-Source Forms.\n"
287 "\n"
288 " You may convey a covered work in object code form under the terms\n"
289 "of sections 4 and 5, provided that you also convey the\n"
290 "machine-readable Corresponding Source under the terms of this License,\n"
291 "in one of these ways:\n"
292 "\n"
293 " a) Convey the object code in, or embodied in, a physical product\n"
294 " (including a physical distribution medium), accompanied by the\n"
295 " Corresponding Source fixed on a durable physical medium\n"
296 " customarily used for software interchange.\n"
297 "\n"
298 " b) Convey the object code in, or embodied in, a physical product\n"
299 " (including a physical distribution medium), accompanied by a\n"
300 " written offer, valid for at least three years and valid for as\n"
301 " long as you offer spare parts or customer support for that product\n"
302 " model, to give anyone who possesses the object code either (1) a\n"
303 " copy of the Corresponding Source for all the software in the\n"
304 " product that is covered by this License, on a durable physical\n"
305 " medium customarily used for software interchange, for a price no\n"
306 " more than your reasonable cost of physically performing this\n"
307 " conveying of source, or (2) access to copy the\n"
308 " Corresponding Source from a network server at no charge.\n"
309 "\n"
310 " c) Convey individual copies of the object code with a copy of the\n"
311 " written offer to provide the Corresponding Source. This\n"
312 " alternative is allowed only occasionally and noncommercially, and\n"
313 " only if you received the object code with such an offer, in accord\n"
314 " with subsection 6b.\n"
315 "\n"
316 " d) Convey the object code by offering access from a designated\n"
317 " place (gratis or for a charge), and offer equivalent access to the\n"
318 " Corresponding Source in the same way through the same place at no\n"
319 " further charge. You need not require recipients to copy the\n"
320 " Corresponding Source along with the object code. If the place to\n"
321 " copy the object code is a network server, the Corresponding Source\n"
322 " may be on a different server (operated by you or a third party)\n"
323 " that supports equivalent copying facilities, provided you maintain\n"
324 " clear directions next to the object code saying where to find the\n"
325 " Corresponding Source. Regardless of what server hosts the\n"
326 " Corresponding Source, you remain obligated to ensure that it is\n"
327 " available for as long as needed to satisfy these requirements.\n"
328 "\n"
329 " e) Convey the object code using peer-to-peer transmission, provided\n"
330 " you inform other peers where the object code and Corresponding\n"
331 " Source of the work are being offered to the general public at no\n"
332 " charge under subsection 6d.\n"
333 "\n"
334 " A separable portion of the object code, whose source code is excluded\n"
335 "from the Corresponding Source as a System Library, need not be\n"
336 "included in conveying the object code work.\n"
337 "\n"
338 " A \"User Product\" is either (1) a \"consumer product\", which means "
339 "any\n"
340 "tangible personal property which is normally used for personal, family,\n"
341 "or household purposes, or (2) anything designed or sold for "
342 "incorporation\n"
343 "into a dwelling. In determining whether a product is a consumer "
344 "product,\n"
345 "doubtful cases shall be resolved in favor of coverage. For a particular\n"
346 "product received by a particular user, \"normally used\" refers to a\n"
347 "typical or common use of that class of product, regardless of the status\n"
348 "of the particular user or of the way in which the particular user\n"
349 "actually uses, or expects or is expected to use, the product. A product\n"
350 "is a consumer product regardless of whether the product has substantial\n"
351 "commercial, industrial or non-consumer uses, unless such uses represent\n"
352 "the only significant mode of use of the product.\n"
353 "\n"
354 " \"Installation Information\" for a User Product means any methods,\n"
355 "procedures, authorization keys, or other information required to install\n"
356 "and execute modified versions of a covered work in that User Product "
357 "from\n"
358 "a modified version of its Corresponding Source. The information must\n"
359 "suffice to ensure that the continued functioning of the modified object\n"
360 "code is in no case prevented or interfered with solely because\n"
361 "modification has been made.\n"
362 "\n"
363 " If you convey an object code work under this section in, or with, or\n"
364 "specifically for use in, a User Product, and the conveying occurs as\n"
365 "part of a transaction in which the right of possession and use of the\n"
366 "User Product is transferred to the recipient in perpetuity or for a\n"
367 "fixed term (regardless of how the transaction is characterized), the\n"
368 "Corresponding Source conveyed under this section must be accompanied\n"
369 "by the Installation Information. But this requirement does not apply\n"
370 "if neither you nor any third party retains the ability to install\n"
371 "modified object code on the User Product (for example, the work has\n"
372 "been installed in ROM).\n"
373 "\n"
374 " The requirement to provide Installation Information does not include a\n"
375 "requirement to continue to provide support service, warranty, or updates\n"
376 "for a work that has been modified or installed by the recipient, or for\n"
377 "the User Product in which it has been modified or installed. Access to "
378 "a\n"
379 "network may be denied when the modification itself materially and\n"
380 "adversely affects the operation of the network or violates the rules and\n"
381 "protocols for communication across the network.\n"
382 "\n"
383 " Corresponding Source conveyed, and Installation Information provided,\n"
384 "in accord with this section must be in a format that is publicly\n"
385 "documented (and with an implementation available to the public in\n"
386 "source code form), and must require no special password or key for\n"
387 "unpacking, reading or copying.\n"
388 "\n"
389 " 7. Additional Terms.\n"
390 "\n"
391 " \"Additional permissions\" are terms that supplement the terms of this\n"
392 "License by making exceptions from one or more of its conditions.\n"
393 "Additional permissions that are applicable to the entire Program shall\n"
394 "be treated as though they were included in this License, to the extent\n"
395 "that they are valid under applicable law. If additional permissions\n"
396 "apply only to part of the Program, that part may be used separately\n"
397 "under those permissions, but the entire Program remains governed by\n"
398 "this License without regard to the additional permissions.\n"
399 "\n"
400 " When you convey a copy of a covered work, you may at your option\n"
401 "remove any additional permissions from that copy, or from any part of\n"
402 "it. (Additional permissions may be written to require their own\n"
403 "removal in certain cases when you modify the work.) You may place\n"
404 "additional permissions on material, added by you to a covered work,\n"
405 "for which you have or can give appropriate copyright permission.\n"
406 "\n"
407 " Notwithstanding any other provision of this License, for material you\n"
408 "add to a covered work, you may (if authorized by the copyright holders "
409 "of\n"
410 "that material) supplement the terms of this License with terms:\n"
411 "\n"
412 " a) Disclaiming warranty or limiting liability differently from the\n"
413 " terms of sections 15 and 16 of this License; or\n"
414 "\n"
415 " b) Requiring preservation of specified reasonable legal notices or\n"
416 " author attributions in that material or in the Appropriate Legal\n"
417 " Notices displayed by works containing it; or\n"
418 "\n"
419 " c) Prohibiting misrepresentation of the origin of that material, or\n"
420 " requiring that modified versions of such material be marked in\n"
421 " reasonable ways as different from the original version; or\n"
422 "\n"
423 " d) Limiting the use for publicity purposes of names of licensors or\n"
424 " authors of the material; or\n"
425 "\n"
426 " e) Declining to grant rights under trademark law for use of some\n"
427 " trade names, trademarks, or service marks; or\n"
428 "\n"
429 " f) Requiring indemnification of licensors and authors of that\n"
430 " material by anyone who conveys the material (or modified versions of\n"
431 " it) with contractual assumptions of liability to the recipient, for\n"
432 " any liability that these contractual assumptions directly impose on\n"
433 " those licensors and authors.\n"
434 "\n"
435 " All other non-permissive additional terms are considered \"further\n"
436 "restrictions\" within the meaning of section 10. If the Program as you\n"
437 "received it, or any part of it, contains a notice stating that it is\n"
438 "governed by this License along with a term that is a further\n"
439 "restriction, you may remove that term. If a license document contains\n"
440 "a further restriction but permits relicensing or conveying under this\n"
441 "License, you may add to a covered work material governed by the terms\n"
442 "of that license document, provided that the further restriction does\n"
443 "not survive such relicensing or conveying.\n"
444 "\n"
445 " If you add terms to a covered work in accord with this section, you\n"
446 "must place, in the relevant source files, a statement of the\n"
447 "additional terms that apply to those files, or a notice indicating\n"
448 "where to find the applicable terms.\n"
449 "\n"
450 " Additional terms, permissive or non-permissive, may be stated in the\n"
451 "form of a separately written license, or stated as exceptions;\n"
452 "the above requirements apply either way.\n"
453 "\n"
454 " 8. Termination.\n"
455 "\n"
456 " You may not propagate or modify a covered work except as expressly\n"
457 "provided under this License. Any attempt otherwise to propagate or\n"
458 "modify it is void, and will automatically terminate your rights under\n"
459 "this License (including any patent licenses granted under the third\n"
460 "paragraph of section 11).\n"
461 "\n"
462 " However, if you cease all violation of this License, then your\n"
463 "license from a particular copyright holder is reinstated (a)\n"
464 "provisionally, unless and until the copyright holder explicitly and\n"
465 "finally terminates your license, and (b) permanently, if the copyright\n"
466 "holder fails to notify you of the violation by some reasonable means\n"
467 "prior to 60 days after the cessation.\n"
468 "\n"
469 " Moreover, your license from a particular copyright holder is\n"
470 "reinstated permanently if the copyright holder notifies you of the\n"
471 "violation by some reasonable means, this is the first time you have\n"
472 "received notice of violation of this License (for any work) from that\n"
473 "copyright holder, and you cure the violation prior to 30 days after\n"
474 "your receipt of the notice.\n"
475 "\n"
476 " Termination of your rights under this section does not terminate the\n"
477 "licenses of parties who have received copies or rights from you under\n"
478 "this License. If your rights have been terminated and not permanently\n"
479 "reinstated, you do not qualify to receive new licenses for the same\n"
480 "material under section 10.\n"
481 "\n"
482 " 9. Acceptance Not Required for Having Copies.\n"
483 "\n"
484 " You are not required to accept this License in order to receive or\n"
485 "run a copy of the Program. Ancillary propagation of a covered work\n"
486 "occurring solely as a consequence of using peer-to-peer transmission\n"
487 "to receive a copy likewise does not require acceptance. However,\n"
488 "nothing other than this License grants you permission to propagate or\n"
489 "modify any covered work. These actions infringe copyright if you do\n"
490 "not accept this License. Therefore, by modifying or propagating a\n"
491 "covered work, you indicate your acceptance of this License to do so.\n"
492 "\n"
493 " 10. Automatic Licensing of Downstream Recipients.\n"
494 "\n"
495 " Each time you convey a covered work, the recipient automatically\n"
496 "receives a license from the original licensors, to run, modify and\n"
497 "propagate that work, subject to this License. You are not responsible\n"
498 "for enforcing compliance by third parties with this License.\n"
499 "\n"
500 " An \"entity transaction\" is a transaction transferring control of an\n"
501 "organization, or substantially all assets of one, or subdividing an\n"
502 "organization, or merging organizations. If propagation of a covered\n"
503 "work results from an entity transaction, each party to that\n"
504 "transaction who receives a copy of the work also receives whatever\n"
505 "licenses to the work the party's predecessor in interest had or could\n"
506 "give under the previous paragraph, plus a right to possession of the\n"
507 "Corresponding Source of the work from the predecessor in interest, if\n"
508 "the predecessor has it or can get it with reasonable efforts.\n"
509 "\n"
510 " You may not impose any further restrictions on the exercise of the\n"
511 "rights granted or affirmed under this License. For example, you may\n"
512 "not impose a license fee, royalty, or other charge for exercise of\n"
513 "rights granted under this License, and you may not initiate litigation\n"
514 "(including a cross-claim or counterclaim in a lawsuit) alleging that\n"
515 "any patent claim is infringed by making, using, selling, offering for\n"
516 "sale, or importing the Program or any portion of it.\n"
517 "\n"
518 " 11. Patents.\n"
519 "\n"
520 " A \"contributor\" is a copyright holder who authorizes use under this\n"
521 "License of the Program or a work on which the Program is based. The\n"
522 "work thus licensed is called the contributor's \"contributor version\".\n"
523 "\n"
524 " A contributor's \"essential patent claims\" are all patent claims\n"
525 "owned or controlled by the contributor, whether already acquired or\n"
526 "hereafter acquired, that would be infringed by some manner, permitted\n"
527 "by this License, of making, using, or selling its contributor version,\n"
528 "but do not include claims that would be infringed only as a\n"
529 "consequence of further modification of the contributor version. For\n"
530 "purposes of this definition, \"control\" includes the right to grant\n"
531 "patent sublicenses in a manner consistent with the requirements of\n"
532 "this License.\n"
533 "\n"
534 " Each contributor grants you a non-exclusive, worldwide, royalty-free\n"
535 "patent license under the contributor's essential patent claims, to\n"
536 "make, use, sell, offer for sale, import and otherwise run, modify and\n"
537 "propagate the contents of its contributor version.\n"
538 "\n"
539 " In the following three paragraphs, a \"patent license\" is any express\n"
540 "agreement or commitment, however denominated, not to enforce a patent\n"
541 "(such as an express permission to practice a patent or covenant not to\n"
542 "sue for patent infringement). To \"grant\" such a patent license to a\n"
543 "party means to make such an agreement or commitment not to enforce a\n"
544 "patent against the party.\n"
545 "\n"
546 " If you convey a covered work, knowingly relying on a patent license,\n"
547 "and the Corresponding Source of the work is not available for anyone\n"
548 "to copy, free of charge and under the terms of this License, through a\n"
549 "publicly available network server or other readily accessible means,\n"
550 "then you must either (1) cause the Corresponding Source to be so\n"
551 "available, or (2) arrange to deprive yourself of the benefit of the\n"
552 "patent license for this particular work, or (3) arrange, in a manner\n"
553 "consistent with the requirements of this License, to extend the patent\n"
554 "license to downstream recipients. \"Knowingly relying\" means you have\n"
555 "actual knowledge that, but for the patent license, your conveying the\n"
556 "covered work in a country, or your recipient's use of the covered work\n"
557 "in a country, would infringe one or more identifiable patents in that\n"
558 "country that you have reason to believe are valid.\n"
559 "\n"
560 " If, pursuant to or in connection with a single transaction or\n"
561 "arrangement, you convey, or propagate by procuring conveyance of, a\n"
562 "covered work, and grant a patent license to some of the parties\n"
563 "receiving the covered work authorizing them to use, propagate, modify\n"
564 "or convey a specific copy of the covered work, then the patent license\n"
565 "you grant is automatically extended to all recipients of the covered\n"
566 "work and works based on it.\n"
567 "\n"
568 " A patent license is \"discriminatory\" if it does not include within\n"
569 "the scope of its coverage, prohibits the exercise of, or is\n"
570 "conditioned on the non-exercise of one or more of the rights that are\n"
571 "specifically granted under this License. You may not convey a covered\n"
572 "work if you are a party to an arrangement with a third party that is\n"
573 "in the business of distributing software, under which you make payment\n"
574 "to the third party based on the extent of your activity of conveying\n"
575 "the work, and under which the third party grants, to any of the\n"
576 "parties who would receive the covered work from you, a discriminatory\n"
577 "patent license (a) in connection with copies of the covered work\n"
578 "conveyed by you (or copies made from those copies), or (b) primarily\n"
579 "for and in connection with specific products or compilations that\n"
580 "contain the covered work, unless you entered into that arrangement,\n"
581 "or that patent license was granted, prior to 28 March 2007.\n"
582 "\n"
583 " Nothing in this License shall be construed as excluding or limiting\n"
584 "any implied license or other defenses to infringement that may\n"
585 "otherwise be available to you under applicable patent law.\n"
586 "\n"
587 " 12. No Surrender of Others' Freedom.\n"
588 "\n"
589 " If conditions are imposed on you (whether by court order, agreement or\n"
590 "otherwise) that contradict the conditions of this License, they do not\n"
591 "excuse you from the conditions of this License. If you cannot convey a\n"
592 "covered work so as to satisfy simultaneously your obligations under this\n"
593 "License and any other pertinent obligations, then as a consequence you "
594 "may\n"
595 "not convey it at all. For example, if you agree to terms that obligate "
596 "you\n"
597 "to collect a royalty for further conveying from those to whom you convey\n"
598 "the Program, the only way you could satisfy both those terms and this\n"
599 "License would be to refrain entirely from conveying the Program.\n"
600 "\n"
601 " 13. Use with the GNU Affero General Public License.\n"
602 "\n"
603 " Notwithstanding any other provision of this License, you have\n"
604 "permission to link or combine any covered work with a work licensed\n"
605 "under version 3 of the GNU Affero General Public License into a single\n"
606 "combined work, and to convey the resulting work. The terms of this\n"
607 "License will continue to apply to the part which is the covered work,\n"
608 "but the special requirements of the GNU Affero General Public License,\n"
609 "section 13, concerning interaction through a network will apply to the\n"
610 "combination as such.\n"
611 "\n"
612 " 14. Revised Versions of this License.\n"
613 "\n"
614 " The Free Software Foundation may publish revised and/or new versions "
615 "of\n"
616 "the GNU General Public License from time to time. Such new versions "
617 "will\n"
618 "be similar in spirit to the present version, but may differ in detail to\n"
619 "address new problems or concerns.\n"
620 "\n"
621 " Each version is given a distinguishing version number. If the\n"
622 "Program specifies that a certain numbered version of the GNU General\n"
623 "Public License \"or any later version\" applies to it, you have the\n"
624 "option of following the terms and conditions either of that numbered\n"
625 "version or of any later version published by the Free Software\n"
626 "Foundation. If the Program does not specify a version number of the\n"
627 "GNU General Public License, you may choose any version ever published\n"
628 "by the Free Software Foundation.\n"
629 "\n"
630 " If the Program specifies that a proxy can decide which future\n"
631 "versions of the GNU General Public License can be used, that proxy's\n"
632 "public statement of acceptance of a version permanently authorizes you\n"
633 "to choose that version for the Program.\n"
634 "\n"
635 " Later license versions may give you additional or different\n"
636 "permissions. However, no additional obligations are imposed on any\n"
637 "author or copyright holder as a result of your choosing to follow a\n"
638 "later version.\n"
639 "\n"
640 " 15. Disclaimer of Warranty.\n"
641 "\n"
642 " THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n"
643 "APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n"
644 "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT "
645 "WARRANTY\n"
646 "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n"
647 "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n"
648 "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE "
649 "PROGRAM\n"
650 "IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n"
651 "ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"
652 "\n"
653 " 16. Limitation of Liability.\n"
654 "\n"
655 " IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"
656 "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR "
657 "CONVEYS\n"
658 "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING "
659 "ANY\n"
660 "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n"
661 "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS "
662 "OF\n"
663 "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR "
664 "THIRD\n"
665 "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n"
666 "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY "
667 "OF\n"
668 "SUCH DAMAGES.\n"
669 "\n"
670 " 17. Interpretation of Sections 15 and 16.\n"
671 "\n"
672 " If the disclaimer of warranty and limitation of liability provided\n"
673 "above cannot be given local legal effect according to their terms,\n"
674 "reviewing courts shall apply local law that most closely approximates\n"
675 "an absolute waiver of all civil liability in connection with the\n"
676 "Program, unless a warranty or assumption of liability accompanies a\n"
677 "copy of the Program in return for a fee.\n"
678 "\n"
679 " END OF TERMS AND CONDITIONS\n"
680 "\n"
681 " How to Apply These Terms to Your New Programs\n"
682 "\n"
683 " If you develop a new program, and you want it to be of the greatest\n"
684 "possible use to the public, the best way to achieve this is to make it\n"
685 "free software which everyone can redistribute and change under these "
686 "terms.\n"
687 "\n"
688 " To do so, attach the following notices to the program. It is safest\n"
689 "to attach them to the start of each source file to most effectively\n"
690 "state the exclusion of warranty; and each file should have at least\n"
691 "the \"copyright\" line and a pointer to where the full notice is found.\n"
692 "\n"
693 " <one line to give the program's name and a brief idea of what it "
694 "does.>\n"
695 " Copyright (C) <year> <name of author>\n"
696 "\n"
697 " This program is free software: you can redistribute it and/or modify\n"
698 " it under the terms of the GNU General Public License as published by\n"
699 " the Free Software Foundation, either version 3 of the License, or\n"
700 " (at your option) any later version.\n"
701 "\n"
702 " This program is distributed in the hope that it will be useful,\n"
703 " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
704 " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
705 " GNU General Public License for more details.\n"
706 "\n"
707 " You should have received a copy of the GNU General Public License\n"
708 " along with this program. If not, see "
709 "<http://www.gnu.org/licenses/>.\n"
710 "\n"
711 "Also add information on how to contact you by electronic and paper mail.\n"
712 "\n"
713 " If the program does terminal interaction, make it output a short\n"
714 "notice like this when it starts in an interactive mode:\n"
715 "\n"
716 " <program> Copyright (C) <year> <name of author>\n"
717 " This program comes with ABSOLUTELY NO WARRANTY; for details type "
718 "`show w'.\n"
719 " This is free software, and you are welcome to redistribute it\n"
720 " under certain conditions; type `show c' for details.\n"
721 "\n"
722 "The hypothetical commands `show w' and `show c' should show the "
723 "appropriate\n"
724 "parts of the General Public License. Of course, your program's commands\n"
725 "might be different; for a GUI interface, you would use an \"about box\".\n"
726 "\n"
727 " You should also get your employer (if you work as a programmer) or "
728 "school,\n"
729 "if any, to sign a \"copyright disclaimer\" for the program, if "
730 "necessary.\n"
731 "For more information on this, and how to apply and follow the GNU GPL, "
732 "see\n"
733 "<http://www.gnu.org/licenses/>.\n"
734 "\n"
735 " The GNU General Public License does not permit incorporating your "
736 "program\n"
737 "into proprietary programs. If your program is a subroutine library, you\n"
738 "may consider it more useful to permit linking proprietary applications "
739 "with\n"
740 "the library. If this is what you want to do, use the GNU Lesser General\n"
741 "Public License instead of this License. But first, please read\n"
742 "<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n");
743
744
745 QString gplLegalDisclaimerLiabilitySections(
746 " 15. Disclaimer of Warranty.\n"
747 "\n"
748 " THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n"
749 "APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n"
750 "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT "
751 "WARRANTY\n"
752 "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n"
753 "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n"
754 "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE "
755 "PROGRAM\n"
756 "IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n"
757 "ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"
758 "\n"
759 " 16. Limitation of Liability.\n"
760 "\n"
761 " IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"
762 "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR "
763 "CONVEYS\n"
764 "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING "
765 "ANY\n"
766 "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n"
767 "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS "
768 "OF\n"
769 "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR "
770 "THIRD\n"
771 "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n"
772 "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY "
773 "OF\n"
774 "SUCH DAMAGES.\n"
775 "\n");
776
777 } // namespace minexpert
778
779 } // namespace msxps
780
0 /* BEGIN software license
1 *
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright(C) 2009, 2017 Filippo Rusconi
5 *
6 * http://www.msxpertsuite.org
7 *
8 * This file is part of the msXpertSuite project.
9 *
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
12 *
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
0 /* BEGIN software license
1 *
2 * msXpertSuite - mass spectrometry software suite
3 * -----------------------------------------------
4 * Copyright (C) 2009--2020 Filippo Rusconi
5 *
6 * http://www.msxpertsuite.org
7 *
8 * This file is part of the msXpertSuite project.
9 *
10 * The msXpertSuite project is the successor of the massXpert project. This
11 * project now includes various independent modules:
12 *
13 * - massXpert, model polymer chemistries and simulate mass spectrometric data;
14 * - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
15 *
16 * This program is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2828 *
2929 * END software license
3030 */
31
32
3133
3234 #include <cmath>
3335 #include <limits>
11 *
22 * msXpertSuite - mass spectrometry software suite
33 * -----------------------------------------------
4 * Copyright(C) 2009,...,2018 Filippo Rusconi
4 * Copyright (C) 2009--2020 Filippo Rusconi
55 *
66 * http://www.msxpertsuite.org
77 *
0 if(TESTS AND (UNIX AND NOT APPLE))
0 if(MAKE_TESTS AND (UNIX AND NOT APPLE))
11
22 message(\n${BoldRed}"Now configuring src/tests for ${CMAKE_PROJECT_NAME}"${ColourReset}\n)
33 message("TARGET is: ${TARGET}")
77 ########################################################
88 # Files
99
10 file(GLOB tests_SRCS
11
12 # Files from the main code source tree
13 ../src/nongui/MzIntegrationParams.cpp
10 set(tests_SRCS
1411
1512 # The main() of the tests executable file
1613 testmain.cpp
1714
1815 # Files for the tests
19 nongui/DataPoint_test.cpp
20 nongui/Trace_test.cpp
21 nongui/MapTrace_test.cpp
22 nongui/MassSpectrum_test.cpp
23 nongui/TraceCombiner_test.cpp
24 nongui/MassSpectrumCombiner_test.cpp
25 nongui/MzIntegrationParams_test.cpp
2616 )
2717
2818 find_package(Catch2 REQUIRED)
3121 # Instruct CMake to run moc automatically when needed.
3222 set(CMAKE_AUTOMOC ON)
3323
34 find_package(Qt5 COMPONENTS Widgets Xml Svg Sql Script)
24 find_package(Qt5 COMPONENTS Widgets Xml Svg)
3525
3626 qt5_wrap_ui(tests_UIS_H ${${TARGET}_UIS})
3727
4838 qt5_use_modules(tests Widgets)
4939 qt5_use_modules(tests Xml)
5040 qt5_use_modules(tests Svg)
51 qt5_use_modules(tests Sql)
52 qt5_use_modules(tests Script)
5341 qt5_use_modules(tests PrintSupport)
5442
5543 #message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
6553 ${Qt5Widgets_INCLUDE_DIRS}
6654 ${Qt5Xml_INCLUDE_DIRS}
6755 ${Qt5Svg_INCLUDE_DIRS}
68 ${Qt5Sql_INCLUDE_DIRS}
6956 ${Qt5PrintSupport_INCLUDE_DIRS}
7057 )
7158
8875 target_link_libraries(tests
8976 ${required_target_link_libraries})
9077
78 #add_test(tests "All Catch2-based tests")
79 add_test(tests "tests")
80
9181 message("")
9282 message(STATUS "${BoldGreen}Finished processing src/tests.${ColourReset}")
9383 message("")
9686 message(STATUS "Tests are not built.")
9787 endif()
9888
89
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
228228 data_point_vector.push_back(DataPoint("610.07500 15639.6568298340"));
229229 data_point_vector.push_back(DataPoint("610.12500 55999.7628784180"));
230230 data_point_vector.push_back(DataPoint("610.17500 9335990.3578681946"));
231 data_point_vector.push_back(DataPoint("610.2200000 635674266.1611375809"));
231 data_point_vector.push_back(DataPoint("610.22500 635674266.1611375809"));
232232 data_point_vector.push_back(DataPoint("610.27500 54459.4762458801"));
233233 data_point_vector.push_back(DataPoint("610.32500 205580.6580276489"));
234234 data_point_vector.push_back(DataPoint("610.37500 84627.3196716309"));
256256 // Prepare the bins on the basis of the spectrum.
257257
258258 int decimal_places = 5;
259
260 // The size of the bins.
259261 pappso::PrecisionPtr precision_p =
260262 pappso::PrecisionFactory::getDaltonInstance(0.05);
261263
262 MzIntegrationParams mz_integration_params(610.02,
264 MzIntegrationParams mz_integration_params(610.025,
263265 610.975,
264266 BinningType::ARBITRARY,
265267 decimal_places,
268270 0.0,
269271 true);
270272
271 // Check that it does not compute bins, since BinningType::NONE.
272
273273 std::vector<double> bins = mz_integration_params.createBins();
274274 REQUIRE(bins.size() == 21);
275 REQUIRE(bins[0] == 610.02000);
275 REQUIRE(bins[0] == 610.02500);
276276
277277 // The last bin matches the last DataPoint of the second spectrum + one bin
278278 // size.
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
212212 REQUIRE(tic == 12963.5715942383 + 15639.6568298340 + 55999.7628784180);
213213
214214 tic = mass_spectrum.tic(610.020001, 610.12001);
215 REQUIRE(tic == 15639.6568298340);
215 REQUIRE(tic == 15639.6568298340 + 55999.7628784180);
216216 }
217217
218218 SECTION("Get the maxIntensityDataPoint from MassSpectrum", "[MassSpectrum]")
219219 {
220220 DataPoint datapoint = mass_spectrum.maxIntensityDataPoint();
221 REQUIRE(datapoint.x == 610.2200000);
222 REQUIRE(datapoint.y == 635674266.1611375809);
221 REQUIRE(datapoint.x == 610.1200000);
222 REQUIRE(datapoint.y == 55999.7628784180);
223223 }
224224
225225 SECTION("Get the minIntensityDataPoint from MassSpectrum", "[MassSpectrum]")
226226 {
227227 DataPoint datapoint = mass_spectrum.minIntensityDataPoint();
228 REQUIRE(datapoint.x == 613.52000);
229 REQUIRE(datapoint.y == 480.5255737305);
228 REQUIRE(datapoint.x == 610.02000);
229 REQUIRE(datapoint.y == 12963.5715942383);
230230 }
231231 }
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
44 #include "../../src/nongui/MzIntegrationParams.hpp"
5 #include <pappsomspp/utils.h>
56
67
78 using namespace pappso;
115116 }
116117 }
117118
118 TEST_CASE("Create bins", "[MzIntegrationParams]")
119 {
120 double smallestMz = 1800.373856;
121 double greatestMz = 2600.956480;
122 BinningType binningType = BinningType::ARBITRARY;
123 int decimalPlaces = 3;
124 PrecisionPtr precision_p = pappso::PrecisionFactory::getPpmInstance(20);
125 bool applyMzShift = false;
126 double mzShift = 0;
119
120 TEST_CASE("Create bins with Da-based bin size", "[MzIntegrationParams]")
121 {
122 double smallestMz = 1800.373856;
123 double greatestMz = 1800.373856;
124 BinningType binningType = BinningType::ARBITRARY;
125 int decimalPlaces = 3;
126 PrecisionPtr precision_p = pappso::PrecisionFactory::getDaltonInstance(0.05);
127 bool applyMzShift = false;
128 double mzShift = 0;
127129 bool removeZeroValDataPoints = true;
128130
129131 MzIntegrationParams mz_integration_params(smallestMz,
142144
143145 // Do not forget that we round to 3 decimal places:
144146 REQUIRE(bins.front() == 1800.374);
145 REQUIRE(bins.back() == 2600.957 + precision_p->delta(2600.957));
146 }
147 }
147
148 // We create two bins: the first mz value (1800.374) and a new one that is
149 // that mz value incremented by the delta (that is the size of the bin that
150 // is created using an increment of 0.05).
151
152 REQUIRE(bins.back() == 1800.374 + precision_p->delta(1800.374));
153 }
154 }
155
156
157 TEST_CASE("Create bins with ppm-based bin sizes", "[MzIntegrationParams]")
158 {
159 double smallestMz = 1800.373856;
160 double greatestMz = 1800.373856;
161 BinningType binningType = BinningType::ARBITRARY;
162 int decimalPlaces = 3;
163 PrecisionPtr precision_p = pappso::PrecisionFactory::getPpmInstance(20);
164 bool applyMzShift = false;
165 double mzShift = 0;
166 bool removeZeroValDataPoints = true;
167
168 MzIntegrationParams mz_integration_params(smallestMz,
169 greatestMz,
170 binningType,
171 decimalPlaces,
172 precision_p,
173 applyMzShift,
174 mzShift,
175 removeZeroValDataPoints);
176
177 SECTION("Create bins in ARBITRARY mode", "[MzIntegrationParams]")
178 {
179
180 std::vector<double> bins = mz_integration_params.createBins();
181
182 // Do not forget that we round to 3 decimal places:
183 REQUIRE(bins.front() == 1800.374);
184
185 // Check that the precision delta is computed correctly:
186 double precision_delta = 1800.374 * 20 / 1000000;
187 REQUIRE(pappso::Utils::almostEqual(
188 precision_p->delta(1800.374), precision_delta, /*decimal_places*/ 15));
189
190 double rounded_precision_delta =
191 ceil((precision_delta * pow(10, decimalPlaces)) - 0.49) /
192 pow(10, decimalPlaces);
193
194 // We create two bins: the first mz value (1800.374) and a new one that is
195 // that mz value incremented by the delta (that is the size of the bin that
196 // is created using relative proportion of 20 ppm).
197
198 REQUIRE(bins.back() == 1800.374 + rounded_precision_delta);
199 }
200 }
201
202
203 TEST_CASE("Create bins with res-based bin sizes", "[MzIntegrationParams]")
204 {
205 double smallestMz = 1800.373856;
206 double greatestMz = 1800.373856;
207 BinningType binningType = BinningType::ARBITRARY;
208 int decimalPlaces = 3;
209 PrecisionPtr precision_p = pappso::PrecisionFactory::getResInstance(20000);
210 bool applyMzShift = false;
211 double mzShift = 0;
212 bool removeZeroValDataPoints = true;
213
214 MzIntegrationParams mz_integration_params(smallestMz,
215 greatestMz,
216 binningType,
217 decimalPlaces,
218 precision_p,
219 applyMzShift,
220 mzShift,
221 removeZeroValDataPoints);
222
223 SECTION("Create bins in ARBITRARY mode", "[MzIntegrationParams]")
224 {
225
226 std::vector<double> bins = mz_integration_params.createBins();
227
228 // Do not forget that we round to 3 decimal places:
229 REQUIRE(bins.front() == 1800.374);
230
231 // Check that the precision delta is computed correctly:
232 double precision_delta = 1800.374 / 20000;
233 REQUIRE(pappso::Utils::almostEqual(
234 precision_p->delta(1800.374), precision_delta, /*decimal_places*/ 15));
235
236 double rounded_precision_delta =
237 ceil((precision_delta * pow(10, decimalPlaces)) - 0.49) /
238 pow(10, decimalPlaces);
239
240 // We create two bins: the first mz value (1800.374) and a new one that is
241 // that mz value incremented by the delta (that is the size of the bin that
242 // is created using relative proportion of 20 ppm).
243
244 REQUIRE(bins.back() == 1800.374 + rounded_precision_delta);
245 }
246 }
247
248
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
0 #include <catch.hpp>
0 #include <catch2/catch.hpp>
11
22 #include <QDebug>
33
510510 std::vector<DataPoint> data_point_vector;
511511
512512 // clang-format off
513 data_point_vector.push_back(DataPoint("610.02000 55999.00000"));
514 data_point_vector.push_back(DataPoint("610.07000 55999.00000"));
515 data_point_vector.push_back(DataPoint("610.12000 55999.00000"));
516 data_point_vector.push_back(DataPoint("610.17000 55599.00000"));
517 data_point_vector.push_back(DataPoint("610.2200000 635674266.1611375809"));
518 data_point_vector.push_back(DataPoint("610.27000 54459.4762458801"));
519 data_point_vector.push_back(DataPoint("610.32000 205580.6580276489"));
520 data_point_vector.push_back(DataPoint("610.37000 84627.3196716309"));
521 data_point_vector.push_back(DataPoint("610.42000 51061.7636718750"));
522 data_point_vector.push_back(DataPoint("610.47000 20260.0218505859"));
523 data_point_vector.push_back(DataPoint("610.52000 29848.3424072266"));
524 data_point_vector.push_back(DataPoint("610.57000 27266.8031616211"));
513 data_point_vector.push_back(DataPoint(610.02000, 55999));
514 data_point_vector.push_back(DataPoint(610.07000, 55999));
515 data_point_vector.push_back(DataPoint(610.12000, 55999));
516 data_point_vector.push_back(DataPoint(610.17000, 55599));
517 data_point_vector.push_back(DataPoint(610.22000, 635674266));
518 data_point_vector.push_back(DataPoint(610.27000, 54459.4762458801));
519 data_point_vector.push_back(DataPoint(610.32000, 205580.658027648));
520 data_point_vector.push_back(DataPoint(610.37000, 84627.3196716309));
521 data_point_vector.push_back(DataPoint(610.42000, 51061.7636718750));
522 data_point_vector.push_back(DataPoint(610.47000, 20260.0218505859));
523 data_point_vector.push_back(DataPoint(610.52000, 29848.3424072266));
524 data_point_vector.push_back(DataPoint(610.57000, 27266.8031616211));
525525 // clang-format on
526526
527527 Trace trace(data_point_vector);
528528
529529 std::vector<DataPoint>::iterator iterator =
530 findDifferentYvalue(trace.begin(), trace.end(), 55999.00000);
531
532 REQUIRE((*iterator).y == 635674266.1611375809);
530 findDifferentYvalue(trace.begin(), trace.end(), 55999.0);
531
532 REQUIRE((*iterator).y == 635674266);
533533 }
534534
535535 SECTION("Test minYDataPoint", "[Trace][filters]")
594594 {
595595 // As long as prev datapoint has y value less or equal to next,
596596 // move along up the container. That is, continue moving if
597 // direction is downhill to the beginning of the container (its front).
597 // direction is downhill to the beginning of the container (its front)
598 // or if direction is uphill to the right (its back).
598599
599600 std::vector<DataPoint> data_point_vector;
600601
607608 data_point_vector.push_back(DataPoint("610.02000 12961.5715942383"));
608609 data_point_vector.push_back(DataPoint("610.02000 12962.5715942383"));
609610 data_point_vector.push_back(DataPoint("610.02000 12963.5715942383"));
610 data_point_vector.push_back(DataPoint("610.02000 12963.5715942383"));
611611 // clang-format on
612612
613613 Trace trace(data_point_vector);
00 #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do
11 // this in one cpp file
2 #include <catch.hpp>
2 #include <catch2/catch.hpp>