libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
bafasciimsrunreader.cpp
Go to the documentation of this file.
1
2/////////////////////// StdLib includes
3
4
5/////////////////////// Qt includes
6#include <QDebug>
7#include <QFileInfo>
8
9
10/////////////////////// libpwiz includes
11#include <pwiz/data/msdata/DefaultReaderList.hpp>
12
13
14/////////////////////// Local includes
15#include "bafasciimsrunreader.h"
22
23
24namespace pappso
25{
26
28 : pappso::MsRunReader(msrun_id_csp)
29{
30 // Run the initialization function that checks that the file exists!
31
32 initialize();
33}
34
35
36void
38{
39 // Use the accept function to parse the whole file, check its
40 // contents validity and also count the number of spectra (that is,
41 // of lines).
42 if(!accept(mcsp_msRunId->getFileName()))
43 {
44 throw(pappso::ExceptionNotRecognized(QString("Failed to initialize reading of file %1 "
45 "in BafAsciiMsRunReader, for MS run %2:\n")
46 .arg(mcsp_msRunId->getFileName())
47 .arg(mcsp_msRunId.get()->toString())));
48 }
49}
50
51
55
56QString
58{
59
60 // Construct the regular expression pattern, piecemeal...
61
62 // The retention time as the very first value in the line.
63 QString regexp_pattern =
64 QString("^(%1)").arg(Utils::unsignedDoubleNumberNoExponentialRegExp.pattern());
65
66 // The ionization mode (positive or negative)
67 regexp_pattern += QString(",([+-])");
68
69 // The ion source type.
70 regexp_pattern += QString(",(ESI|MALDI)");
71
72 // The MS level (ms1 for full scan mass spectrum)
73 regexp_pattern += QString(",ms(\\d)");
74
75 // Do no know what this is for.
76 regexp_pattern += QString(",(-)");
77
78 // The type of peak (profile or centroid).
79 regexp_pattern += QString(",(profile|line)");
80
81 // The m/z range of the mass spectrum.
82 regexp_pattern += QString(",(%1-%2)")
85
86 // The count of peaks following this element in the remaining of the line.
87 regexp_pattern += QString(",(\\d+)");
88
89 // Finally the whole set of ,<mz><space><intensity> pairs to
90 // then end of the line.
91 regexp_pattern += QString("(.*$)");
92
93 // qDebug() << "The full regexp_pattern:" << regexp_pattern;
94
95 return regexp_pattern;
96}
97
98QRegularExpression
100{
101 QRegularExpression regexp = QRegularExpression(pattern);
102
103 if(!regexp.isValid())
104 {
105 qDebug() << "The regular expression is not valid:" << regexp.errorString();
106 return QRegularExpression();
107 }
108
109 return QRegularExpression(pattern);
110}
111
112bool
114 MassSpectrumLineData &ms_line_data,
115 QRegularExpression &line_regexp) const
116{
117 // We get a line from the file, exactly as is and we have to
118 // parse it using regexp to extract all the data out of it,
119 // which are then set to ms_line_data.
120
121 line = line.trimmed();
122
123 // qDebug() << "Current brukerBafAscii format line " << line_count << ": "
124 // << line.left(30) << " ... " << line.right(30);
125
126 QRegularExpressionMatch regexp_match = line_regexp.match(line);
127 bool ok = false;
128
129 if(regexp_match.hasMatch())
130 {
131 // qDebug() << "The match succeeded.";
132
133 double retention_time = regexp_match.captured(1).toDouble(&ok);
134 if(!ok)
135 {
136 qDebug() << "Failed to extract the retention time of the mass spectrum.";
137 return false;
138 }
139 ms_line_data.retentionTime = retention_time;
140
141
142 ms_line_data.ionizationMode = regexp_match.captured(2);
143 ms_line_data.ionSourceType = regexp_match.captured(3);
144
145 int ms_level = regexp_match.captured(4).toInt(&ok);
146 if(!ok)
147 {
148 qDebug() << "Failed to extract the MS level of the mass spectrum.";
149 return false;
150 }
151 ms_line_data.msLevel = ms_level;
152
153 QString dash = regexp_match.captured(5);
154 ms_line_data.dash = dash;
155
156 ms_line_data.peakShapeType = regexp_match.captured(6);
157
158 QString mz_range = regexp_match.captured(7);
159
160 double mz_range_start = mz_range.left(mz_range.indexOf("-")).toDouble(&ok);
161 if(!ok)
162 {
163 qDebug() << "Failed to extract the start of the m/z range.";
164 return false;
165 }
166 double mz_range_end = mz_range.right(mz_range.indexOf("-") + 1).toDouble(&ok);
167 if(!ok)
168 {
169 qDebug() << "Failed to extract the end of the m/z range.";
170 return false;
171 }
172 ms_line_data.mz_range = std::pair<double, double>(mz_range_start, mz_range_end);
173
174 // qDebug() << qSetRealNumberPrecision(10)
175 // << "mz_range_start: " << mz_range_start
176 // << "mz_range_end: " << mz_range_end;
177
178 std::size_t peak_count = regexp_match.captured(8).toULongLong(&ok);
179 if(!ok)
180 {
181 qDebug() << "Failed to extract the number of peaks in the mass "
182 "spectrum.";
183 return false;
184 }
185 ms_line_data.peakCount = peak_count;
186
187 QString peaks = regexp_match.captured(9);
188 ms_line_data.peakList = peaks.split(",", Qt::SkipEmptyParts);
189
190 // qDebug() << "The number of peaks:" << ms_line_data.peakList.size();
191
192 // Sanity check:
193 if(static_cast<std::size_t>(ms_line_data.peakList.size()) != ms_line_data.peakCount)
194 {
195 qDebug() << "The number of peaks in the mass spectrum does not "
196 "match the advertised one.";
197 return false;
198 }
199
200 // qDebug() << "The retention time:" << retention_time
201 // << "the ionization mode: " << ionization_mode
202 // << "the source type: " << source_type
203 // << "MS level is:" << ms_level
204 // << "peak shape type: " << peak_shape_type
205 // << "m/z range: " << mz_range << "peak count: " <<
206 // peak_count
207 // << "and peaks: " << peaks.left(100) << " ... "
208 // << peaks.right(100) << "";
209 }
210 else
211 {
212 qDebug() << "The match failed.";
213 return false;
214 }
215
216 return true;
217}
218
219bool
220BafAsciiMsRunReader::accept(const QString &file_name) const
221{
222 qDebug();
223
224 // Here we just test all the lines of the file to check that they comply with
225 // the BafAscii format (ascii export from Baf file using the Bruker
226 // DataAnalysis/Compass software)..
227
228 // The format of the file, for MS1 data only is the following:
229 // <rt time in min>,+,ESI,ms1,-,profile,<m/z range start>-<m/z range
230 // end>,512704,<m/z> <int>,<m/z> <int>,.. One such line per retention time
231 // value.
232
233 QString line_regexp_pattern = craftLineParserRegExpPattern();
234 QRegularExpression line_regexp = craftLineParserRegExp(line_regexp_pattern);
235
236 if(!line_regexp.isValid())
237 {
238 qDebug() << "Failed to craft the regular expresssion";
239
240 return false;
241 }
242
243 QFile file(file_name);
244
245 if(!file.open(QFile::ReadOnly | QFile::Text))
246 {
247 qDebug() << "Failed to open file" << file_name;
248
249 return false;
250 }
251
252 MassSpectrumLineData ms_line_data;
253
254 while(!file.atEnd())
255 {
256 QString line = file.readLine().trimmed();
257
258 if(!parseMassSpectrumLine(line, ms_line_data, line_regexp))
259 {
260 qDebug() << "Failed to parse a line.";
261
262 file.close();
263 return false;
264 }
265
267 }
268
269 file.close();
270
271 if(m_spectrumCount >= 1)
272 {
273 qDebug() << "The file seems indeed to be BafAscii.";
274 return true;
275 }
276
277 qDebug() << "The file does not seem to be BafAscii.";
278 return false;
279}
280
281
283BafAsciiMsRunReader::massSpectrumSPtr(std::size_t spectrum_index)
284{
285 return qualifiedMassSpectrum(spectrum_index).getMassSpectrumSPtr();
286}
287
288
291{
292 return qualifiedMassSpectrum(spectrum_index).getMassSpectrumCstSPtr();
293}
294
295
298 bool want_binary_data) const
299{
300 // qDebug();
301
302 // Each line holds the data of one mass spectrum. There are other
303 // metadata at the beginning of the line.
304
305 QString file_name = mcsp_msRunId->getFileName();
306
307 QFile file(file_name);
308
309 if(!file.open(QFile::ReadOnly | QFile::Text))
310 {
311 throw(PappsoException(QString("%1-%2 Error reading file %3 in "
312 "BafAsciiMsRunReader, for MS run %4:\n")
313 .arg(__FILE__)
314 .arg(__LINE__)
315 .arg(mcsp_msRunId->getFileName())
316 .arg(mcsp_msRunId.get()->toString())));
317 }
318
319 // The format of the file, for MS1 data only is the following:
320 // <rt time in min>,+,ESI,ms1,-,profile,<m/z range start>-<m/z range
321 // end>,512704,<m/z> <int>,<m/z> <int>,.. One such line per retention time
322 // value.
323
324 QString line_regexp_pattern = craftLineParserRegExpPattern();
325 QRegularExpression line_regexp = craftLineParserRegExp(line_regexp_pattern);
326
327 if(!line_regexp.isValid())
328 {
329 throw(PappsoException(QString("%1-%2 Failed to craft the regular expresssion while reading "
330 "file %3 in BafAsciiMsRunReader, for MS run %4:")
331 .arg(__FILE__)
332 .arg(__LINE__)
333 .arg(mcsp_msRunId->getFileName())
334 .arg(mcsp_msRunId.get()->toString())));
335 }
336
337 QualifiedMassSpectrum qualified_mass_spectrum;
338 MassSpectrumLineData ms_line_data;
339 std::size_t mass_spectrum_index = 0;
340
341 while(!file.atEnd())
342 {
343 if(mass_spectrum_index < spectrum_index)
344 continue;
345
346
347 QString line = file.readLine().trimmed();
348
349 if(!parseMassSpectrumLine(line, ms_line_data, line_regexp))
350 {
351 file.close();
352
353 throw(PappsoException(QString("%1-%2 Failed to parse line while reading file %3 "
354 "in BafAsciiMsRunReader, for MS run %4:\n")
355 .arg(__FILE__)
356 .arg(__LINE__)
357 .arg(mcsp_msRunId->getFileName())
358 .arg(mcsp_msRunId.get()->toString())));
359 }
360
361 // At this point we have all the data inside the ms_line_data structure.
362 // If the user wants the binary data, that is, the mass spectrometric
363 // data, we need to prepare these.
364
365 MassSpectrumId mass_spectrum_id(mcsp_msRunId, mass_spectrum_index);
366
367 qualified_mass_spectrum.setMassSpectrumId(mass_spectrum_id);
368 qualified_mass_spectrum.setMsLevel(ms_line_data.msLevel);
369 qualified_mass_spectrum.setRtInSeconds(ms_line_data.retentionTime * 60);
370
371 // Should we create the peak list?
372
373 if(want_binary_data)
374 {
375 // qDebug() << "The binary data are wanted.";
376
377 MassSpectrum mass_spectrum;
378 bool ok = false;
379
380 for(int iter = 0; iter < ms_line_data.peakList.size(); ++iter)
381 {
382 QString pair_string = ms_line_data.peakList.at(iter);
383
384 // qDebug() << "The pair string:" << pair_string;
385
386 QStringList mz_and_intensity_list = pair_string.split(" ", Qt::SkipEmptyParts);
387
388 double mz = mz_and_intensity_list.first().toDouble(&ok);
389 if(!ok)
390 {
391 file.close();
392
393 throw(PappsoException(QString("%1-%2 Failed to parse line while reading file %3 "
394 "in BafAsciiMsRunReader, for MS run %4:\n")
395 .arg(__FILE__)
396 .arg(__LINE__)
397 .arg(mcsp_msRunId->getFileName())
398 .arg(mcsp_msRunId.get()->toString())));
399 }
400
401 // qDebug() << qSetRealNumberPrecision(10) << "m/z:" << mz;
402
403 double intensity = mz_and_intensity_list.last().toDouble(&ok);
404 if(!ok)
405 {
406 file.close();
407
408 throw(PappsoException(QString("%1-%2 Failed to parse line while reading file %3 "
409 "in BafAsciiMsRunReader, for MS run %4:\n")
410 .arg(__FILE__)
411 .arg(__LINE__)
412 .arg(mcsp_msRunId->getFileName())
413 .arg(mcsp_msRunId.get()->toString())));
414 }
415
416 // qDebug() << qSetRealNumberPrecision(10)
417 // << "intensity:" << intensity;
418
419 // qDebug() << "Emplacing back with:" << mz << "-" << intensity;
420
421 mass_spectrum.emplace_back(mz, intensity);
422 }
423
424 MassSpectrumSPtr spectrum_sp = mass_spectrum.makeMassSpectrumSPtr();
425 qualified_mass_spectrum.setMassSpectrumSPtr(spectrum_sp);
426 }
427 else
428 qualified_mass_spectrum.setMassSpectrumSPtr(nullptr);
429
430 // qDebug() << "qualified mass spectrum has size:"
431 // << qualified_mass_spectrum.getMassSpectrumSPtr()->size();
432
433 break;
434 }
435 // End of
436 // while(!file.atEnd())
437
438 file.close();
439
440 return qualified_mass_spectrum;
441}
442
443
445BafAsciiMsRunReader::qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data) const
446{
447 // qDebug();
448
449 QualifiedMassSpectrum qualified_mass_spectrum =
450 qualifiedMassSpectrumFromBafAsciiMSDataFile(spectrum_index, want_binary_data);
451
452 // qDebug() << "qualified mass spectrum has size:"
453 // << qualified_mass_spectrum.getMassSpectrumSPtr()->size();
454
455 return qualified_mass_spectrum;
456}
457
458
459void
464
465
466void
468 unsigned int ms_level)
469{
470 qDebug();
471
472 // Each line holds the data of one mass spectrum. There are other
473 // metadata at the beginning of the line.
474
475 // Does the handler consuming the mass spectra read from file want these
476 // mass spectra to hold the binary data arrays (mz/i vectors)?
477
478 const bool want_binary_data = handler.needPeakList();
479
480 QString file_name = mcsp_msRunId->getFileName();
481
482 QFile file(file_name);
483
484 if(!file.open(QFile::ReadOnly | QFile::Text))
485 {
486 throw(PappsoException(QString("%1-%2 Error reading file %3 in "
487 "BafAsciiMsRunReader, for MS run %4:\n")
488 .arg(__FILE__)
489 .arg(__LINE__)
490 .arg(mcsp_msRunId->getFileName())
491 .arg(mcsp_msRunId.get()->toString())));
492 }
493
494 // The format of the file, for MS1 data only is the following:
495 // <rt time in min>,+,ESI,ms1,-,profile,<m/z range start>-<m/z range
496 // end>,512704,<m/z> <int>,<m/z> <int>,.. One such line per retention time
497 // value.
498
499 QString line_regexp_pattern = craftLineParserRegExpPattern();
500 QRegularExpression line_regexp = craftLineParserRegExp(line_regexp_pattern);
501
502 if(!line_regexp.isValid())
503 {
504 throw(PappsoException(
505 QString("%1-%2 Failed to craft the regular expresssion while reading file %3 "
506 "in BafAsciiMsRunReader, for MS run %4:\n")
507 .arg(__FILE__)
508 .arg(__LINE__)
509 .arg(mcsp_msRunId->getFileName())
510 .arg(mcsp_msRunId.get()->toString())));
511 }
512
513 MassSpectrumLineData ms_line_data;
514 std::size_t mass_spectrum_index = 0;
515
516 while(!file.atEnd())
517 {
518 // qDebug() << "Iterating at line index:" << mass_spectrum_index;
519
520 // If the user of this reader instance wants to stop reading the
521 // spectra, then break this loop.
522 if(handler.shouldStop())
523 {
524 qDebug() << "The operation was cancelled. Breaking the loop.";
525 break;
526 }
527
528 QString line = file.readLine().trimmed();
529
530 if(!parseMassSpectrumLine(line, ms_line_data, line_regexp))
531 {
532 file.close();
533
534 throw(PappsoException(QString("%1-%2 Failed to parse line whilereading file %3 "
535 "in BafAsciiMsRunReader, for MS run %4:\n")
536 .arg(__FILE__)
537 .arg(__LINE__)
538 .arg(mcsp_msRunId->getFileName())
539 .arg(mcsp_msRunId.get()->toString())));
540 }
541
542 // qDebug() << "The size of the peaks string list:"
543 // << ms_line_data.peakList.size();
544
545 // At this point we have all the data inside the ms_line_data structure.
546 // If the user wants the binary data, that is, the mass spectrometric
547 // data, we need to prepare these.
548
549 MassSpectrumId mass_spectrum_id(mcsp_msRunId, mass_spectrum_index);
550
551 QualifiedMassSpectrum qualified_mass_spectrum(mass_spectrum_id);
552
553 qualified_mass_spectrum.setMsLevel(ms_line_data.msLevel);
554 qualified_mass_spectrum.setRtInSeconds(ms_line_data.retentionTime * 60);
555
556 // Should we create the peak list?
557
558 if(want_binary_data)
559 {
560 // qDebug() << "The binary data are wanted.";
561
562 MassSpectrum mass_spectrum;
563 bool ok = false;
564
565 for(int iter = 0; iter < ms_line_data.peakList.size(); ++iter)
566 {
567 QString pair_string = ms_line_data.peakList.at(iter);
568
569 // qDebug() << "The pair string:" << pair_string;
570
571 QStringList mz_and_intensity_list = pair_string.split(" ", Qt::SkipEmptyParts);
572
573 double mz = mz_and_intensity_list.first().toDouble(&ok);
574 if(!ok)
575 {
576 file.close();
577
578 throw(PappsoException(QString("%1-%2 Failed to parse line while reading file %3 "
579 "in BafAsciiMsRunReader, for MS run %4:\n")
580 .arg(__FILE__)
581 .arg(__LINE__)
582 .arg(mcsp_msRunId->getFileName())
583 .arg(mcsp_msRunId.get()->toString())));
584 }
585
586 // qDebug() << qSetRealNumberPrecision(10) << "m/z:" << mz;
587
588 double intensity = mz_and_intensity_list.last().toDouble(&ok);
589 if(!ok)
590 {
591 file.close();
592
593 throw(PappsoException(QString("%1-%2 Failed to parse line while reading file %3 "
594 "in BafAsciiMsRunReader, for MS run %4:\n")
595 .arg(__FILE__)
596 .arg(__LINE__)
597 .arg(mcsp_msRunId->getFileName())
598 .arg(mcsp_msRunId.get()->toString())));
599 }
600
601 // qDebug() << qSetRealNumberPrecision(10)
602 // << "intensity:" << intensity;
603
604 // qDebug() << "Emplacing back with:" << mz << "-" << intensity;
605
606 mass_spectrum.emplace_back(mz, intensity);
607 }
608
609 MassSpectrumSPtr spectrum_sp = mass_spectrum.makeMassSpectrumSPtr();
610 qualified_mass_spectrum.setMassSpectrumSPtr(spectrum_sp);
611 }
612 else
613 qualified_mass_spectrum.setMassSpectrumSPtr(nullptr);
614
615 // qDebug() << "qualified mass spectrum has size:"
616 // << qualified_mass_spectrum.getMassSpectrumSPtr()->size();
617
618 // The handler will receive the index of the mass spectrum in the
619 // current run via the mass spectrum id member datum.
620 // Only hand over the mass spectrum to the handler if the
621 // requested ms_level matches: if ms_level is 0, then any
622 // mass spectrum of any msLevel will be ok. If ms_level is not 0,
623 // then we only hand over the mass spectrum if its msLevel is
624 // exactly equal to ms_level.
625 if(ms_level == 0 || qualified_mass_spectrum.getMsLevel() == ms_level)
626 {
627 handler.setQualifiedMassSpectrum(qualified_mass_spectrum);
628 }
629
630 // This is and index of the spectrum in the file, not a count
631 // of the mass spectra actually handed over to the handler.
632 ++mass_spectrum_index;
633 }
634 // End of
635 // while(!file.atEnd())
636
637 file.close();
638
639 qDebug() << "Loading ended";
640 handler.loadingEnded();
641}
642
643void
646{
647 return readSpectrumCollection(handler);
648}
649
650std::size_t
655
656bool
658{
659 return true;
660}
661
662bool
664{
665 return true;
666}
667
669BafAsciiMsRunReader::newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index [[maybe_unused]],
670 pappso::PrecisionPtr precision
671 [[maybe_unused]]) const
672{
674 QObject::tr("Not implemented %1 %2 %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
675}
676
679 const pappso::QualifiedMassSpectrum &mass_spectrum [[maybe_unused]],
680 pappso::PrecisionPtr precision [[maybe_unused]]) const
681{
683 QObject::tr("Not implemented %1 %2 %3").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
684}
685
686std::size_t
688 [[maybe_unused]])
689{
691 QObject::tr("%1 %2 %3 not implemented").arg(__FILE__).arg(__FUNCTION__).arg(__LINE__));
692}
693
694} // namespace pappso
QualifiedMassSpectrum qualifiedMassSpectrumFromBafAsciiMSDataFile(std::size_t spectrum_index, bool want_binary_data) const
QRegularExpression craftLineParserRegExp(QString &pattern) const
virtual void readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler, unsigned int ms_level) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler by Ms Levels
BafAsciiMsRunReader(MsRunIdCstSPtr &msrun_id_csp)
virtual bool acquireDevice() override
acquire data back end device
virtual std::size_t spectrumStringIdentifier2SpectrumIndex(const QString &spectrum_identifier) override
if possible, get the spectrum index given a string identifier throw a not found exception if spectrum...
virtual pappso::XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(const pappso::QualifiedMassSpectrum &mass_spectrum, pappso::PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum
virtual bool accept(const QString &file_name) const override
tells if the reader is able to handle this file must be implemented by private MS run reader,...
virtual void readSpectrumCollection2(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data=true) const override
get a QualifiedMassSpectrum class given its scan number
virtual void readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index, pappso::PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum index
virtual MassSpectrumSPtr massSpectrumSPtr(std::size_t spectrum_index) override
get a MassSpectrumSPtr class given its spectrum index
virtual bool releaseDevice() override
release data back end device if a the data back end is released, the developper has to use acquireDev...
virtual MassSpectrumCstSPtr massSpectrumCstSPtr(std::size_t spectrum_index) override
virtual void initialize() override
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file
bool parseMassSpectrumLine(QString &line, MassSpectrumLineData &ms_line_data, QRegularExpression &line_regexp) const
excetion to use when an item type is not recognized
Class to represent a mass spectrum.
MassSpectrumSPtr makeMassSpectrumSPtr() const
MsRunIdCstSPtr mcsp_msRunId
MsRunReader(const MsRunIdCstSPtr &ms_run_id)
Class representing a fully specified mass spectrum.
uint getMsLevel() const
Get the mass spectrum level.
MassSpectrumCstSPtr getMassSpectrumCstSPtr() const
Get the MassSpectrumCstSPtr.
void setMassSpectrumId(const MassSpectrumId &iD)
Set the MassSpectrumId.
void setMsLevel(uint ms_level)
Set the mass spectrum level.
MassSpectrumSPtr getMassSpectrumSPtr() const
Get the MassSpectrumSPtr.
void setMassSpectrumSPtr(MassSpectrumSPtr massSpectrum)
Set the MassSpectrumSPtr.
void setRtInSeconds(pappso_double rt)
Set the retention time in seconds.
interface to collect spectrums from the MsRunReader class
virtual bool needPeakList() const =0
tells if we need the peak list (if we want the binary data) for each spectrum
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum)=0
static QRegularExpression unsignedDoubleNumberNoExponentialRegExp
Definition utils.h:54
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
const PrecisionBase * PrecisionPtr
Definition precision.h:122
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44
std::pair< double, double > mz_range