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