New upstream version 7.4.0
Filippo Rusconi (Uploading Debian Developer)
3 years ago
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 |
7 | 7 | # Basic information about project |
8 | 8 | |
9 | 9 | project(mineXpert2 |
10 | DESCRIPTION "A program to visualize and mine mass spectrometric data" | |
10 | DESCRIPTION "A program to visualize and explore mass spectrometric data" | |
11 | 11 | HOMEPAGE_URL "http://wwww.msxpertsuite.org/minexpert2") |
12 | 12 | |
13 | set(VERSION 7.3.0) | |
13 | set(VERSION 7.4.0) | |
14 | 14 | |
15 | 15 | # Set additional project information |
16 | 16 | set(COMPANY "msXpertSuite.org") |
235 | 235 | ############################################################# |
236 | 236 | #################### |
237 | 237 | # 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 | ||
239 | 245 | add_subdirectory(tests) |
246 | ||
247 | endif(BUILD_TESTING) | |
248 | ||
240 | 249 | endif() |
241 | 250 | |
242 | 251 |
51 | 51 | |
52 | 52 | if(PappsoMSpp_FOUND) |
53 | 53 | |
54 | message(STATUS "PappsoMSpp was found at: ${PappsoMSpp_LIBRARY}") | |
54 | message(STATUS "PappsoMSpp and PappsoMSppWidget were found at: ${PappsoMSpp_LIBRARY}") | |
55 | 55 | message(STATUS "Include dir for PappsoMSpp is at: ${PappsoMSpp_INCLUDE_DIRS}") |
56 | 56 | |
57 | 57 | endif() |
192 | 192 | "directory": "/home/rusconi/devel/minexpert2/build-area/unix/src", |
193 | 193 | "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", |
194 | 194 | "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" | |
200 | 195 | }, |
201 | 196 | { |
202 | 197 | "directory": "/home/rusconi/devel/minexpert2/build-area/unix/src", |
29 | 29 | |
30 | 30 | </dedication> |
31 | 31 | |
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>--> | |
34 | 34 | |
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>--> | |
37 | 37 | |
38 | 38 | <xi:include href="graphical-user-interface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> |
39 | 39 | </xi:include> |
41 | 41 | <xi:include href="mass-data-integrations.xml" xmlns:xi="http://www.w3.org/2001/XInclude"> |
42 | 42 | </xi:include> |
43 | 43 | |
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>--> | |
46 | 46 | |
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>--> | |
49 | 49 | |
50 | 50 | <!--<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">--> | |
51 | 53 | <!--</xi:include>--> |
52 | 54 | |
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>--> | |
55 | 57 | |
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>--> | |
61 | 60 | |
62 | 61 | <!--<xi:include href="feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude">--> |
63 | 62 | <!--</xi:include>--> |
17 | 17 | <title>&PRODUCT; User Manual</title> |
18 | 18 | <productnumber>&VERSION;</productnumber> |
19 | 19 | <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> | |
21 | 21 | <releaseinfo>&VERSION;</releaseinfo> |
22 | 22 | <date> |
23 | 23 | <?dbtimestamp format="B d, Y"?> |
14 | 14 | ]> |
15 | 15 | |
16 | 16 | <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 ∫, 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 spectrum per second. | |
56 | This apparent slow acquisition rate is configurable. At the time of | |
57 | writing, generally 1 spectrum per second is recorded on disk. So, say | |
58 | we record mass spectra for 5 minutes, we would have recorded | |
59 | (5*60) 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—the next to the | |
77 | previous—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 spectra that need to be combined together into a | |
127 | <emphasis>single</emphasis> spectrum that summatively represents the | |
128 | data of these 200 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 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; value identical to the &mz; value of the current | |
156 | &mzi; pair is already present;</para> | |
157 | ||
158 | </listitem> | |
159 | ||
160 | <listitem> | |
161 | ||
162 | <para> If the &mz; 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; 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 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—summatively—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; 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; 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; 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 min: there would be a total of (45 * | |
233 | 60) spectra in that file. The question is: | |
234 | —<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 ∫, 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 spectrum per second. | |
56 | This apparent slow acquisition rate is configurable. At the time of | |
57 | writing, generally 1 spectrum per second is recorded on disk. So, say | |
58 | we record mass spectra for 5 minutes, we would have recorded | |
59 | (5*60) 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—the next to the | |
77 | previous—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 spectra that need to be combined together into a | |
127 | <emphasis>single</emphasis> spectrum that summatively represents the | |
128 | data of these 200 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 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; value identical to the &mz; value of the current | |
156 | &mzi; pair is already present;</para> | |
157 | ||
158 | </listitem> | |
159 | ||
160 | <listitem> | |
161 | ||
162 | <para> If the &mz; 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; 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 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—summatively—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; 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; 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; 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 min: there would be a total of (45 * | |
233 | 60) spectra in that file. The question is: | |
234 | —<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> | |
250 | 250 | |
251 | 251 | <para>How is this total ion current chromatogram computed? This is an |
252 | iterative process: from the first spectrum (retention time value | |
253 | 0 s), to the second spectrum (retention time value 1 s) up to | |
254 | the last spectrum (retention time 45 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 s), to the second spectrum (retention time value 1 s) up to | |
254 | the last spectrum (retention time 45 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 | |
259 | 259 | chromatogram.</para> |
260 | 260 | |
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 minute 7 and | |
345 | RT minute 8.5?</para> | |
346 | ||
347 | <orderedlist> | |
348 | ||
349 | <listitem> | |
350 | ||
351 | <para>List all the mass spectra that were acquired between RT 7 | |
352 | and RT 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 | ≈ 200 spectra are acquired and stored individually | |
356 | every second (I mean it, every 1 s time lapse);</para> | |
357 | ||
358 | </listitem> | |
359 | ||
360 | <listitem> | |
361 | ||
362 | <para> Allocate a new empty spectrum—the | |
363 | <emphasis><quote>combined spectrum</quote></emphasis>—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; 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 <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 minute 7 and | |
417 | RT minute 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 7 and RT 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 spectra each second. These | |
455 | 200 spectra actually correspond to the way the drift | |
456 | cycle is divided into 200 bin (time bins). That means | |
457 | that in the retention time range [7–8.5], there are | |
458 | (1.5*60) complete drift cycles. And thus there are (1.5*60) | |
459 | spectra with drift time x, the same amount of spectra | |
460 | with drift time y, and so on for the reminaing | |
461 | 198 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: —<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 <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: —<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 minute 7 and | |
345 | RT minute 8.5?</para> | |
346 | ||
347 | <orderedlist> | |
348 | ||
349 | <listitem> | |
350 | ||
351 | <para>List all the mass spectra that were acquired between RT 7 | |
352 | and RT 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 | ≈ 200 spectra are acquired and stored individually | |
356 | every second (I mean it, every 1 s time lapse);</para> | |
357 | ||
358 | </listitem> | |
359 | ||
360 | <listitem> | |
361 | ||
362 | <para> Allocate a new empty spectrum—the | |
363 | <emphasis><quote>combined spectrum</quote></emphasis>—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; 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 <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 minute 7 and | |
417 | RT minute 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 7 and RT 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 spectra each second. These | |
455 | 200 spectra actually correspond to the way the drift | |
456 | cycle is divided into 200 bin (time bins). That means | |
457 | that in the retention time range [7–8.5], there are | |
458 | (1.5*60) complete drift cycles. And thus there are (1.5*60) | |
459 | spectra with drift time x, the same amount of spectra | |
460 | with drift time y, and so on for the reminaing | |
461 | 198 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: —<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 <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: —<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 | <package_name></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…</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 |
98 | 98 | |
99 | 99 | <title>The Window Layout</title> |
100 | 100 | |
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> | |
105 | 106 | |
106 | 107 | <itemizedlist> |
107 | 108 |
12 | 12 | |
13 | 13 | <revhistory xmlns="http://docbook.org/ns/docbook" version="5.0"> |
14 | 14 | |
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> | |
21 | 64 | |
22 | 65 | Update of the user manual to document the new combine+ and combine- |
23 | 66 | combinations features. |
24 | 67 | |
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> | |
35 | 78 | |
36 | 79 | Update of the user manual to document new features, in particular the |
37 | 80 | MS<superscript>n</superscript> mass spectrometric data mining and new mass |
38 | 81 | data plotting features. |
39 | 82 | |
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> | |
169 | 212 | |
170 | 213 | </revision> |
171 | 214 |
Binary diff not shown
160 | 160 | id="tspan831" |
161 | 161 | x="392.0386" |
162 | 162 | 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> | |
164 | 164 | </g> |
165 | 165 | </svg> |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2019 Filippo Rusconi | |
4 | * Copyright (C) 2009-2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
16 | 16 | Icon=minexpert2 |
17 | 17 | |
18 | 18 | Categories=Science;Chemistry;Biology;Qt |
19 | Categories[fr]=Science;Chimie;Biologie;Qt | |
20 | Categories[it]=Scienza;Chimica;Biologia;Qt | |
21 | 19 | |
22 | 20 | Keywords=Mass spectrometry;Biology;Chemistry |
23 | 21 | Keywords[fr]=Spectrométrie de masse;Biologie;Chimie |
65 | 65 | # |
66 | 66 | # The classes that handle the parameters for the various integrations and the |
67 | 67 | # display of traces. |
68 | nongui/MzIntegrationParams.cpp | |
69 | 68 | nongui/MsFragmentationSpec.cpp |
70 | 69 | # |
71 | 70 | # Peak-shaping classes (Gaussian Lorentzian peak shapes). |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
55 | 55 | |
56 | 56 | /////////////////////// Local includes |
57 | 57 | #include "Application.hpp" |
58 | #include "nongui/MzIntegrationParams.hpp" | |
58 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
59 | 59 | #include "gui/MsRunDataSetTableView.hpp" |
60 | 60 | #include "gui/MsRunDataSetTableViewItem.hpp" |
61 | 61 | #include "gui/MsRunDataSetTableViewModel.hpp" |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
52 | 52 | #include "BasePlotCompositeWidget.hpp" |
53 | 53 | #include "../nongui/MsRunDataSet.hpp" |
54 | 54 | #include "../nongui/ProcessingFlow.hpp" |
55 | #include "../nongui/MzIntegrationParams.hpp" | |
55 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
56 | 56 | |
57 | 57 | |
58 | 58 | namespace msxps |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
36 | 36 | /////////////////////// Qt includes |
37 | 37 | #include <QMessageBox> |
38 | 38 | #include <QSvgGenerator> |
39 | #include <QSpinBox> | |
39 | 40 | |
40 | 41 | /////////////////////// QCustomPlot |
41 | 42 | |
83 | 84 | // to setup the ui so that the widgets are known when we use them below. |
84 | 85 | m_ui.setupUi(dynamic_cast<QWidget *>(this)); |
85 | 86 | |
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 | ||
86 | 97 | // Construct the context menu that will be associated to the main menu push |
87 | 98 | // button. |
88 | 99 | |
99 | 110 | m_ui.pushPinPushButton->setShortcut(QKeySequence("Ctrl+T, P")); |
100 | 111 | m_ui.pushPinPushButton->setToolTip("Toggle push pin status (Ctrl+T,P)"); |
101 | 112 | |
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)"); | |
103 | 115 | m_ui.keepTraceCreateNewPushButton->setShortcut(QKeySequence("Ctrl+T, O")); |
104 | 116 | |
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)"); | |
106 | 119 | m_ui.eraseTraceCreateNewPushButton->setShortcut(QKeySequence("Ctrl+T, R")); |
107 | 120 | |
108 | 121 | // The red cross pixmap plot widget closing button. Clicking this button |
109 | 122 | // triggers the signal that is trapped by the containing window that then |
110 | 123 | // handle the destruction of the widget. |
111 | 124 | |
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)"); | |
114 | 129 | connect( |
115 | 130 | m_ui.closeCompositePlotWidgetPushButton, &QPushButton::clicked, [this]() { |
116 | 131 | mp_parentWnd->plotCompositeWidgetDestructionRequested(this); |
146 | 161 | void |
147 | 162 | BasePlotCompositeWidget::createMainMenu() |
148 | 163 | { |
149 | //qDebug() << "ENTER"; | |
164 | // qDebug() << "ENTER"; | |
150 | 165 | |
151 | 166 | if(mp_mainMenu != nullptr) |
152 | 167 | delete mp_mainMenu; |
220 | 235 | |
221 | 236 | mp_mainMenu->addAction(save_plot_to_clipboard_p); |
222 | 237 | |
223 | //qDebug() << "EXIT"; | |
238 | // qDebug() << "EXIT"; | |
224 | 239 | } |
225 | 240 | |
226 | 241 | |
244 | 259 | void |
245 | 260 | BasePlotCompositeWidget::mainMenuPushButtonClicked() |
246 | 261 | { |
247 | //qDebug() << "ENTER"; | |
262 | // qDebug() << "ENTER"; | |
248 | 263 | |
249 | 264 | //// Create the contextual menu that will show when the button is clicked (see |
250 | 265 | //// below). |
252 | 267 | createMainMenu(); |
253 | 268 | m_ui.mainMenuPushButton->showMenu(); |
254 | 269 | |
255 | //qDebug() << "EXIT"; | |
270 | // qDebug() << "EXIT"; | |
256 | 271 | } |
257 | 272 | |
258 | 273 | |
492 | 507 | |
493 | 508 | |
494 | 509 | void |
495 | BasePlotCompositeWidget::plotWidgetMouseReleaseEvent([ | |
496 | [maybe_unused]] const pappso::BasePlotContext &context) | |
510 | BasePlotCompositeWidget::plotWidgetMouseReleaseEvent( | |
511 | [[maybe_unused]] const pappso::BasePlotContext &context) | |
497 | 512 | { |
498 | 513 | // qDebug(); |
499 | 514 | |
841 | 856 | ProcessingFlow *processing_flow_p = |
842 | 857 | getProcessingFlowPtrForPlottable(source_plottable_p); |
843 | 858 | |
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 | ||
844 | 924 | // And finally set the default ms frag spec. |
845 | 925 | processing_flow_p->setDefaultMsFragmentationSpec(ms_fragmentation_spec); |
846 | 926 | } |
847 | 927 | |
848 | 928 | |
849 | MzIntegrationParams | |
929 | pappso::MzIntegrationParams | |
850 | 930 | BasePlotCompositeWidget::getMzIntegrationParams( |
851 | 931 | const QCPAbstractPlottable *plottable_p) |
852 | 932 | { |
860 | 940 | // Now extract mz integration parameters from where they sit. That might |
861 | 941 | // be multiple places. |
862 | 942 | |
863 | MzIntegrationParams mz_integration_params; | |
943 | pappso::MzIntegrationParams mz_integration_params; | |
864 | 944 | |
865 | 945 | // First check if the processing flow has default mz integration params. |
866 | 946 | |
871 | 951 | // Check if there is at least one step in the flow that has mz integration |
872 | 952 | // params set. |
873 | 953 | |
874 | const MzIntegrationParams *most_recent_mz_integration_params_p = | |
954 | const pappso::MzIntegrationParams *most_recent_mz_integration_params_p = | |
875 | 955 | processing_flow.mostRecentMzIntegrationParams(); |
876 | 956 | |
877 | 957 | if(most_recent_mz_integration_params_p == nullptr) |
935 | 1015 | } |
936 | 1016 | |
937 | 1017 | // Get the mz integration params for the plottable. |
938 | MzIntegrationParams mz_integration_params = | |
1018 | pappso::MzIntegrationParams mz_integration_params = | |
939 | 1019 | getMzIntegrationParams(source_plottable_p); |
940 | 1020 | |
941 | 1021 | // qDebug().noquote() << "Found mz integration params:" |
972 | 1052 | |
973 | 1053 | mp_mzIntegrationParamsDlg->show(); |
974 | 1054 | } |
975 | } // namespace minexpert | |
1055 | } | |
976 | 1056 | |
977 | 1057 | |
978 | 1058 | void |
979 | 1059 | BasePlotCompositeWidget::mzIntegrationParamsChanged( |
980 | MzIntegrationParams mz_integration_params) | |
1060 | pappso::MzIntegrationParams mz_integration_params) | |
981 | 1061 | { |
982 | 1062 | // qDebug(); |
983 | 1063 |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
44 | 44 | |
45 | 45 | /////////////////////// pappsomspp includes |
46 | 46 | #include <pappsomspp/widget/plotwidget/baseplotwidget.h> |
47 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
47 | 48 | |
48 | 49 | |
49 | 50 | /////////////////////// Local includes |
50 | 51 | #include "ui_BasePlotCompositeWidget.h" |
51 | 52 | #include "../nongui/MsRunDataSet.hpp" |
52 | 53 | #include "../nongui/ProcessingFlow.hpp" |
53 | #include "../nongui/MzIntegrationParams.hpp" | |
54 | 54 | #include "../nongui/AnalysisPreferences.hpp" |
55 | #include "MzIntegrationParamsDlg.hpp" | |
55 | 56 | |
56 | 57 | |
57 | 58 | namespace msxps |
61 | 62 | |
62 | 63 | class BasePlotWnd; |
63 | 64 | class MsFragmentationSpecDlg; |
64 | class MzIntegrationParamsDlg; | |
65 | //class pappso::MzIntegrationParamsDlg; | |
65 | 66 | class ProcessingFlowViewerDlg; |
66 | 67 | |
67 | 68 | |
106 | 107 | |
107 | 108 | virtual void |
108 | 109 | msFragmentationSpecReady(const MsFragmentationSpec &ms_fragmentation_spec); |
109 | void setMzIntegrationParams(const MzIntegrationParams &mz_integration_params); | |
110 | void setMzIntegrationParams(const pappso::MzIntegrationParams &mz_integration_params); | |
110 | 111 | |
111 | 112 | public slots: |
112 | 113 | |
123 | 124 | virtual void plottableSelectionChanged(QCPAbstractPlottable *plottable_p, |
124 | 125 | bool is_selected); |
125 | 126 | |
126 | void mzIntegrationParamsChanged(MzIntegrationParams mz_integration_params); | |
127 | void mzIntegrationParamsChanged(pappso::MzIntegrationParams mz_integration_params); | |
127 | 128 | |
128 | 129 | virtual void newTicIntensityCalculated(double tic_intensity) const; |
129 | 130 | virtual void resetTicIntensity(); |
130 | 131 | |
131 | MzIntegrationParams | |
132 | pappso::MzIntegrationParams | |
132 | 133 | getMzIntegrationParams(const QCPAbstractPlottable *plottable_p); |
133 | 134 | void msFragmentationSpecChanged(MsFragmentationSpec ms_fragmentation_spec); |
134 | 135 | |
190 | 191 | QString craftAnalysisStanza(const pappso::BasePlotContext &context); |
191 | 192 | |
192 | 193 | void setPlottingColor(QCPAbstractPlottable *plottable_p, const QColor &color); |
194 | ||
195 | void msLevelValueChanged(int value); | |
193 | 196 | |
194 | 197 | signals: |
195 | 198 |
485 | 485 | { |
486 | 486 | // qDebug(); |
487 | 487 | |
488 | MzIntegrationParams mz_integration_params; | |
488 | pappso::MzIntegrationParams mz_integration_params; | |
489 | 489 | |
490 | 490 | MzIntegrationParamsDlg *mz_integration_params_dlg_p = |
491 | 491 | new MzIntegrationParamsDlg(this, mz_integration_params, Qt::black); |
509 | 509 | |
510 | 510 | void |
511 | 511 | BasePlotWnd::mzIntegrationParamsChanged( |
512 | MzIntegrationParams mz_integration_params) | |
512 | pappso::MzIntegrationParams mz_integration_params) | |
513 | 513 | { |
514 | 514 | // We now know what are the mz integ params. We need to propagate them to all |
515 | 515 | // the pinned-down widgets. |
535 | 535 | // know some params like the smallest/greatest m/z bin, for example. |
536 | 536 | // Then, we'll update it with the new params set here. |
537 | 537 | |
538 | MzIntegrationParams iter_mz_integration_params = | |
538 | pappso::MzIntegrationParams iter_mz_integration_params = | |
539 | 539 | processing_flow_p->getDefaultMzIntegrationParams(); |
540 | 540 | |
541 | 541 | // Now modify the values according to the new settings: |
554 | 554 | processing_flow_p->setDefaultMzIntegrationParams( |
555 | 555 | iter_mz_integration_params); |
556 | 556 | |
557 | MzIntegrationParams mz_integration_params = | |
557 | pappso::MzIntegrationParams mz_integration_params = | |
558 | 558 | processing_flow_p->getDefaultMzIntegrationParams(); |
559 | 559 | |
560 | 560 | // qDebug() << "Set the mz integration params to one plottable:" |
871 | 871 | new QualifiedMassSpectrumVectorMassDataIntegratorToTicInt( |
872 | 872 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
873 | 873 | |
874 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
875 | ||
874 | 876 | // Ensure the mass data integrator messages are used. |
875 | 877 | |
876 | 878 | connect( |
40 | 40 | |
41 | 41 | |
42 | 42 | /////////////////////// pappsomspp includes |
43 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
43 | 44 | |
44 | 45 | |
45 | 46 | /////////////////////// Local includes |
122 | 123 | void savePinnedPlotsToGraphicsFile(); |
123 | 124 | |
124 | 125 | void setMzIntegrationParamsForAllPlotWidgets(); |
125 | void mzIntegrationParamsChanged(MzIntegrationParams mz_integration_params); | |
126 | void mzIntegrationParamsChanged(pappso::MzIntegrationParams mz_integration_params); | |
126 | 127 | |
127 | 128 | void setMsFragmentationSpecForAllPlotWidgets(); |
128 | 129 | void msFragmentationSpecChanged(MsFragmentationSpec ms_fragmentation_spec); |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
431 | 431 | // Now we need to set the parameters of the SavGol filter. |
432 | 432 | |
433 | 433 | // Get the mz integration params for the plottable. |
434 | MzIntegrationParams mz_integration_params = | |
434 | pappso::MzIntegrationParams mz_integration_params = | |
435 | 435 | getMzIntegrationParams(source_plottable_p); |
436 | 436 | |
437 | 437 | pappso::SavGolParams sav_gol_params = mz_integration_params.getSavGolParams(); |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
52 | 52 | #include "BasePlotCompositeWidget.hpp" |
53 | 53 | #include "../nongui/MsRunDataSet.hpp" |
54 | 54 | #include "../nongui/ProcessingFlow.hpp" |
55 | #include "../nongui/MzIntegrationParams.hpp" | |
55 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
56 | 56 | |
57 | 57 | |
58 | 58 | namespace msxps |
62 | 62 | |
63 | 63 | class BaseTracePlotWnd; |
64 | 64 | class MsFragmentationSpecDlg; |
65 | class MzIntegrationParamsDlg; | |
66 | 65 | |
67 | 66 | |
68 | 67 | // The BaseTracePlotCompositeWidget class is aimed at receiving QCPGraph_s, not |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
390 | 390 | // This is a multi-layer work: the graph has a ProcessingFlow associated |
391 | 391 | // to it via the m_graphProcessingFlowMap. We have gotten it above. |
392 | 392 | |
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 = | |
396 | 396 | local_processing_flow.getDefaultMzIntegrationParams(); |
397 | 397 | |
398 | 398 | // If it is not valid, then try mz integration params from the various |
426 | 426 | if(m_ui.integrateToDtMzPushButton->isChecked() || |
427 | 427 | m_ui.integrateToRtMzPushButton->isChecked()) |
428 | 428 | { |
429 | mz_integration_params.setBinningType(BinningType::NONE); | |
429 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
430 | 430 | mz_integration_params.setDecimalPlaces(0); |
431 | 431 | } |
432 | 432 |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
152 | 152 | *mass_data_integrator_p = |
153 | 153 | new QualifiedMassSpectrumVectorMassDataIntegratorToDtRtMz( |
154 | 154 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
155 | ||
156 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
155 | 157 | |
156 | 158 | // Ensure the mass data integrator messages are used. |
157 | 159 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
41 | 41 | |
42 | 42 | /////////////////////// pappsomspp includes |
43 | 43 | #include <pappsomspp/widget/plotwidget/driftspectraceplotwidget.h> |
44 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
44 | 45 | |
45 | 46 | |
46 | 47 | /////////////////////// Local includes |
315 | 316 | // This is a multi-layer work: the graph has a ProcessingFlow associated |
316 | 317 | // to it via the m_graphProcessingFlowMap. We have gotten it above. |
317 | 318 | |
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 = | |
321 | 322 | local_processing_flow.getDefaultMzIntegrationParams(); |
322 | 323 | |
323 | 324 | // If it is not valid, then try mz integration params from the various |
350 | 351 | // here. We need to reduce the resolution to integer resolution. |
351 | 352 | if(m_ui.integrateToDtMzPushButton->isChecked()) |
352 | 353 | { |
353 | mz_integration_params.setBinningType(BinningType::NONE); | |
354 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
354 | 355 | mz_integration_params.setDecimalPlaces(0); |
355 | 356 | } |
356 | 357 | |
452 | 453 | |
453 | 454 | processing_step_p->newSpec(ProcessingType("DT_TO_MZ"), processing_spec_p); |
454 | 455 | |
455 | MzIntegrationParams mz_integration_params = | |
456 | pappso::MzIntegrationParams mz_integration_params = | |
456 | 457 | local_processing_flow.getDefaultMzIntegrationParams(); |
457 | 458 | |
458 | 459 | // If it is not valid, then try mz integration params from the various |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
151 | 151 | QualifiedMassSpectrumVectorMassDataIntegratorToDt *mass_data_integrator_p = |
152 | 152 | new QualifiedMassSpectrumVectorMassDataIntegratorToDt( |
153 | 153 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
154 | ||
155 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
154 | 156 | |
155 | 157 | // Ensure the mass data integrator messages are used. |
156 | 158 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
659 | 659 | if(match.hasMatch()) |
660 | 660 | continue; |
661 | 661 | |
662 | QStringList dataStringList = line.split("\t", QString::SkipEmptyParts); | |
662 | QStringList dataStringList = line.split("\t", Qt::SkipEmptyParts); | |
663 | 663 | |
664 | 664 | if(dataStringList.size() < |
665 | 665 | static_cast<int>(IsoSpecTableViewColumns::TOTAL_COLUMNS)) |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
264 | 264 | |
265 | 265 | QString input_data_string = m_ui.inputDataPointsPlainTextEdit->toPlainText(); |
266 | 266 | QStringList input_data_string_list = |
267 | input_data_string.split("\n", QString::SkipEmptyParts); | |
267 | input_data_string.split("\n", Qt::SkipEmptyParts); | |
268 | 268 | |
269 | 269 | QString line; |
270 | 270 | |
335 | 335 | |
336 | 336 | QString input_data_string = m_ui.inputDataPointsPlainTextEdit->toPlainText(); |
337 | 337 | QStringList input_data_string_list = |
338 | input_data_string.split("\n", QString::SkipEmptyParts); | |
338 | input_data_string.split("\n", Qt::SkipEmptyParts); | |
339 | 339 | |
340 | 340 | QString line; |
341 | 341 | |
373 | 373 | |
374 | 374 | QString input_data_string = m_ui.inputDataPointsPlainTextEdit->toPlainText(); |
375 | 375 | QStringList input_data_string_list = |
376 | input_data_string.split("\n", QString::SkipEmptyParts); | |
376 | input_data_string.split("\n", Qt::SkipEmptyParts); | |
377 | 377 | |
378 | 378 | // The stratey is to convert each line into a DataPoint object that is |
379 | 379 | // appended to a vector. Then, the vector is sorted on the basis of the |
807 | 807 | } |
808 | 808 | |
809 | 809 | m_mzIntegrationParams = |
810 | MzIntegrationParams(minMz, | |
810 | pappso::MzIntegrationParams(minMz, | |
811 | 811 | maxMz, |
812 | BinningType::ARBITRARY, | |
812 | pappso::BinningType::ARBITRARY, | |
813 | 813 | -1, |
814 | 814 | pappso::PrecisionFactory::getDaltonInstance(binSize), |
815 | 815 | false, |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
44 | 44 | /////////////////////// pappsomspp includes |
45 | 45 | #include <pappsomspp/trace/trace.h> |
46 | 46 | #include <pappsomspp/trace/maptrace.h> |
47 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
47 | 48 | |
48 | 49 | |
49 | 50 | /////////////////////// Local includes |
50 | 51 | #include "ui_MassPeakShaperDlg.h" |
51 | 52 | #include "../nongui/MassPeakShaper.hpp" |
52 | 53 | #include "../nongui/MassPeakShaperConfig.hpp" |
53 | #include "../nongui/MzIntegrationParams.hpp" | |
54 | 54 | |
55 | 55 | |
56 | 56 | namespace msxps |
89 | 89 | |
90 | 90 | pappso::MapTrace m_mapTrace; |
91 | 91 | |
92 | MzIntegrationParams m_mzIntegrationParams; | |
92 | pappso::MzIntegrationParams m_mzIntegrationParams; | |
93 | 93 | |
94 | 94 | // Each (m/z,i) pair (the i is in fact a probability that can later be |
95 | 95 | // converted to a relative intensity) in the text edit widget will be |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
949 | 949 | // This is a multi-layer work: the graph has a ProcessingFlow associated |
950 | 950 | // to it via the m_graphProcessingFlowMap. We have gotten it above. |
951 | 951 | |
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 = | |
955 | 955 | local_processing_flow.getDefaultMzIntegrationParams(); |
956 | 956 | |
957 | 957 | // If it is not valid, then try mz integration params from the various |
986 | 986 | if(m_ui.integrateToDtMzPushButton->isChecked() || |
987 | 987 | m_ui.integrateToRtMzPushButton->isChecked()) |
988 | 988 | { |
989 | mz_integration_params.setBinningType(BinningType::NONE); | |
989 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
990 | 990 | mz_integration_params.setDecimalPlaces(0); |
991 | 991 | } |
992 | 992 | |
1152 | 1152 | // Since we are asked that an integration to a mass spectrum be |
1153 | 1153 | // performed, there must be a non-nullptr mz integration pointer in |
1154 | 1154 | // the step. |
1155 | const MzIntegrationParams *mz_integration_params_p = | |
1155 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
1156 | 1156 | processing_flow.mostRecentMzIntegrationParams(); |
1157 | 1157 | |
1158 | 1158 | if(mz_integration_params_p == nullptr) |
1161 | 1161 | "integration " |
1162 | 1162 | "params are not available in the processing flow."); |
1163 | 1163 | |
1164 | if(mz_integration_params_p->getBinningType() == BinningType::NONE) | |
1164 | if(mz_integration_params_p->getBinningType() == pappso::BinningType::NONE) | |
1165 | 1165 | { |
1166 | 1166 | pappso::TraceMinusCombiner trace_minus_combiner; |
1167 | 1167 | pappso::TracePlusCombiner trace_plus_combiner; |
1229 | 1229 | } |
1230 | 1230 | } |
1231 | 1231 | else if(mz_integration_params_p->getBinningType() == |
1232 | BinningType::ARBITRARY) | |
1232 | pappso::BinningType::ARBITRARY) | |
1233 | 1233 | { |
1234 | 1234 | pappso::MassSpectrumMinusCombiner mass_spectrum_minus_combiner; |
1235 | 1235 | pappso::MassSpectrumPlusCombiner mass_spectrum_plus_combiner; |
1243 | 1243 | // flow we get as parameters. Make a copy of them as we'll need |
1244 | 1244 | // to set the mz smallest and greatest values to them. |
1245 | 1245 | |
1246 | const MzIntegrationParams *mz_integration_params_p = | |
1246 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
1247 | 1247 | processing_flow.mostRecentMzIntegrationParams(); |
1248 | 1248 | |
1249 | 1249 | if(mz_integration_params_p == nullptr) |
1251 | 1251 | "Pointer to the returned mz integration parameters cannot be " |
1252 | 1252 | "nullptr."); |
1253 | 1253 | |
1254 | MzIntegrationParams copy_mz_integration_params = | |
1254 | pappso::MzIntegrationParams copy_mz_integration_params = | |
1255 | 1255 | *processing_flow.mostRecentMzIntegrationParams(); |
1256 | 1256 | |
1257 | 1257 | // Because we are making an integration to a mass spectrum plot |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
195 | 195 | |
196 | 196 | #if 0 |
197 | 197 | // NO BINNING |
198 | MzIntegrationParams mz_integration_params( | |
198 | pappso::MzIntegrationParams mz_integration_params( | |
199 | 199 | std::numeric_limits<double>::max(), // smallest m/z |
200 | 200 | std::numeric_limits<double>::min(), // greatest m/z |
201 | BinningType::NONE, | |
201 | pappso::BinningType::NONE, | |
202 | 202 | -1, // decimal_places |
203 | 203 | pappso::PrecisionFactory::getDaltonInstance(0.05), |
204 | 204 | false, // apply_mz_shift |
207 | 207 | #endif |
208 | 208 | #if 0 |
209 | 209 | // ARBITRARY BINNING |
210 | MzIntegrationParams mz_integration_params( | |
210 | pappso::MzIntegrationParams mz_integration_params( | |
211 | 211 | std::numeric_limits<double>::max(), |
212 | 212 | std::numeric_limits<double>::min(), |
213 | BinningType::ARBITRARY, | |
213 | pappso::BinningType::ARBITRARY, | |
214 | 214 | -1, |
215 | 215 | // pappso::PrecisionFactory::getDaltonInstance(0.05), |
216 | 216 | pappso::PrecisionFactory::getDaltonInstance(0.1), |
231 | 231 | // integration params. |
232 | 232 | |
233 | 233 | // Set aside an object for later use. |
234 | const MzIntegrationParams *mz_integration_params_p = | |
234 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
235 | 235 | processing_flow.mostRecentStep()->getMzIntegrationParamsPtr(); |
236 | 236 | |
237 | 237 | if(mz_integration_params_p == nullptr || !mz_integration_params_p->isValid()) |
495 | 495 | // integration params. |
496 | 496 | |
497 | 497 | // Set aside an object for later use. |
498 | const MzIntegrationParams *mz_integration_params_p = | |
498 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
499 | 499 | processing_flow.mostRecentStep()->getMzIntegrationParamsPtr(); |
500 | 500 | |
501 | 501 | if(mz_integration_params_p == nullptr || !mz_integration_params_p->isValid()) |
521 | 521 | QualifiedMassSpectrumVectorMassDataIntegratorToMz *mass_data_integrator_p = |
522 | 522 | new QualifiedMassSpectrumVectorMassDataIntegratorToMz( |
523 | 523 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
524 | ||
525 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
524 | 526 | |
525 | 527 | // Ensure the mass data integrator messages are used. |
526 | 528 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1102 | 1102 | // single-element list containing this string. |
1103 | 1103 | |
1104 | 1104 | QStringList mz_value_string_list( |
1105 | data.split(';', QString::SkipEmptyParts)); | |
1105 | data.split(';', Qt::SkipEmptyParts)); | |
1106 | 1106 | |
1107 | 1107 | if(!mz_value_string_list.isEmpty()) |
1108 | 1108 | { |
1212 | 1212 | // single-element list containing this string. |
1213 | 1213 | |
1214 | 1214 | QStringList cell_data_z_value_string_list( |
1215 | cell_data.split(';', QString::SkipEmptyParts)); | |
1215 | cell_data.split(';', Qt::SkipEmptyParts)); | |
1216 | 1216 | |
1217 | 1217 | if(!cell_data_z_value_string_list.isEmpty()) |
1218 | 1218 | { |
1323 | 1323 | // single-element list containing this string. |
1324 | 1324 | |
1325 | 1325 | QStringList z_value_list_left( |
1326 | leftData.toString().split(';', QString::SkipEmptyParts)); | |
1326 | leftData.toString().split(';', Qt::SkipEmptyParts)); | |
1327 | 1327 | |
1328 | 1328 | // qDebug() << "left_value_string_list:" << z_value_list_left; |
1329 | 1329 | |
1335 | 1335 | // qDebug() << "left_value_string:" << left_value_string; |
1336 | 1336 | |
1337 | 1337 | QStringList z_value_list_right( |
1338 | rightData.toString().split(';', QString::SkipEmptyParts)); | |
1338 | rightData.toString().split(';', Qt::SkipEmptyParts)); | |
1339 | 1339 | |
1340 | 1340 | if(z_value_list_right.isEmpty()) |
1341 | 1341 | return false; |
1389 | 1389 | // single-element list containing this string. |
1390 | 1390 | |
1391 | 1391 | QStringList mz_value_list_left( |
1392 | leftData.toString().split(';', QString::SkipEmptyParts)); | |
1392 | leftData.toString().split(';', Qt::SkipEmptyParts)); | |
1393 | 1393 | |
1394 | 1394 | // qDebug() << "left_value_string_list:" << mz_value_list_left; |
1395 | 1395 | |
1401 | 1401 | // qDebug() << "left_value_string:" << left_value_string; |
1402 | 1402 | |
1403 | 1403 | QStringList mz_value_list_right( |
1404 | rightData.toString().split(';', QString::SkipEmptyParts)); | |
1404 | rightData.toString().split(';', Qt::SkipEmptyParts)); | |
1405 | 1405 | |
1406 | 1406 | if(mz_value_list_right.isEmpty()) |
1407 | 1407 | return false; |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
410 | 410 | |
411 | 411 | void |
412 | 412 | MsRunDataSetTableViewWnd::mzIntegrationParamsChanged( |
413 | MzIntegrationParams mz_integration_params) | |
413 | pappso::MzIntegrationParams mz_integration_params) | |
414 | 414 | { |
415 | 415 | // qDebug().noquote() << "The validated mz integration parameters:" |
416 | 416 | //<< mz_integration_params.toString(); |
420 | 420 | // ms run data set upon creation of this window. |
421 | 421 | |
422 | 422 | // 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 = | |
424 | 424 | m_processingFlow.getDefaultMzIntegrationParams(); |
425 | 425 | |
426 | 426 | // Update some of the values with the params after change. |
45 | 45 | #include <pappsomspp/msrun/msrundatasettree.h> |
46 | 46 | #include <pappsomspp/massspectrum/qualifiedmassspectrum.h> |
47 | 47 | #include <pappsomspp/widget/precisionwidget/precisionwidget.h> |
48 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
48 | 49 | |
49 | 50 | |
50 | 51 | /////////////////////// Local includes |
53 | 54 | #include "MsRunDataSetTableViewModel.hpp" |
54 | 55 | #include "MsRunDataSetTableViewProxyModel.hpp" |
55 | 56 | #include "../nongui/MsRunDataSet.hpp" |
56 | #include "../nongui/MzIntegrationParams.hpp" | |
57 | 57 | #include "../nongui/ProcessingFlow.hpp" |
58 | #include "MzIntegrationParamsDlg.hpp" | |
58 | 59 | |
59 | 60 | |
60 | 61 | namespace msxps |
66 | 67 | class MsRunDataSet; |
67 | 68 | class ProgramWindow; |
68 | 69 | class MsFragmentationSpecDlg; |
69 | class MzIntegrationParamsDlg; | |
70 | 70 | |
71 | 71 | |
72 | 72 | class MsRunDataSetTableViewWnd : public QMainWindow |
92 | 92 | void executeFilteringPushButtonClicked(); |
93 | 93 | |
94 | 94 | void showMzIntegrationParamsDlg(); |
95 | void mzIntegrationParamsChanged(MzIntegrationParams mz_integration_params); | |
95 | void mzIntegrationParamsChanged(pappso::MzIntegrationParams mz_integration_params); | |
96 | 96 | |
97 | 97 | public slots: |
98 | 98 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
65 | 65 | |
66 | 66 | MzIntegrationParamsDlg::MzIntegrationParamsDlg( |
67 | 67 | QWidget *parent, |
68 | const MzIntegrationParams &mz_integration_params, | |
68 | const pappso::MzIntegrationParams &mz_integration_params, | |
69 | 69 | const QColor &color) |
70 | 70 | : QDialog(parent), |
71 | 71 | m_mzIntegrationParams(mz_integration_params), |
161 | 161 | m_ui.arbitraryBinningRadioButton->setChecked(true); |
162 | 162 | }); |
163 | 163 | |
164 | m_ui.noBinningRadioButton->setChecked(m_mzIntegrationParams.m_binningType == | |
165 | BinningType::NONE); | |
164 | m_ui.noBinningRadioButton->setChecked(m_mzIntegrationParams.getBinningType() == | |
165 | pappso::BinningType::NONE); | |
166 | 166 | m_ui.arbitraryBinningRadioButton->setChecked( |
167 | m_mzIntegrationParams.m_binningType == BinningType::ARBITRARY); | |
167 | m_mzIntegrationParams.getBinningType() == pappso::BinningType::ARBITRARY); | |
168 | 168 | |
169 | 169 | connect(m_ui.arbitraryBinningRadioButton, |
170 | 170 | &QRadioButton::toggled, |
171 | 171 | [this](bool checked) { mp_precisionWidget->setEnabled(checked); }); |
172 | 172 | |
173 | 173 | m_ui.removeZeroValueCheckBox->setCheckState( |
174 | m_mzIntegrationParams.m_removeZeroValDataPoints ? Qt::Checked | |
174 | m_mzIntegrationParams.isRemoveZeroValDataPoints() ? Qt::Checked | |
175 | 175 | : Qt::Unchecked); |
176 | 176 | |
177 | 177 | /********* Savitzky-Golay parameters **********/ |
179 | 179 | m_ui.savitzkyGolayGroupBox->setChecked( |
180 | 180 | m_mzIntegrationParams.isApplySavGolFilter()); |
181 | 181 | |
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); | |
186 | 186 | |
187 | 187 | connect(m_ui.applyPushButton, |
188 | 188 | &QPushButton::clicked, |
201 | 201 | if(radioButton == m_ui.noBinningRadioButton) |
202 | 202 | { |
203 | 203 | if(checked == true) |
204 | m_mzIntegrationParams.m_binningType = BinningType::NONE; | |
204 | m_mzIntegrationParams.setBinningType(pappso::BinningType::NONE); | |
205 | 205 | } |
206 | 206 | else if(radioButton == m_ui.arbitraryBinningRadioButton) |
207 | 207 | { |
208 | 208 | if(checked == true) |
209 | m_mzIntegrationParams.m_binningType = BinningType::ARBITRARY; | |
209 | m_mzIntegrationParams.setBinningType(pappso::BinningType::ARBITRARY); | |
210 | 210 | } |
211 | 211 | else |
212 | 212 | qFatal("Programming error."); |
221 | 221 | |
222 | 222 | |
223 | 223 | 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) | |
227 | 227 | m_ui.noBinningRadioButton->setChecked(true); |
228 | else if(binningType == BinningType::ARBITRARY) | |
228 | else if(binningType == pappso::BinningType::ARBITRARY) | |
229 | 229 | m_ui.arbitraryBinningRadioButton->setChecked(true); |
230 | 230 | else |
231 | 231 | qFatal("Programming error."); |
282 | 282 | // qDebug(); |
283 | 283 | |
284 | 284 | // 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 | |
286 | 286 | // plot composite widget) that might be listening. We make a new instance by |
287 | 287 | // copying the member instance because that member instance has data that are |
288 | 288 | // not configured in this dialog. We would loose those data if we created a |
289 | 289 | // default mz integration params instance. |
290 | 290 | |
291 | MzIntegrationParams mz_integration_params(m_mzIntegrationParams); | |
291 | pappso::MzIntegrationParams mz_integration_params(m_mzIntegrationParams); | |
292 | 292 | |
293 | 293 | // qDebug().noquote() << "Before reading all the widgets' values::" |
294 | 294 | //<< mz_integration_params.toString(); |
295 | 295 | |
296 | 296 | if(m_ui.noBinningRadioButton->isChecked()) |
297 | mz_integration_params.m_binningType = BinningType::NONE; | |
297 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
298 | 298 | else if(m_ui.arbitraryBinningRadioButton->isChecked()) |
299 | mz_integration_params.m_binningType = BinningType::ARBITRARY; | |
299 | mz_integration_params.setBinningType(pappso::BinningType::ARBITRARY); | |
300 | 300 | |
301 | 301 | mz_integration_params.setPrecision(mp_precision); |
302 | 302 | |
303 | 303 | mz_integration_params.setDecimalPlaces(m_ui.decimalPlacesSpinBox->value()); |
304 | 304 | |
305 | mz_integration_params.m_removeZeroValDataPoints = | |
306 | m_ui.removeZeroValueCheckBox->isChecked(); | |
305 | mz_integration_params.setRemoveZeroValDataPoints(m_ui.removeZeroValueCheckBox->isChecked()); | |
307 | 306 | |
308 | 307 | if(m_ui.savitzkyGolayGroupBox->isChecked()) |
309 | 308 | { |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
47 | 47 | |
48 | 48 | /////////////////////// Local includes |
49 | 49 | #include "ui_MzIntegrationParamsDlg.h" |
50 | #include "../nongui/MzIntegrationParams.hpp" | |
50 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
51 | 51 | |
52 | 52 | |
53 | 53 | namespace msxps |
63 | 63 | public: |
64 | 64 | MzIntegrationParamsDlg(QWidget *parent = nullptr); |
65 | 65 | MzIntegrationParamsDlg(QWidget *parent, |
66 | const MzIntegrationParams &mz_integration_params, | |
66 | const pappso::MzIntegrationParams &mz_integration_params, | |
67 | 67 | const QColor &color); |
68 | 68 | ~MzIntegrationParamsDlg(); |
69 | 69 | |
73 | 73 | void keyPressEvent(QKeyEvent *event); |
74 | 74 | |
75 | 75 | void show(); |
76 | void setBinningType(BinningType binningType); | |
76 | void setBinningType(pappso::BinningType binningType); | |
77 | 77 | void setBinSizePrecisionPtr(pappso::PrecisionPtr bin_size_precsion_p); |
78 | 78 | void setDecimalPlaces(int decimal_places); |
79 | 79 | void setRemoveZeroValDataPoints(bool apply); |
87 | 87 | void binningRadioButtonToggled(bool checked); |
88 | 88 | |
89 | 89 | signals: |
90 | void mzIntegrationParamsChangedSignal(MzIntegrationParams params); | |
90 | void mzIntegrationParamsChangedSignal(pappso::MzIntegrationParams params); | |
91 | 91 | void mzIntegrationParamsDlgShouldBeDestroyedSignal(); |
92 | 92 | |
93 | 93 | protected: |
94 | 94 | Ui::MzIntegrationParamsDlg m_ui; |
95 | MzIntegrationParams m_mzIntegrationParams; | |
95 | pappso::MzIntegrationParams m_mzIntegrationParams; | |
96 | 96 | pappso::PrecisionWidget *mp_precisionWidget; |
97 | 97 | pappso::PrecisionPtr mp_precision = |
98 | 98 | pappso::PrecisionFactory::getDaltonInstance(0.05); |
662 | 662 | std::vector<MsRunDataSetCstSPtr> vector_of_ms_run_data_set_csp; |
663 | 663 | |
664 | 664 | QList<QListWidgetItem *> item_list = |
665 | m_ui.openMsRunDataSetsListWidget->findItems(".*", Qt::MatchRegExp); | |
665 | m_ui.openMsRunDataSetsListWidget->findItems(".*", Qt::MatchRegularExpression); | |
666 | 666 | |
667 | 667 | for(int iter = 0; iter < item_list.size(); ++iter) |
668 | 668 | { |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
65 | 65 | #include "MsRunDataSetTableViewProxyModel.hpp" |
66 | 66 | #include "../nongui/globals.hpp" |
67 | 67 | #include "MsRunReadTask.hpp" |
68 | #include "../nongui/MzIntegrationParams.hpp" | |
68 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
69 | 69 | #include "../nongui/MassDataIntegrator.hpp" |
70 | 70 | #include "ColorSelector.hpp" |
71 | 71 | #include "MsRunSelectorDlg.hpp" |
426 | 426 | |
427 | 427 | mp_utilitiesMenu->addAction(action_p); |
428 | 428 | |
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 | ||
429 | 452 | // Help menu |
430 | 453 | mp_helpMenu = menuBar()->addMenu("&Help"); |
431 | 454 | |
477 | 500 | dlg->show(); |
478 | 501 | |
479 | 502 | 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; | |
480 | 517 | } |
481 | 518 | |
482 | 519 | |
1372 | 1409 | new QualifiedMassSpectrumVectorMassDataIntegratorToRt( |
1373 | 1410 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp); |
1374 | 1411 | |
1412 | mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount); | |
1413 | ||
1375 | 1414 | MassDataIntegratorTask *mass_data_integrator_task_p = |
1376 | 1415 | new MassDataIntegratorTask(); |
1377 | 1416 | |
1560 | 1599 | ms_run_data_set_csp, |
1561 | 1600 | processing_flow, |
1562 | 1601 | vector_of_qualified_mass_spectra_sp); |
1602 | ||
1603 | mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount); | |
1563 | 1604 | |
1564 | 1605 | MassDataIntegratorTask *mass_data_integrator_task_p = |
1565 | 1606 | new MassDataIntegratorTask(); |
1730 | 1771 | new QualifiedMassSpectrumVectorMassDataIntegratorToMz( |
1731 | 1772 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp); |
1732 | 1773 | |
1774 | mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount); | |
1775 | ||
1733 | 1776 | // qDebug() << "Receiving processing flow:" << processing_flow.toString(); |
1734 | 1777 | |
1735 | 1778 | MassDataIntegratorTask *mass_data_integrator_task_p = |
1919 | 1962 | new QualifiedMassSpectrumVectorMassDataIntegratorToTicInt( |
1920 | 1963 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp); |
1921 | 1964 | |
1965 | mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount); | |
1966 | ||
1922 | 1967 | MassDataIntegratorTask *mass_data_integrator_task_p = |
1923 | 1968 | new MassDataIntegratorTask(); |
1924 | 1969 | |
2114 | 2159 | *mass_data_integrator_p = |
2115 | 2160 | new QualifiedMassSpectrumVectorMassDataIntegratorToDtRtMz( |
2116 | 2161 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp); |
2162 | ||
2163 | mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount); | |
2117 | 2164 | |
2118 | 2165 | MassDataIntegratorTask *mass_data_integrator_task_p = |
2119 | 2166 | new MassDataIntegratorTask(); |
2375 | 2422 | new QualifiedMassSpectrumVectorMassDataIntegratorToRtDt( |
2376 | 2423 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_vector_sp); |
2377 | 2424 | |
2425 | mass_data_integrator_p->setMaxThreadUseCount(m_maxThreadUseCount); | |
2426 | ||
2378 | 2427 | MassDataIntegratorTask *mass_data_integrator_task_p = |
2379 | 2428 | new MassDataIntegratorTask(); |
2380 | 2429 |
124 | 124 | virtual ~ProgramWindow(); |
125 | 125 | |
126 | 126 | const QString &moduleName() const; |
127 | ||
128 | void setMaxThreadUseCount(std::size_t count); | |
129 | std::size_t getMaxThreadUseCount(); | |
127 | 130 | |
128 | 131 | bool openMassSpectrometryFileDlg(const QString &dir_name = QDir::homePath(), |
129 | 132 | bool full_in_memory = false); |
324 | 327 | *mass_data_integrator_p); |
325 | 328 | |
326 | 329 | void integrateQualifiedMassSpectrumVectorToRtDtSignal( |
327 | QualifiedMassSpectrumVectorMassDataIntegratorToRtDt | |
328 | *mass_data_integrator_p, | |
330 | QualifiedMassSpectrumVectorMassDataIntegratorToRtDt *mass_data_integrator_p, | |
329 | 331 | pappso::DataKind data_kind); |
330 | 332 | |
331 | 333 | void integrateQualifiedMassSpectrumVectorToDtRtMzSignal( |
347 | 349 | |
348 | 350 | int m_selectedMsRunIndex = -1; |
349 | 351 | |
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 | ||
350 | 356 | // We need to track all the plot widgets and plottables. This tree aims at |
351 | 357 | // storing the structure of all the plottables in all the plot widgets, in all |
352 | 358 | // the windows, for all the ms run data sets. |
363 | 369 | MassSpecTracePlotWnd *mp_massSpecPlotWnd = nullptr; |
364 | 370 | DriftSpecTracePlotWnd *mp_driftSpecPlotWnd = nullptr; |
365 | 371 | |
366 | DriftSpecMassSpecColorMapWnd *mp_driftSpecMassSpecColorMapWnd = nullptr; | |
367 | TicXicChromMassSpecColorMapWnd *mp_ticXicChromMassSpecColorMapWnd = nullptr; | |
372 | DriftSpecMassSpecColorMapWnd *mp_driftSpecMassSpecColorMapWnd = nullptr; | |
373 | TicXicChromMassSpecColorMapWnd *mp_ticXicChromMassSpecColorMapWnd = nullptr; | |
368 | 374 | TicXicChromDriftSpecColorMapWnd *mp_ticXicChromDriftSpecColorMapWnd = nullptr; |
369 | 375 | |
370 | 376 | XicExtractionWnd *mp_xicExtractionWnd = nullptr; |
397 | 403 | QMenu *mp_fileMenu = nullptr; |
398 | 404 | QMenu *mp_windowsMenu = nullptr; |
399 | 405 | QMenu *mp_utilitiesMenu = nullptr; |
406 | QMenu *mp_preferencesMenu = nullptr; | |
400 | 407 | QMenu *mp_helpMenu = nullptr; |
401 | 408 | QAction *mp_openFullMsFileAct = nullptr; |
402 | 409 | QAction *mp_openStreamedMsFileAct = nullptr; |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
402 | 402 | |
403 | 403 | { |
404 | 404 | |
405 | //#if 0 | |
405 | bool result = true; | |
406 | ||
407 | //#if 0 | |
406 | 408 | std::chrono::time_point<std::chrono::system_clock> now = |
407 | 409 | std::chrono::system_clock::now(); |
408 | 410 | |
412 | 414 | if(time_lag.count() >= m_timeLag) |
413 | 415 | { |
414 | 416 | 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; | |
422 | 424 | } |
423 | 425 | |
424 | 426 | |
557 | 559 | void |
558 | 560 | TaskMonitorCompositeWidget::setStatusText(QString text) |
559 | 561 | { |
562 | //qDebug() << "m_isLocked:" << m_isLocked << "shouldUpdate:" << shouldUpdate(); | |
563 | ||
560 | 564 | if(!m_isLocked && shouldUpdate()) |
561 | 565 | m_ui.statusLineEdit->setText(text); |
562 | 566 | } |
673 | 677 | return text; |
674 | 678 | } |
675 | 679 | |
676 | QStringList string_list = text.split("%c", QString::KeepEmptyParts); | |
680 | QStringList string_list = text.split("%c", Qt::KeepEmptyParts); | |
677 | 681 | |
678 | 682 | QString new_text; |
679 | 683 |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
134 | 134 | // Start with an unlocked widget. |
135 | 135 | bool m_isLocked = false; |
136 | 136 | |
137 | double m_timeLag = 100; /* milliseconds */ | |
137 | double m_timeLag = 50; /* milliseconds */ | |
138 | 138 | std::chrono::system_clock::time_point m_lastTimePoint; |
139 | 139 | double m_currentValue = 0; |
140 | 140 | QString craftStringIfFormattedText(const QString &text) const; |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
405 | 405 | // This is a multi-layer work: the graph has a ProcessingFlow associated |
406 | 406 | // to it via the m_graphProcessingFlowMap. We have gotten it above. |
407 | 407 | |
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 = | |
411 | 411 | local_processing_flow.getDefaultMzIntegrationParams(); |
412 | 412 | |
413 | 413 | // If it is not valid, then try mz integration params from the various |
441 | 441 | if(m_ui.integrateToDtMzPushButton->isChecked() || |
442 | 442 | m_ui.integrateToRtMzPushButton->isChecked()) |
443 | 443 | { |
444 | mz_integration_params.setBinningType(BinningType::NONE); | |
444 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
445 | 445 | mz_integration_params.setDecimalPlaces(0); |
446 | 446 | } |
447 | 447 |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
161 | 161 | QualifiedMassSpectrumVectorMassDataIntegratorToRtDt *mass_data_integrator_p = |
162 | 162 | new QualifiedMassSpectrumVectorMassDataIntegratorToRtDt( |
163 | 163 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
164 | ||
165 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
164 | 166 | |
165 | 167 | // Ensure the mass data integrator messages are used. |
166 | 168 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
395 | 395 | // This is a multi-layer work: the graph has a ProcessingFlow associated |
396 | 396 | // to it via the m_graphProcessingFlowMap. We have gotten it above. |
397 | 397 | |
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 = | |
401 | 401 | local_processing_flow.getDefaultMzIntegrationParams(); |
402 | 402 | |
403 | 403 | // If it is not valid, then try mz integration params from the various |
431 | 431 | if(m_ui.integrateToDtMzPushButton->isChecked() || |
432 | 432 | m_ui.integrateToRtMzPushButton->isChecked()) |
433 | 433 | { |
434 | mz_integration_params.setBinningType(BinningType::NONE); | |
434 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
435 | 435 | mz_integration_params.setDecimalPlaces(0); |
436 | 436 | } |
437 | 437 |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
150 | 150 | *mass_data_integrator_p = |
151 | 151 | new QualifiedMassSpectrumVectorMassDataIntegratorToDtRtMz( |
152 | 152 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
153 | ||
154 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
153 | 155 | |
154 | 156 | // Ensure the mass data integrator messages are used. |
155 | 157 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
399 | 399 | // This is a multi-layer work: the graph has a ProcessingFlow associated |
400 | 400 | // to it via the m_graphProcessingFlowMap. We have gotten it above. |
401 | 401 | |
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 = | |
405 | 405 | local_processing_flow.getDefaultMzIntegrationParams(); |
406 | 406 | |
407 | 407 | // If it is not valid, then try mz integration params from the various |
411 | 411 | // qDebug() |
412 | 412 | //<< "The processing flow's default mz integ params are not valid."; |
413 | 413 | |
414 | const MzIntegrationParams *mz_integration_params_p = | |
414 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
415 | 415 | local_processing_flow.mostRecentMzIntegrationParams(); |
416 | 416 | |
417 | 417 | if(mz_integration_params_p != nullptr) |
438 | 438 | if(m_ui.integrateToDtMzPushButton->isChecked() || |
439 | 439 | m_ui.integrateToRtMzPushButton->isChecked()) |
440 | 440 | { |
441 | mz_integration_params.setBinningType(BinningType::NONE); | |
441 | mz_integration_params.setBinningType(pappso::BinningType::NONE); | |
442 | 442 | mz_integration_params.setDecimalPlaces(0); |
443 | 443 | } |
444 | 444 |
2 | 2 | * |
3 | 3 | * msXpertSuite - mass spectrometry software suite |
4 | 4 | * ----------------------------------------------- |
5 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
5 | * Copyright (C) 2009--2020 Filippo Rusconi | |
6 | 6 | * |
7 | 7 | * http://www.msxpertsuite.org |
8 | 8 | * |
497 | 497 | qualified_mass_spectra_sp, |
498 | 498 | const ProcessingFlow &processing_flow) |
499 | 499 | { |
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(); | |
502 | 502 | |
503 | 503 | // Get the ms run data set that for the graph we are going to base the |
504 | 504 | // integration on. |
526 | 526 | if(!qualified_mass_spectra_count) |
527 | 527 | return; |
528 | 528 | |
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; | |
531 | 531 | |
532 | 532 | // Now start the actual integration work. |
533 | 533 | |
536 | 536 | QualifiedMassSpectrumVectorMassDataIntegratorToRt *mass_data_integrator_p = |
537 | 537 | new QualifiedMassSpectrumVectorMassDataIntegratorToRt( |
538 | 538 | ms_run_data_set_csp, processing_flow, qualified_mass_spectra_sp); |
539 | ||
540 | mass_data_integrator_p->setMaxThreadUseCount(mp_programWindow->getMaxThreadUseCount()); | |
539 | 541 | |
540 | 542 | // Ensure the mass data integrator messages are used. |
541 | 543 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
423 | 423 | <property name="spacing"> |
424 | 424 | <number>1</number> |
425 | 425 | </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"> | |
615 | 515 | <spacer name="verticalSpacer5"> |
616 | 516 | <property name="orientation"> |
617 | 517 | <enum>Qt::Vertical</enum> |
624 | 524 | </property> |
625 | 525 | </spacer> |
626 | 526 | </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> | |
659 | 647 | </property> |
660 | 648 | <property name="checkable"> |
661 | 649 | <bool>true</bool> |
669 | 657 | </widget> |
670 | 658 | </item> |
671 | 659 | <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"> | |
716 | 716 | <widget class="QPushButton" name="integrateToIntPushButton"> |
717 | 717 | <property name="sizePolicy"> |
718 | 718 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
756 | 756 | </property> |
757 | 757 | </widget> |
758 | 758 | </item> |
759 | <item row="9" column="0"> | |
759 | <item row="10" column="0"> | |
760 | 760 | <widget class="QPushButton" name="integrateToRtDtPushButton"> |
761 | 761 | <property name="sizePolicy"> |
762 | 762 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
797 | 797 | </property> |
798 | 798 | <property name="flat"> |
799 | 799 | <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> | |
800 | 822 | </property> |
801 | 823 | </widget> |
802 | 824 | </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/>. | |
28 | 28 | * |
29 | 29 | * END software license |
30 | 30 | */ |
31 | ||
31 | 32 | |
32 | 33 | |
33 | 34 | namespace msxps |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
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 | |
27 | 30 | */ |
31 | ||
28 | 32 | |
29 | 33 | |
30 | 34 | /////////////////////// Local includes |
0 | /* msXpertSuite - mass spectrometry software suite | |
1 | * ----------------------------------------------- | |
2 | * Copyright(C) 2016 Filippo Rusconi | |
0 | /* BEGIN software license | |
3 | 1 | * |
4 | * http://www.{site}.org | |
2 | * msXpertSuite - mass spectrometry software suite | |
3 | * ----------------------------------------------- | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | * This file is part of the msXpertSuite project. | |
6 | * http://www.msxpertsuite.org | |
7 | 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; | |
8 | * This file is part of the msXpertSuite project. | |
14 | 9 | * |
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: | |
19 | 12 | * |
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; | |
24 | 15 | * |
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 | |
27 | 30 | */ |
31 | ||
28 | 32 | |
29 | 33 | |
30 | 34 | #pragma once |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
66 | 66 | MsRunDataSetCstSPtr ms_run_data_set_csp, |
67 | 67 | const ProcessingFlow &processing_flow, |
68 | 68 | pappso::MassSpectrumPlusCombinerSPtr &mass_spectrum_combiner_sp, |
69 | const MzIntegrationParams &mz_integration_params) | |
69 | const pappso::MzIntegrationParams &mz_integration_params) | |
70 | 70 | : BaseMsRunDataSetTreeNodeVisitor(ms_run_data_set_csp, processing_flow), |
71 | 71 | msp_combiner(mass_spectrum_combiner_sp), |
72 | 72 | m_mzIntegrationParams(mz_integration_params) |
130 | 130 | |
131 | 131 | void |
132 | 132 | MassSpectrumTreeNodeCombinerVisitor::setMzIntegrationParams( |
133 | const MzIntegrationParams &mz_integration_params) | |
133 | const pappso::MzIntegrationParams &mz_integration_params) | |
134 | 134 | { |
135 | 135 | m_mzIntegrationParams = mz_integration_params; |
136 | 136 | } |
137 | 137 | |
138 | 138 | |
139 | const MzIntegrationParams & | |
139 | const pappso::MzIntegrationParams & | |
140 | 140 | MassSpectrumTreeNodeCombinerVisitor::getMzIntegrationParams() |
141 | 141 | { |
142 | 142 | return m_mzIntegrationParams; |
49 | 49 | #include "ProcessingFlow.hpp" |
50 | 50 | #include "MsRunDataSet.hpp" |
51 | 51 | #include "BaseMsRunDataSetTreeNodeVisitor.hpp" |
52 | #include "MzIntegrationParams.hpp" | |
52 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
53 | 53 | |
54 | 54 | |
55 | 55 | namespace msxps |
80 | 80 | MsRunDataSetCstSPtr ms_run_data_set_csp, |
81 | 81 | const ProcessingFlow &processing_flow, |
82 | 82 | pappso::MassSpectrumPlusCombinerSPtr &mass_spectrum_combiner_sp, |
83 | const MzIntegrationParams &mz_integration_params); | |
83 | const pappso::MzIntegrationParams &mz_integration_params); | |
84 | 84 | |
85 | 85 | MassSpectrumTreeNodeCombinerVisitor( |
86 | 86 | const MassSpectrumTreeNodeCombinerVisitor &other); |
93 | 93 | |
94 | 94 | const pappso::MapTrace &getMapTrace() const; |
95 | 95 | |
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(); | |
98 | 98 | |
99 | 99 | MassSpectrumTreeNodeCombinerVisitor & |
100 | 100 | operator=(const MassSpectrumTreeNodeCombinerVisitor &other); |
125 | 125 | protected: |
126 | 126 | pappso::MassSpectrumPlusCombinerSPtr msp_combiner; |
127 | 127 | |
128 | MzIntegrationParams m_mzIntegrationParams; | |
128 | pappso::MzIntegrationParams m_mzIntegrationParams; | |
129 | 129 | pappso::MapTrace m_mapTrace; |
130 | 130 | |
131 | 131 | uint m_verifiedMsFragmentationLevels = 0; |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
44 | 44 | |
45 | 45 | /////////////////////// pappsomspp includes |
46 | 46 | #include <pappsomspp/massspectrum/qualifiedmassspectrum.h> |
47 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
47 | 48 | |
48 | 49 | |
49 | 50 | /////////////////////// Local includes |
50 | 51 | #include "MsRunDataSet.hpp" |
51 | #include "MzIntegrationParams.hpp" | |
52 | 52 | |
53 | 53 | |
54 | 54 | int msRunDataSetMetaTypeId = qRegisterMetaType<msxps::minexpert::MsRunDataSet>( |
217 | 217 | } |
218 | 218 | |
219 | 219 | |
220 | MzIntegrationParams | |
220 | pappso::MzIntegrationParams | |
221 | 221 | MsRunDataSet::craftInitialMzIntegrationParams() const |
222 | 222 | { |
223 | return MzIntegrationParams( | |
223 | return pappso::MzIntegrationParams( | |
224 | 224 | // Absolute min m/z value of the whole data set |
225 | 225 | m_msRunDataSetStats.m_minMz, |
226 | 226 | // Absolute max m/z value of the whole data set |
227 | 227 | m_msRunDataSetStats.m_maxMz, |
228 | 228 | // Binning type |
229 | BinningType::ARBITRARY, | |
229 | pappso::BinningType::ARBITRARY, | |
230 | 230 | // Decimal places |
231 | 231 | 3, |
232 | 232 | // The size of the m/z bins in Dalton units. |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
48 | 48 | #include <pappsomspp/massspectrum/qualifiedmassspectrum.h> |
49 | 49 | #include <pappsomspp/msrun/msrundatasettree.h> |
50 | 50 | #include <pappsomspp/msrun/msrundatasettreenode.h> |
51 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
51 | 52 | |
52 | 53 | |
53 | 54 | /////////////////////// Local includes |
67 | 68 | |
68 | 69 | |
69 | 70 | class MsRunDataSetStats; |
70 | class MzIntegrationParams; | |
71 | //class pappso::MzIntegrationParams; | |
71 | 72 | |
72 | 73 | class MsRunDataSet : public QObject |
73 | 74 | { |
130 | 131 | void |
131 | 132 | mapMassSpectrum(pappso::QualifiedMassSpectrumCstSPtr mass_spectrum_csptr); |
132 | 133 | |
133 | MzIntegrationParams craftInitialMzIntegrationParams() const; | |
134 | pappso::MzIntegrationParams craftInitialMzIntegrationParams() const; | |
134 | 135 | |
135 | 136 | using VectorConstIterator = |
136 | 137 | std::vector<pappso::MsRunDataSetTreeNode *>::const_iterator; |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
177 | 177 | |
178 | 178 | // Since we are asked that an integration to a mass spectrum be performed, |
179 | 179 | // 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 = | |
181 | 181 | processing_step_p->getMzIntegrationParamsPtr(); |
182 | 182 | |
183 | 183 | if(mz_integration_params_p == nullptr) |
192 | 192 | emit setTaskDescriptionTextSignal( |
193 | 193 | "Computing the combination of the appropriate mass spectra"); |
194 | 194 | |
195 | if(mz_integration_params_p->getBinningType() == BinningType::NONE) | |
195 | if(mz_integration_params_p->getBinningType() == pappso::BinningType::NONE) | |
196 | 196 | { |
197 | 197 | integrateToMzNoBinning(); |
198 | 198 | } |
199 | else if(mz_integration_params_p->getBinningType() == BinningType::ARBITRARY) | |
199 | else if(mz_integration_params_p->getBinningType() == pappso::BinningType::ARBITRARY) | |
200 | 200 | { |
201 | 201 | integrateToMzArbitraryBinning(); |
202 | 202 | } |
296 | 296 | // Since we are asked that an integration to a mass spectrum be performed, |
297 | 297 | // there must be a non-nullptr mz integration pointer in the most recent step. |
298 | 298 | |
299 | const MzIntegrationParams *mz_integration_params_p = | |
299 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
300 | 300 | m_processingFlow.mostRecentStep()->getMzIntegrationParamsPtr(); |
301 | 301 | |
302 | 302 | if(mz_integration_params_p == nullptr) |
532 | 532 | // Since we are asked that an integration to a mass spectrum be performed, |
533 | 533 | // there must be a non-nullptr mz integration pointer in the most recent step. |
534 | 534 | |
535 | const MzIntegrationParams *mz_integration_params_p = | |
535 | const pappso::MzIntegrationParams *mz_integration_params_p = | |
536 | 536 | m_processingFlow.mostRecentStep()->getMzIntegrationParamsPtr(); |
537 | 537 | |
538 | 538 | if(mz_integration_params_p == nullptr) |
542 | 542 | // to establish the bins. Create a local copy that we'll be able to modify |
543 | 543 | // before using it. |
544 | 544 | |
545 | MzIntegrationParams local_mz_integration_params = *mz_integration_params_p; | |
545 | pappso::MzIntegrationParams local_mz_integration_params = *mz_integration_params_p; | |
546 | 546 | |
547 | 547 | local_mz_integration_params.setSmallestMz( |
548 | 548 | mcsp_msRunDataSet->getMsRunDataSetStats().m_minMz); |
573 | 573 | { |
574 | 574 | // qDebug() << "thread index:" << iter; |
575 | 575 | |
576 | if(local_mz_integration_params.getBinningType() != BinningType::ARBITRARY) | |
576 | if(local_mz_integration_params.getBinningType() != pappso::BinningType::ARBITRARY) | |
577 | 577 | qFatal("Programming error."); |
578 | 578 | |
579 | 579 | // We are using MassSpectrum combiner visitors because we are going to use |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
47 | 47 | #include "ProcessingFlow.hpp" |
48 | 48 | #include "MsRunDataSet.hpp" |
49 | 49 | #include "BaseMsRunDataSetTreeNodeVisitor.hpp" |
50 | #include "MzIntegrationParams.hpp" | |
50 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
51 | 51 | #include "MsRunDataSetStats.hpp" |
52 | 52 | |
53 | 53 |
49 | 49 | #include "ProcessingFlow.hpp" |
50 | 50 | #include "MsRunDataSet.hpp" |
51 | 51 | #include "BaseMsRunDataSetTreeNodeVisitor.hpp" |
52 | #include "MzIntegrationParams.hpp" | |
52 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
53 | 53 | |
54 | 54 | |
55 | 55 | namespace msxps |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
28 | 28 | * |
29 | 29 | * END software license |
30 | 30 | */ |
31 | ||
31 | 32 | |
32 | 33 | |
33 | 34 | /////////////////////// Qt includes |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
112 | 112 | |
113 | 113 | void |
114 | 114 | ProcessingFlow::setDefaultMzIntegrationParams( |
115 | const MzIntegrationParams &mz_integration_params) | |
115 | const pappso::MzIntegrationParams &mz_integration_params) | |
116 | 116 | { |
117 | 117 | m_defaultMzIntegrationParams = mz_integration_params; |
118 | 118 | } |
128 | 128 | } |
129 | 129 | |
130 | 130 | |
131 | const MzIntegrationParams & | |
131 | const pappso::MzIntegrationParams & | |
132 | 132 | ProcessingFlow::getDefaultMzIntegrationParams() const |
133 | 133 | { |
134 | 134 | return m_defaultMzIntegrationParams; |
460 | 460 | } |
461 | 461 | |
462 | 462 | |
463 | const MzIntegrationParams * | |
463 | const pappso::MzIntegrationParams * | |
464 | 464 | ProcessingFlow::mostRecentMzIntegrationParams() const |
465 | 465 | { |
466 | 466 |
89 | 89 | const ProcessingStep *mostRecentStep() const; |
90 | 90 | |
91 | 91 | 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; | |
95 | 95 | |
96 | 96 | void setDefaultMsFragmentationSpec( |
97 | 97 | const MsFragmentationSpec &ms_fragmentation_spec); |
105 | 105 | protected: |
106 | 106 | MsRunDataSetCstSPtr mcsp_msRunDataSet = nullptr; |
107 | 107 | |
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 | |
109 | 109 | // default one when not a single step has mz integration params. This one is |
110 | 110 | // set automatically in the first graph obtained when displaying the TIC |
111 | 111 | // chromatogram right after having loaded the ms run from file. |
112 | MzIntegrationParams m_defaultMzIntegrationParams; | |
112 | pappso::MzIntegrationParams m_defaultMzIntegrationParams; | |
113 | 113 | |
114 | 114 | // Same for MsFragmentationSpec |
115 | 115 | MsFragmentationSpec m_defaultMsFragmentationSpec; |
62 | 62 | |
63 | 63 | if(other.mpa_mzIntegrationParams != nullptr) |
64 | 64 | mpa_mzIntegrationParams = |
65 | new MzIntegrationParams(*other.mpa_mzIntegrationParams); | |
65 | new pappso::MzIntegrationParams(*other.mpa_mzIntegrationParams); | |
66 | 66 | |
67 | 67 | for(auto &&type_spec_pair : other.m_processingTypeSpecMultiMap) |
68 | 68 | { |
94 | 94 | |
95 | 95 | if(other.mpa_mzIntegrationParams != nullptr) |
96 | 96 | mpa_mzIntegrationParams = |
97 | new MzIntegrationParams(*other.mpa_mzIntegrationParams); | |
97 | new pappso::MzIntegrationParams(*other.mpa_mzIntegrationParams); | |
98 | 98 | |
99 | 99 | for(auto &&item : m_processingTypeSpecMultiMap) |
100 | 100 | { |
109 | 109 | |
110 | 110 | void |
111 | 111 | 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 * | |
119 | 119 | ProcessingStep::getMzIntegrationParamsPtr() const |
120 | 120 | { |
121 | 121 | return mpa_mzIntegrationParams; |
43 | 43 | |
44 | 44 | |
45 | 45 | /////////////////////// pappsomspp includes |
46 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
46 | 47 | |
47 | 48 | |
48 | 49 | /////////////////////// Local includes |
80 | 81 | |
81 | 82 | ProcessingStep &operator=(const ProcessingStep &other); |
82 | 83 | |
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; | |
85 | 86 | |
86 | 87 | void newSpec(ProcessingType processing_type, |
87 | 88 | ProcessingSpec *processing_spec_p); |
125 | 126 | // class instance allows to do so. Because not all the specs need such |
126 | 127 | // parameters, we do not make a member variable of that type, but we provide a |
127 | 128 | // means to store a pointer. |
128 | MzIntegrationParams *mpa_mzIntegrationParams = nullptr; | |
129 | pappso::MzIntegrationParams *mpa_mzIntegrationParams = nullptr; | |
129 | 130 | }; |
130 | 131 | |
131 | 132 |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
184 | 184 | } |
185 | 185 | |
186 | 186 | |
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 | ||
187 | 201 | void |
188 | 202 | QualifiedMassSpectrumVectorMassDataIntegrator::cancelOperation() |
189 | 203 | { |
190 | 204 | m_isOperationCancelled = true; |
191 | 205 | |
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"; | |
194 | 208 | |
195 | 209 | emit cancelOperationSignal(); |
196 | 210 | } |
202 | 216 | |
203 | 217 | std::size_t ideal_thread_count = QThread::idealThreadCount(); |
204 | 218 | // 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; | |
205 | 225 | |
206 | 226 | // Depending on the number of nodes (node_count) and on the number of thread |
207 | 227 | // available, we need to compute the right values to parallelize correctly the |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
95 | 95 | pappso::QualifiedMassSpectrumCstSPtr &qualified_mass_spectrum_csp); |
96 | 96 | |
97 | 97 | const pappso::MapTrace &getMapTrace() const; |
98 | ||
99 | void setMaxThreadUseCount(std::size_t count); | |
100 | std::size_t getMaxThreadUseCount(); | |
98 | 101 | |
99 | 102 | public slots: |
100 | 103 | |
131 | 134 | MsRunDataSetCstSPtr mcsp_msRunDataSet = nullptr; |
132 | 135 | |
133 | 136 | ProcessingFlow m_processingFlow; |
137 | ||
138 | std::size_t m_maxThreadUseCount = 0; | |
134 | 139 | |
135 | 140 | std::pair<double, double> m_rtRange = std::pair<double, double>( |
136 | 141 | std::numeric_limits<double>::max(), std::numeric_limits<double>::min()); |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
303 | 303 | { |
304 | 304 | |
305 | 305 | emit setStatusTextSignal( |
306 | QString("Consolidating TEST drift spectra from thread %1") | |
306 | QString("Consolidating drift spectra from thread %1") | |
307 | 307 | .arg(iter)); |
308 | 308 | |
309 | 309 | emit setProgressBarCurrentValueSignal(iter); |
661 | 661 | { |
662 | 662 | |
663 | 663 | emit setStatusTextSignal( |
664 | QString("Consolidating TIC chromatograms from thread %1") | |
664 | QString("Consolidating drift spectra from thread %1") | |
665 | 665 | .arg(iter)); |
666 | 666 | |
667 | 667 | emit setProgressBarCurrentValueSignal(iter); |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
125 | 125 | m_mapTrace.clear(); |
126 | 126 | |
127 | 127 | if(m_processingFlow.getDefaultMzIntegrationParams().getBinningType() == |
128 | BinningType::NONE) | |
128 | pappso::BinningType::NONE) | |
129 | 129 | { |
130 | 130 | integrateToMzNoBinning(); |
131 | 131 | } |
132 | 132 | else if(m_processingFlow.getDefaultMzIntegrationParams().getBinningType() == |
133 | BinningType::ARBITRARY) | |
133 | pappso::BinningType::ARBITRARY) | |
134 | 134 | { |
135 | 135 | integrateToMzArbitraryBinning(); |
136 | 136 | } |
252 | 252 | if(m_mzRange.first != std::numeric_limits<double>::max() && |
253 | 253 | m_mzRange.second != std::numeric_limits<double>::min()) |
254 | 254 | { |
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; | |
257 | 257 | |
258 | 258 | trace_plus_combiner.setFilterResampleKeepXRange( |
259 | 259 | pappso::FilterResampleKeepXRange(m_mzRange.first, |
260 | 260 | m_mzRange.second)); |
261 | 261 | } |
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."; | |
264 | 264 | |
265 | 265 | while(current_iterator != end_iterator) |
266 | 266 | { |
414 | 414 | ++iter; |
415 | 415 | |
416 | 416 | emit setStatusTextSignal( |
417 | QString("Consolidating TEST mass spectra from thread %1").arg(iter)); | |
417 | QString("Consolidating mass spectra from thread %1").arg(iter)); | |
418 | 418 | |
419 | 419 | // qDebug() << "In the consolidating loop, iter:" << iter |
420 | 420 | //<< "with a MapTrace of this size : " |
441 | 441 | QualifiedMassSpectrumVectorMassDataIntegratorToMz:: |
442 | 442 | integrateToMzArbitraryBinning() |
443 | 443 | { |
444 | qDebug(); | |
444 | // qDebug(); | |
445 | 445 | |
446 | 446 | // This function needs to be called by integrateToMz() that has setup all the |
447 | 447 | // required parameters. |
454 | 454 | if(!m_processingFlow.size()) |
455 | 455 | qFatal("The processing flow cannot be empty. Program aborted."); |
456 | 456 | |
457 | MzIntegrationParams local_mz_integration_params = | |
457 | pappso::MzIntegrationParams local_mz_integration_params = | |
458 | 458 | m_processingFlow.getDefaultMzIntegrationParams(); |
459 | 459 | |
460 | 460 | if(!local_mz_integration_params.isValid()) |
461 | 461 | { |
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."; | |
464 | 463 | |
465 | 464 | // If the mz integration params are not valid, then we cannot know the |
466 | 465 | // start and end of the bins ! We need to resort to the statistical data |
562 | 561 | m_mzRange.second != std::numeric_limits<double>::min()) |
563 | 562 | { |
564 | 563 | |
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; | |
567 | 566 | |
568 | 567 | mass_spectrum_plus_combiner.setFilterResampleKeepXRange( |
569 | 568 | pappso::FilterResampleKeepXRange(m_mzRange.first, |
570 | 569 | m_mzRange.second)); |
571 | 570 | } |
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."; | |
574 | 573 | |
575 | 574 | // Configure the binning mass spectrum combiner. |
576 | 575 | |
748 | 747 | |
749 | 748 | emit setStatusTextSignal(message); |
750 | 749 | |
751 | // qDebug() << message; | |
750 | //qDebug() << message; | |
752 | 751 | |
753 | 752 | mass_spectrum_plus_combiner.combine(m_mapTrace, *current_map_trace_sp); |
754 | 753 | |
755 | 754 | emit setProgressBarCurrentValueSignal(iter); |
756 | 755 | |
757 | // qDebug() << "Emitted current value:" << iter; | |
756 | //qDebug() << "Emitted current value:" << iter; | |
758 | 757 | } |
759 | 758 | |
760 | 759 | // Write the data to file so that we can check. It works !!! |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
49 | 49 | #include "ProcessingFlow.hpp" |
50 | 50 | #include "MsRunDataSet.hpp" |
51 | 51 | #include "BaseMsRunDataSetTreeNodeVisitor.hpp" |
52 | #include "MzIntegrationParams.hpp" | |
52 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
53 | 53 | |
54 | 54 | |
55 | 55 | namespace msxps |
49 | 49 | #include "ProcessingFlow.hpp" |
50 | 50 | #include "MsRunDataSet.hpp" |
51 | 51 | #include "BaseMsRunDataSetTreeNodeVisitor.hpp" |
52 | #include "MzIntegrationParams.hpp" | |
52 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
53 | 53 | |
54 | 54 | |
55 | 55 | namespace msxps |
65 | 65 | MsRunDataSetCstSPtr ms_run_data_set_csp, |
66 | 66 | const ProcessingFlow &processing_flow, |
67 | 67 | pappso::TracePlusCombinerSPtr &trace_combiner_sp, |
68 | const MzIntegrationParams &mz_integration_params) | |
68 | const pappso::MzIntegrationParams &mz_integration_params) | |
69 | 69 | : BaseMsRunDataSetTreeNodeVisitor(ms_run_data_set_csp, processing_flow), |
70 | 70 | msp_combiner(trace_combiner_sp), |
71 | 71 | m_mzIntegrationParams(mz_integration_params) |
129 | 129 | |
130 | 130 | void |
131 | 131 | TraceTreeNodeCombinerVisitor::setMzIntegrationParams( |
132 | const MzIntegrationParams &mz_integration_params) | |
132 | const pappso::MzIntegrationParams &mz_integration_params) | |
133 | 133 | { |
134 | 134 | m_mzIntegrationParams = mz_integration_params; |
135 | 135 | } |
136 | 136 | |
137 | 137 | |
138 | const MzIntegrationParams & | |
138 | const pappso::MzIntegrationParams & | |
139 | 139 | TraceTreeNodeCombinerVisitor::getMzIntegrationParams() |
140 | 140 | { |
141 | 141 | return m_mzIntegrationParams; |
49 | 49 | #include "ProcessingFlow.hpp" |
50 | 50 | #include "MsRunDataSet.hpp" |
51 | 51 | #include "BaseMsRunDataSetTreeNodeVisitor.hpp" |
52 | #include "MzIntegrationParams.hpp" | |
52 | #include <pappsomspp/processing/combiners/mzintegrationparams.h> | |
53 | 53 | |
54 | 54 | |
55 | 55 | namespace msxps |
79 | 79 | MsRunDataSetCstSPtr ms_run_data_set_csp, |
80 | 80 | const ProcessingFlow &processing_flow, |
81 | 81 | pappso::TracePlusCombinerSPtr &trace_combiner_sp, |
82 | const MzIntegrationParams &mz_integration_params); | |
82 | const pappso::MzIntegrationParams &mz_integration_params); | |
83 | 83 | |
84 | 84 | TraceTreeNodeCombinerVisitor(const TraceTreeNodeCombinerVisitor &other); |
85 | 85 | |
90 | 90 | |
91 | 91 | const pappso::MapTrace &getMapTrace() const; |
92 | 92 | |
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(); | |
95 | 95 | |
96 | 96 | TraceTreeNodeCombinerVisitor & |
97 | 97 | operator=(const TraceTreeNodeCombinerVisitor &other); |
122 | 122 | protected: |
123 | 123 | pappso::TracePlusCombinerSPtr msp_combiner; |
124 | 124 | |
125 | MzIntegrationParams m_mzIntegrationParams; | |
125 | pappso::MzIntegrationParams m_mzIntegrationParams; | |
126 | 126 | pappso::MapTrace m_mapTrace; |
127 | 127 | }; |
128 | 128 |
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/>. | |
28 | 28 | * |
29 | 29 | * END software license |
30 | 30 | */ |
31 | ||
32 | ||
31 | 33 | |
32 | 34 | #include <cmath> |
33 | 35 | #include <limits> |
1 | 1 | * |
2 | 2 | * msXpertSuite - mass spectrometry software suite |
3 | 3 | * ----------------------------------------------- |
4 | * Copyright(C) 2009,...,2018 Filippo Rusconi | |
4 | * Copyright (C) 2009--2020 Filippo Rusconi | |
5 | 5 | * |
6 | 6 | * http://www.msxpertsuite.org |
7 | 7 | * |
0 | if(TESTS AND (UNIX AND NOT APPLE)) | |
0 | if(MAKE_TESTS AND (UNIX AND NOT APPLE)) | |
1 | 1 | |
2 | 2 | message(\n${BoldRed}"Now configuring src/tests for ${CMAKE_PROJECT_NAME}"${ColourReset}\n) |
3 | 3 | message("TARGET is: ${TARGET}") |
7 | 7 | ######################################################## |
8 | 8 | # Files |
9 | 9 | |
10 | file(GLOB tests_SRCS | |
11 | ||
12 | # Files from the main code source tree | |
13 | ../src/nongui/MzIntegrationParams.cpp | |
10 | set(tests_SRCS | |
14 | 11 | |
15 | 12 | # The main() of the tests executable file |
16 | 13 | testmain.cpp |
17 | 14 | |
18 | 15 | # 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 | |
26 | 16 | ) |
27 | 17 | |
28 | 18 | find_package(Catch2 REQUIRED) |
31 | 21 | # Instruct CMake to run moc automatically when needed. |
32 | 22 | set(CMAKE_AUTOMOC ON) |
33 | 23 | |
34 | find_package(Qt5 COMPONENTS Widgets Xml Svg Sql Script) | |
24 | find_package(Qt5 COMPONENTS Widgets Xml Svg) | |
35 | 25 | |
36 | 26 | qt5_wrap_ui(tests_UIS_H ${${TARGET}_UIS}) |
37 | 27 | |
48 | 38 | qt5_use_modules(tests Widgets) |
49 | 39 | qt5_use_modules(tests Xml) |
50 | 40 | qt5_use_modules(tests Svg) |
51 | qt5_use_modules(tests Sql) | |
52 | qt5_use_modules(tests Script) | |
53 | 41 | qt5_use_modules(tests PrintSupport) |
54 | 42 | |
55 | 43 | #message("CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") |
65 | 53 | ${Qt5Widgets_INCLUDE_DIRS} |
66 | 54 | ${Qt5Xml_INCLUDE_DIRS} |
67 | 55 | ${Qt5Svg_INCLUDE_DIRS} |
68 | ${Qt5Sql_INCLUDE_DIRS} | |
69 | 56 | ${Qt5PrintSupport_INCLUDE_DIRS} |
70 | 57 | ) |
71 | 58 | |
88 | 75 | target_link_libraries(tests |
89 | 76 | ${required_target_link_libraries}) |
90 | 77 | |
78 | #add_test(tests "All Catch2-based tests") | |
79 | add_test(tests "tests") | |
80 | ||
91 | 81 | message("") |
92 | 82 | message(STATUS "${BoldGreen}Finished processing src/tests.${ColourReset}") |
93 | 83 | message("") |
96 | 86 | message(STATUS "Tests are not built.") |
97 | 87 | endif() |
98 | 88 | |
89 |
0 | #include <catch.hpp> | |
0 | #include <catch2/catch.hpp> | |
1 | 1 | |
2 | 2 | #include <QDebug> |
3 | 3 | |
228 | 228 | data_point_vector.push_back(DataPoint("610.07500 15639.6568298340")); |
229 | 229 | data_point_vector.push_back(DataPoint("610.12500 55999.7628784180")); |
230 | 230 | 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")); | |
232 | 232 | data_point_vector.push_back(DataPoint("610.27500 54459.4762458801")); |
233 | 233 | data_point_vector.push_back(DataPoint("610.32500 205580.6580276489")); |
234 | 234 | data_point_vector.push_back(DataPoint("610.37500 84627.3196716309")); |
256 | 256 | // Prepare the bins on the basis of the spectrum. |
257 | 257 | |
258 | 258 | int decimal_places = 5; |
259 | ||
260 | // The size of the bins. | |
259 | 261 | pappso::PrecisionPtr precision_p = |
260 | 262 | pappso::PrecisionFactory::getDaltonInstance(0.05); |
261 | 263 | |
262 | MzIntegrationParams mz_integration_params(610.02, | |
264 | MzIntegrationParams mz_integration_params(610.025, | |
263 | 265 | 610.975, |
264 | 266 | BinningType::ARBITRARY, |
265 | 267 | decimal_places, |
268 | 270 | 0.0, |
269 | 271 | true); |
270 | 272 | |
271 | // Check that it does not compute bins, since BinningType::NONE. | |
272 | ||
273 | 273 | std::vector<double> bins = mz_integration_params.createBins(); |
274 | 274 | REQUIRE(bins.size() == 21); |
275 | REQUIRE(bins[0] == 610.02000); | |
275 | REQUIRE(bins[0] == 610.02500); | |
276 | 276 | |
277 | 277 | // The last bin matches the last DataPoint of the second spectrum + one bin |
278 | 278 | // size. |
0 | #include <catch.hpp> | |
0 | #include <catch2/catch.hpp> | |
1 | 1 | |
2 | 2 | #include <QDebug> |
3 | 3 | |
212 | 212 | REQUIRE(tic == 12963.5715942383 + 15639.6568298340 + 55999.7628784180); |
213 | 213 | |
214 | 214 | tic = mass_spectrum.tic(610.020001, 610.12001); |
215 | REQUIRE(tic == 15639.6568298340); | |
215 | REQUIRE(tic == 15639.6568298340 + 55999.7628784180); | |
216 | 216 | } |
217 | 217 | |
218 | 218 | SECTION("Get the maxIntensityDataPoint from MassSpectrum", "[MassSpectrum]") |
219 | 219 | { |
220 | 220 | 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); | |
223 | 223 | } |
224 | 224 | |
225 | 225 | SECTION("Get the minIntensityDataPoint from MassSpectrum", "[MassSpectrum]") |
226 | 226 | { |
227 | 227 | 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); | |
230 | 230 | } |
231 | 231 | } |
0 | #include <catch.hpp> | |
0 | #include <catch2/catch.hpp> | |
1 | 1 | |
2 | 2 | #include <QDebug> |
3 | 3 | |
4 | 4 | #include "../../src/nongui/MzIntegrationParams.hpp" |
5 | #include <pappsomspp/utils.h> | |
5 | 6 | |
6 | 7 | |
7 | 8 | using namespace pappso; |
115 | 116 | } |
116 | 117 | } |
117 | 118 | |
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; | |
127 | 129 | bool removeZeroValDataPoints = true; |
128 | 130 | |
129 | 131 | MzIntegrationParams mz_integration_params(smallestMz, |
142 | 144 | |
143 | 145 | // Do not forget that we round to 3 decimal places: |
144 | 146 | 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> | |
1 | 1 | |
2 | 2 | #include <QDebug> |
3 | 3 | |
510 | 510 | std::vector<DataPoint> data_point_vector; |
511 | 511 | |
512 | 512 | // 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)); | |
525 | 525 | // clang-format on |
526 | 526 | |
527 | 527 | Trace trace(data_point_vector); |
528 | 528 | |
529 | 529 | 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); | |
533 | 533 | } |
534 | 534 | |
535 | 535 | SECTION("Test minYDataPoint", "[Trace][filters]") |
594 | 594 | { |
595 | 595 | // As long as prev datapoint has y value less or equal to next, |
596 | 596 | // 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). | |
598 | 599 | |
599 | 600 | std::vector<DataPoint> data_point_vector; |
600 | 601 | |
607 | 608 | data_point_vector.push_back(DataPoint("610.02000 12961.5715942383")); |
608 | 609 | data_point_vector.push_back(DataPoint("610.02000 12962.5715942383")); |
609 | 610 | data_point_vector.push_back(DataPoint("610.02000 12963.5715942383")); |
610 | data_point_vector.push_back(DataPoint("610.02000 12963.5715942383")); | |
611 | 611 | // clang-format on |
612 | 612 | |
613 | 613 | Trace trace(data_point_vector); |