libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
timsdiaslices.cpp
Go to the documentation of this file.
1/**
2 * \file pappsomspp/vendors/tims/timsdiaslices.cpp
3 * \date 02/07/2024
4 * \brief handle specific data for DIA MS runs
5 */
6
7/*******************************************************************************
8 * Copyright (c) 2024 Olivier Langella <Olivier.Langella@u-psud.fr>.
9 *
10 * This file is part of the PAPPSOms++ library.
11 *
12 * PAPPSOms++ is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * PAPPSOms++ is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
24 *
25 ******************************************************************************/
26
27#include "timsdiaslices.h"
29
30#include <iterator>
31
32namespace pappso
33{
34
35bool
37{
38 double half_window = IsolationWidth / 2;
39 if(mz < (IsolationMz - half_window))
40 return false;
41 if(mz > (IsolationMz + half_window))
42 return false;
43 return true;
44}
45
47{
48 for(MsMsWindowGroup *p_group : *this)
49 {
50 delete p_group;
51 }
52}
53
54void
56{
57 std::size_t group_id = window.WindowGroup;
58 auto it_in_list =
59 std::find_if(begin(), end(), [group_id](const MsMsWindowGroup *group) {
60 if(group->WindowGroup == group_id)
61 return true;
62 return false;
63 });
64 if(it_in_list == end())
65 {
66
67 qDebug();
68 MsMsWindowGroup *new_group = new MsMsWindowGroup();
69 new_group->WindowGroup = group_id;
70 new_group->push_back(window);
71 push_back(new_group);
72 }
73 else
74 {
75 qDebug();
76 (*it_in_list)->push_back(window);
77
78 std::sort((*it_in_list)->begin(),
79 (*it_in_list)->end(),
80 [](const MsMsWindow &a, const MsMsWindow &b) {
81 return (a.ScanNumBegin < b.ScanNumBegin);
82 });
83 std::size_t i = 0;
84 for(MsMsWindow &window : *(*it_in_list))
85 {
86 window.SliceIndex = i;
87 i++;
88 }
89 }
90 qDebug();
91}
92
95 std::size_t window_group_id) const
96{
97
98 auto it_in_list = std::find_if(
99 begin(), end(), [window_group_id](const MsMsWindowGroup *group) {
100 if(group->WindowGroup == window_group_id)
101 return true;
102 return false;
103 });
104
105 if(it_in_list == end())
106 {
108 QObject::tr("MsMsWindowGroup %1 not found").arg(window_group_id));
109 }
110 return *it_in_list;
111}
112
113TimsDiaSlices::TimsDiaSlices(QSqlQuery &query, TimsData *tims_data_origin)
114 : mp_timsDataOrigin(tims_data_origin)
115{
116
117 /*
118CREATE TABLE IF NOT EXISTS "DiaFrameMsMsWindows" (
119"WindowGroup" INTEGER NOT NULL,
120"ScanNumBegin" INTEGER NOT NULL,
121"ScanNumEnd" INTEGER NOT NULL,
122"IsolationMz" REAL NOT NULL,
123"IsolationWidth" REAL NOT NULL,
124"CollisionEnergy" REAL NOT NULL,
125FOREIGN KEY("WindowGroup") REFERENCES "FrameMsMsWindowGroups"("Id"),
126PRIMARY KEY("WindowGroup","ScanNumBegin")
127) WITHOUT ROWID;
128*/
129
130 if(!query.exec("SELECT WindowGroup, ScanNumBegin, ScanNumEnd, IsolationMz, "
131 "IsolationWidth, CollisionEnergy FROM DiaFrameMsMsWindows;"))
132 {
133 qDebug();
134 throw ExceptionNotFound(
135 QObject::tr("ERROR : no DiaFrameMsMsWindows in SqlLite database"));
136 }
137 else
138 {
139
140 qDebug() << query.size();
141 if(query.size() == 0)
142 {
143 qDebug();
144 throw ExceptionNotFound(
145 QObject::tr("ERROR : no DiaFrameMsMsWindows in SqlLite database"));
146 }
147 MsMsWindow msms_window;
148 while(query.next())
149 {
150 qDebug();
151 msms_window.WindowGroup = query.value(0).toLongLong();
152 msms_window.ScanNumBegin = query.value(1).toLongLong();
153 msms_window.ScanNumEnd = query.value(2).toLongLong();
154 msms_window.IsolationMz = query.value(3).toDouble();
155 msms_window.IsolationWidth = query.value(4).toDouble();
156 msms_window.CollisionEnergy = query.value(5).toDouble();
157
158 qDebug();
159 m_msMsWindowGroupList.addInGroup(msms_window);
160 }
161
162 if(m_msMsWindowGroupList.size() == 0)
163 {
164 qDebug();
165 throw ExceptionNotFound(
166 QObject::tr("ERROR : no DiaFrameMsMsWindows in SqlLite database"));
167 }
168 }
169
170 qDebug();
171 std::size_t max_frame_id = 0;
172 if(!query.exec("SELECT Frame, WindowGroup FROM DiaFrameMsMsInfo;"))
173 {
174 qDebug();
176 QObject::tr("ERROR : no DiaFrameMsMsInfo in SqlLite database"));
177 }
178 else
179 {
180 qDebug() << query.size();
181 if(query.size() == 0)
182 {
183 qDebug();
185 QObject::tr("ERROR : no DiaFrameMsMsInfo in SqlLite database"));
186 }
187 while(query.next())
188 {
189 qDebug();
190 max_frame_id = query.value(0).toLongLong();
191 m_mapFrame2WindowGroupPtr[query.value(0).toLongLong()] =
192 m_msMsWindowGroupList.getWindowGroupPtrByGroupId(
193 query.value(1).toLongLong());
194 }
195
196 if(m_mapFrame2WindowGroupPtr.size() == 0)
197 {
198 qDebug();
199 throw ExceptionNotFound(
200 QObject::tr("ERROR : no DiaFrameMsMsInfo in SqlLite database"));
201 }
202 }
203 qDebug();
204
205 m_frameId2GlobalSliceIndexBegin.resize(max_frame_id + 1);
206
207 m_ms2frameId2Ms1FrameId.resize(max_frame_id + 1);
208 std::size_t last_ms1 = 0;
209 std::size_t previous_frame = 0;
210
211 std::size_t cumul_global_slice = 0;
212 m_ms1frameIdList.clear();
213 for(const std::pair<std::size_t, MsMsWindowGroup *> pair_frame_pgroup :
214 m_mapFrame2WindowGroupPtr)
215 {
216 if(previous_frame != pair_frame_pgroup.first - 1)
217 {
218 last_ms1 = previous_frame + 1;
219 m_ms1frameIdList.push_back(last_ms1);
220 }
221 previous_frame = pair_frame_pgroup.first;
222 qDebug() << pair_frame_pgroup.first << " "
223 << m_frameId2GlobalSliceIndexBegin.size();
224 FrameSliceRange slice_range;
225 qDebug() << pair_frame_pgroup.first;
226 slice_range.frame_id = pair_frame_pgroup.first;
227 slice_range.begin_global_slice_index = cumul_global_slice;
228 m_frameId2GlobalSliceIndexBegin[pair_frame_pgroup.first] =
229 cumul_global_slice;
230 m_ms2frameId2Ms1FrameId[pair_frame_pgroup.first] = last_ms1;
231
232 cumul_global_slice += pair_frame_pgroup.second->size();
233
234 if(cumul_global_slice > 0)
235 slice_range.end_global_slice_index = cumul_global_slice - 1;
236 m_frameSliceRangeList.push_back(slice_range);
237 }
238
239 qDebug();
240 m_totalSlicesCount = cumul_global_slice;
241}
242
243TimsDiaSlices::~TimsDiaSlices()
244{
245}
246
247const std::map<std::size_t, TimsDiaSlices::MsMsWindowGroup *> &
248TimsDiaSlices::getMapFrame2WindowGroupPtr() const
249{
250 return m_mapFrame2WindowGroupPtr;
251}
253TimsDiaSlices::getMsMsWindowGroupList() const
254{
255 return m_msMsWindowGroupList;
256}
257
258std::size_t
259TimsDiaSlices::getGlobalSliceIndexBeginByFrameId(std::size_t frame_id) const
260{
261 return (m_frameId2GlobalSliceIndexBegin[frame_id]);
262}
263std::size_t
264TimsDiaSlices::getFrameIdByGlobalSliceIndex(std::size_t global_slice_id) const
265{
266 return (getFrameSliceRangeByGlobalSliceIndex(global_slice_id).frame_id);
267}
268
270TimsDiaSlices::getFrameSliceRangeByGlobalSliceIndex(
271 std::size_t global_slice_index) const
272{
273
274 qDebug();
275 auto it = std::find_if(m_frameSliceRangeList.cbegin(),
276 m_frameSliceRangeList.cend(),
277 [global_slice_index](const FrameSliceRange &x) {
278 if(global_slice_index < x.begin_global_slice_index)
279 return false;
280 if(global_slice_index > x.end_global_slice_index)
281 return false;
282 return true;
283 });
284
285 if(it != m_frameSliceRangeList.cend())
286 {
287 return *it;
288 }
289 qDebug();
290 throw ExceptionNotFound(QObject::tr("ERROR : GlobalSliceIndex %1 not found")
291 .arg(global_slice_index));
292}
293
294std::size_t
295TimsDiaSlices::getTotalSlicesCount() const
296{
297 return m_totalSlicesCount;
298}
299
301TimsDiaSlices::getMsMsWindowByGlobalSliceIndex(
302 std::size_t global_slice_index) const
303{
304 qDebug() << global_slice_index;
305 const TimsDiaSlices::FrameSliceRange &range =
306 getFrameSliceRangeByGlobalSliceIndex(global_slice_index);
307
308 qDebug() << "range.frame_id=" << range.frame_id
309 << " range.begin_global_slice_index="
311 return m_mapFrame2WindowGroupPtr.at(range.frame_id)
312 ->at(global_slice_index - range.begin_global_slice_index);
313}
314
315std::size_t
316TimsDiaSlices::getLastMs1FrameIdByMs2FrameId(std::size_t frame_id) const
317{
318
319 return m_ms2frameId2Ms1FrameId.at(frame_id);
320}
321
322
324TimsDiaSlices::getCombinedMs2ScansByGlobalSliceIndex(
325 std::size_t global_slice_index) const
326{
327
328 qDebug();
329 TimsDataFastMap &raw_spectrum = TimsDataFastMap::getTimsDataFastMapInstance();
330 raw_spectrum.clear();
331 try
332 {
333 FrameSliceRange range =
334 getFrameSliceRangeByGlobalSliceIndex(global_slice_index);
335
336 MsMsWindow window =
337 m_mapFrame2WindowGroupPtr.at(range.frame_id)
338 ->at(global_slice_index - range.begin_global_slice_index);
339 qDebug();
340 TimsFrameCstSPtr tims_frame;
341 tims_frame = mp_timsDataOrigin->getTimsFrameCstSPtrCached(range.frame_id);
342 qDebug();
343 /*combiner.combine(combiner_result,
344 tims_frame.get()->cumulateScanToTrace(
345 scan_mobility_start, scan_mobility_end));*/
346 tims_frame.get()->combineScansInTofIndexIntensityMap(
347 raw_spectrum, window.ScanNumBegin, window.ScanNumEnd);
348 qDebug();
349 }
350
351 catch(PappsoException &error)
352 {
353 throw PappsoException(
354 QObject::tr("ERROR in %1 (global_slice_index=%2):\n%3")
355 .arg(__FUNCTION__)
356 .arg(global_slice_index)
357 .arg(error.qwhat()));
358 }
359 catch(std::exception &error)
360 {
361 qDebug() << QString("Failure %1 ").arg(error.what());
362 }
363 return raw_spectrum;
364 qDebug();
365}
366void
367TimsDiaSlices::getMs2QualifiedSpectrumByGlobalSliceIndex(
368 const MsRunIdCstSPtr &msrun_id,
369 QualifiedMassSpectrum &mass_spectrum,
370 std::size_t global_slice_index,
371 bool want_binary_data) const
372{
373
374 qDebug();
375 try
376 {
377 FrameSliceRange range =
378 getFrameSliceRangeByGlobalSliceIndex(global_slice_index);
379
380 MsMsWindow window =
381 m_mapFrame2WindowGroupPtr.at(range.frame_id)
382 ->at(global_slice_index - range.begin_global_slice_index);
383
384 MassSpectrumId spectrum_id;
385
386 spectrum_id.setSpectrumIndex(global_slice_index);
387 spectrum_id.setNativeId(
388 QString(
389 "global_slice_index=%1 frame=%2 begin=%3 end=%4 group=%5 slice=%6")
390 .arg(global_slice_index)
391 .arg(range.frame_id)
392 .arg(window.ScanNumBegin)
393 .arg(window.ScanNumEnd)
394 .arg(window.WindowGroup)
395 .arg(window.SliceIndex));
396
397 spectrum_id.setMsRunId(msrun_id);
398
399 mass_spectrum.setMassSpectrumId(spectrum_id);
400
401 mass_spectrum.setMsLevel(2);
402 // mass_spectrum.setPrecursorSpectrumIndex(spectrum_descr.ms1_index);
403
404 mass_spectrum.setEmptyMassSpectrum(true);
405
406 qDebug();
407
408 // get precursor ion data
409
410 // mass_spectrum.appendPrecursorIonData(spectrum_descr.precursor_ion_data);
411
412 mass_spectrum.setPrecursorNativeId(
413 QString("frame_id=%1 begin=%2 end=%3 group=%4 slice=%5")
414 .arg(m_ms2frameId2Ms1FrameId.at(range.frame_id))
415 .arg(window.ScanNumBegin)
416 .arg(window.ScanNumEnd)
417 .arg(window.WindowGroup)
418 .arg(window.SliceIndex));
419
420 mass_spectrum.setParameterValue(
421 QualifiedMassSpectrumParameter::IsolationMz, window.IsolationMz);
422 mass_spectrum.setParameterValue(
423 QualifiedMassSpectrumParameter::IsolationMzWidth,
424 window.IsolationWidth);
425
426 mass_spectrum.setParameterValue(
427 QualifiedMassSpectrumParameter::CollisionEnergy,
428 window.CollisionEnergy);
429
430
431 qDebug() << window.ScanNumBegin;
432 mass_spectrum.setParameterValue(
433 QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexBegin,
434 (qulonglong)window.ScanNumBegin);
435
436
437 qDebug() << window.ScanNumEnd;
438 mass_spectrum.setParameterValue(
439 QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexEnd,
440 (qulonglong)window.ScanNumEnd);
441 qDebug();
442 TimsFrameBaseCstSPtr tims_frame;
443
444
445 if(want_binary_data)
446 {
447 qDebug() << "bindec";
448 tims_frame =
449 mp_timsDataOrigin->getTimsFrameCstSPtrCached(range.frame_id);
450 }
451 else
452 {
453 tims_frame =
454 mp_timsDataOrigin->getTimsFrameBaseCstSPtrCached(range.frame_id);
455 }
456
457 mass_spectrum.setRtInSeconds(tims_frame.get()->getRtInSeconds());
458
459
460 mass_spectrum.setParameterValue(
461 QualifiedMassSpectrumParameter::IonMobOneOverK0Begin,
462 tims_frame.get()->getOneOverK0Transformation(window.ScanNumBegin));
463
464 mass_spectrum.setParameterValue(
465 QualifiedMassSpectrumParameter::IonMobOneOverK0End,
466 tims_frame.get()->getOneOverK0Transformation(window.ScanNumEnd));
467
468 qDebug();
469 /*combiner.combine(combiner_result,
470 tims_frame.get()->cumulateScanToTrace(
471 scan_mobility_start, scan_mobility_end));*/
472 if(want_binary_data)
473 {
474
475 TimsDataFastMap &raw_spectrum =
476 TimsDataFastMap::getTimsDataFastMapInstance();
477 raw_spectrum.clear();
478 tims_frame.get()->combineScansInTofIndexIntensityMap(
479 raw_spectrum, window.ScanNumBegin, window.ScanNumEnd);
480
481
482 Trace trace;
483 if(m_builtinMs2Centroid)
484 {
485 // raw_spectrum.removeArtefactualSpike();
486 raw_spectrum.builtInCentroid();
487 }
488
489 trace =
490 tims_frame.get()->getTraceFromTofIndexIntensityMap(raw_spectrum);
491
492 if(trace.size() > 0)
493 {
494 mass_spectrum.setMassSpectrumSPtr(
495 MassSpectrum(trace).makeMassSpectrumSPtr());
496 mass_spectrum.setEmptyMassSpectrum(false);
497 }
498 else
499 {
500 mass_spectrum.setMassSpectrumSPtr(nullptr);
501 mass_spectrum.setEmptyMassSpectrum(true);
502 }
503 }
504 qDebug();
505 }
506
507 catch(PappsoException &error)
508 {
509 throw PappsoException(
510 QObject::tr("ERROR in %1 (global_slice_index=%2):\n%3")
511 .arg(__FUNCTION__)
512 .arg(global_slice_index)
513 .arg(error.qwhat()));
514 }
515 catch(std::exception &error)
516 {
517 qDebug() << QString("Failure %1 ").arg(error.what());
518 }
519 qDebug();
520}
521
522void
523TimsDiaSlices::getMs1QualifiedSpectrumByGlobalSliceIndex(
524 const MsRunIdCstSPtr &msrun_id,
525 QualifiedMassSpectrum &mass_spectrum,
526 std::size_t global_slice_index,
527 bool want_binary_data,
528 int rt_position) const
529{
530
531 qDebug();
532 try
533 {
534 FrameSliceRange range =
535 getFrameSliceRangeByGlobalSliceIndex(global_slice_index);
536
537 MsMsWindow window =
538 m_mapFrame2WindowGroupPtr.at(range.frame_id)
539 ->at(global_slice_index - range.begin_global_slice_index);
540
541 std::size_t ms1_frame_id = getLastMs1FrameIdByMs2FrameId(range.frame_id);
542 if(rt_position != 0)
543 {
544 std::size_t i = 0;
545 for(i = 0; i < m_ms1frameIdList.size(); i++)
546 {
547 if(m_ms1frameIdList.at(i) == ms1_frame_id)
548 break;
549 }
550 long index = (long)i + rt_position;
551 if((index > -1) && (index < (long)m_ms1frameIdList.size()))
552 ms1_frame_id = m_ms1frameIdList.at(index);
553 }
554
555 MassSpectrumId spectrum_id;
556
557 spectrum_id.setSpectrumIndex(global_slice_index);
558 spectrum_id.setNativeId(
559 QString(
560 "global_slice_index=%1 frame=%2 begin=%3 end=%4 group=%5 slice=%6")
561 .arg(global_slice_index)
562 .arg(ms1_frame_id)
563 .arg(window.ScanNumBegin)
564 .arg(window.ScanNumEnd)
565 .arg(window.WindowGroup)
566 .arg(window.SliceIndex));
567
568 spectrum_id.setMsRunId(msrun_id);
569
570 mass_spectrum.setMassSpectrumId(spectrum_id);
571
572 mass_spectrum.setMsLevel(1);
573 // mass_spectrum.setPrecursorSpectrumIndex(spectrum_descr.ms1_index);
574
575 mass_spectrum.setEmptyMassSpectrum(true);
576
577 qDebug();
578
579 // get precursor ion data
580
581 // mass_spectrum.appendPrecursorIonData(spectrum_descr.precursor_ion_data);
582
583
584 qDebug() << window.ScanNumBegin;
585 mass_spectrum.setParameterValue(
586 QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexBegin,
587 (qulonglong)window.ScanNumBegin);
588
589
590 qDebug() << window.ScanNumEnd;
591 mass_spectrum.setParameterValue(
592 QualifiedMassSpectrumParameter::TimsFrameIonMobScanIndexEnd,
593 (qulonglong)window.ScanNumEnd);
594 qDebug();
595 TimsFrameBaseCstSPtr tims_frame;
596
597
598 if(want_binary_data)
599 {
600 qDebug() << "bindec";
601 tims_frame =
602 mp_timsDataOrigin->getTimsFrameCstSPtrCached(ms1_frame_id);
603 }
604 else
605 {
606 tims_frame =
607 mp_timsDataOrigin->getTimsFrameBaseCstSPtrCached(ms1_frame_id);
608 }
609 mass_spectrum.setRtInSeconds(tims_frame.get()->getRtInSeconds());
610
611
612 mass_spectrum.setParameterValue(
613 QualifiedMassSpectrumParameter::IonMobOneOverK0Begin,
614 tims_frame.get()->getOneOverK0Transformation(window.ScanNumBegin));
615
616 mass_spectrum.setParameterValue(
617 QualifiedMassSpectrumParameter::IonMobOneOverK0End,
618 tims_frame.get()->getOneOverK0Transformation(window.ScanNumEnd));
619
620 qDebug();
621 /*combiner.combine(combiner_result,
622 tims_frame.get()->cumulateScanToTrace(
623 scan_mobility_start, scan_mobility_end));*/
624 if(want_binary_data)
625 {
626
627 double mz = (window.IsolationMz - (window.IsolationWidth / 2));
628 qDebug() << mz;
629
630 quint32 tof_index_begin = tims_frame.get()
631 ->getMzCalibrationInterfaceSPtr()
632 .get()
633 ->getTofIndexFromMz(mz);
634
635 mz = (window.IsolationMz + (window.IsolationWidth / 2));
636 qDebug() << mz;
637 quint32 tof_index_end = tims_frame.get()
638 ->getMzCalibrationInterfaceSPtr()
639 .get()
640 ->getTofIndexFromMz(mz);
641
642 qDebug() << "tof_index_begin=" << tof_index_begin
643 << " tof_index_end=" << tof_index_end;
644
645 TimsDataFastMap &raw_spectrum =
646 TimsDataFastMap::getTimsDataFastMapInstance();
647 raw_spectrum.clear();
648 tims_frame.get()->combineScansInTofIndexIntensityMap(
649 raw_spectrum,
650 window.ScanNumBegin,
651 window.ScanNumEnd,
652 tof_index_begin,
653 tof_index_end);
654
655
656 Trace trace;
657 if(m_builtinMs2Centroid)
658 {
659 // raw_spectrum.removeArtefactualSpike();
660 raw_spectrum.builtInCentroid();
661 }
662
663 trace =
664 tims_frame.get()->getTraceFromTofIndexIntensityMap(raw_spectrum);
665
666 if(trace.size() > 0)
667 {
668 mass_spectrum.setMassSpectrumSPtr(
669 MassSpectrum(trace).makeMassSpectrumSPtr());
670 mass_spectrum.setEmptyMassSpectrum(false);
671 }
672 else
673 {
674 mass_spectrum.setMassSpectrumSPtr(nullptr);
675 mass_spectrum.setEmptyMassSpectrum(true);
676 }
677 }
678 qDebug();
679 }
680
681 catch(PappsoException &error)
682 {
683 throw PappsoException(
684 QObject::tr("ERROR in %1 (global_slice_index=%2):\n%3")
685 .arg(__FUNCTION__)
686 .arg(global_slice_index)
687 .arg(error.qwhat()));
688 }
689 catch(std::exception &error)
690 {
691 qDebug() << QString("Failure %1 ").arg(error.what());
692 }
693 qDebug();
694}
695
696} // namespace pappso
void setNativeId(const QString &native_id)
void setMsRunId(MsRunIdCstSPtr other)
void setSpectrumIndex(std::size_t index)
Class to represent a mass spectrum.
const char * what() const noexcept override
virtual const QString & qwhat() const
Class representing a fully specified mass spectrum.
void setPrecursorNativeId(const QString &native_id)
Set the scan native id of the precursor ion.
void setMassSpectrumId(const MassSpectrumId &iD)
Set the MassSpectrumId.
void setMsLevel(uint ms_level)
Set the mass spectrum level.
void setParameterValue(QualifiedMassSpectrumParameter parameter, const QVariant &value)
void setMassSpectrumSPtr(MassSpectrumSPtr massSpectrum)
Set the MassSpectrumSPtr.
void setRtInSeconds(pappso_double rt)
Set the retention time in seconds.
void setEmptyMassSpectrum(bool is_empty_mass_spectrum)
replacement for std::map
void builtInCentroid()
simple filter to agregate counts on neigbhor mobility slots (+1)
MsMsWindowGroupList m_msMsWindowGroupList
TimsDiaSlices(QSqlQuery &query, TimsData *tims_data_origin)
A simple container of DataPoint instances.
Definition trace.h:148
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< const TimsFrameBase > TimsFrameBaseCstSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
std::shared_ptr< const TimsFrame > TimsFrameCstSPtr
Definition timsframe.h:43
MsMsWindowGroup * getWindowGroupPtrByGroupId(std::size_t window_group_id) const
void addInGroup(const MsMsWindow &window)
bool isMzInRange(double mz) const
tell if given mz is in range for this window
handle specific data for DIA MS runs