Loading...
Searching...
No Matches
bafasciimsrunreader.h
Go to the documentation of this file.
#pragma once
#include "../msfile/msfileaccessor.h"
namespace pappso
{
struct PMSPP_LIB_DECL MassSpectrumLineData
{
double retentionTime; // minutes
QString ionizationMode; // + or -
QString ionSourceType; // MALDI or ESI
int msLevel;
QString dash;
QString peakShapeType; // profile or line
std::pair<double,double> mz_range;
std::size_t peakCount;
QStringList peakList;
};
class PMSPP_LIB_DECL BafAsciiMsRunReader : public MsRunReader
{
friend class MsFileAccessor;
public:
BafAsciiMsRunReader(MsRunIdCstSPtr &msrun_id_csp);
virtual ~BafAsciiMsRunReader();
virtual MassSpectrumSPtr
massSpectrumSPtr(std::size_t spectrum_index) override;
virtual MassSpectrumCstSPtr
massSpectrumCstSPtr(std::size_t spectrum_index) override;
virtual QualifiedMassSpectrum
qualifiedMassSpectrum(std::size_t spectrum_index,
bool want_binary_data = true) const override;
virtual void
readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override;
virtual void
readSpectrumCollection2(const MsRunReadConfig &config,
SpectrumCollectionHandlerInterface &handler) override;
virtual pappso::XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(
std::size_t spectrum_index, pappso::PrecisionPtr precision) const override;
virtual pappso::XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(
const pappso::QualifiedMassSpectrum &mass_spectrum,
pappso::PrecisionPtr precision) const override;
virtual void
readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler,
unsigned int ms_level) override;
virtual std::size_t spectrumListSize() const override;
virtual bool releaseDevice() override;
virtual bool acquireDevice() override;
protected:
QString m_fileName;
// Set when the accept function is called.
mutable std::size_t m_spectrumCount = 0;
QString craftLineParserRegExpPattern() const;
QRegularExpression craftLineParserRegExp(QString &pattern) const;
bool parseMassSpectrumLine(QString &line, MassSpectrumLineData &ms_line_data,
QRegularExpression &line_regexp) const;
virtual void initialize() override;
virtual bool accept(const QString &file_name) const override;
QualifiedMassSpectrum
qualifiedMassSpectrumFromBafAsciiMSDataFile(std::size_t spectrum_index,
bool want_binary_data) const;
};
} // namespace pappso
CardanoResultCase::line
@ line
pappso::BafAsciiMsRunReader
Definition bafasciimsrunreader.h:24
pappso::BafAsciiMsRunReader::m_fileName
QString m_fileName
Definition bafasciimsrunreader.h:67
pappso::MsFileAccessor
Definition msfileaccessor.h:28
pappso::MsRunReadConfig
Definition msrunreadconfig.h:62
pappso::MsRunReader
base class to read MSrun the only way to build a MsRunReader object is to use the MsRunReaderFactory
Definition msrunreader.h:63
pappso::PrecisionBase
Definition precision.h:44
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition qualifiedmassspectrum.h:99
pappso::SpectrumCollectionHandlerInterface
interface to collect spectrums from the MsRunReader class
Definition spectrumcollectionhandlerinterface.h:56
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::MsRunIdCstSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
pappso::MassSpectrumCstSPtr
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
Definition massspectrum.h:57
pappso::MassSpectrumSPtr
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
Definition massspectrum.h:56
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:43
pappso::MassSpectrumLineData
Definition bafasciimsrunreader.h:11
pappso::MassSpectrumLineData::peakShapeType
QString peakShapeType
Definition bafasciimsrunreader.h:17
pappso::MassSpectrumLineData::dash
QString dash
Definition bafasciimsrunreader.h:16
pappso::MassSpectrumLineData::msLevel
int msLevel
Definition bafasciimsrunreader.h:15
pappso::MassSpectrumLineData::ionizationMode
QString ionizationMode
Definition bafasciimsrunreader.h:13
pappso::MassSpectrumLineData::ionSourceType
QString ionSourceType
Definition bafasciimsrunreader.h:14
pappso::MassSpectrumLineData::peakList
QStringList peakList
Definition bafasciimsrunreader.h:20
pappso::MassSpectrumLineData::mz_range
std::pair< double, double > mz_range
Definition bafasciimsrunreader.h:18
pappso::MassSpectrumLineData::retentionTime
double retentionTime
Definition bafasciimsrunreader.h:12
pappso::MassSpectrumLineData::peakCount
std::size_t peakCount
Definition bafasciimsrunreader.h:19