Loading...
Searching...
No Matches
timsmsrunreaderdia.h
Go to the documentation of this file.
/**
* \file pappsomspp/msrun/private/timsmsrunreaderdia.h
* \date 09/07/2024
* \author Olivier Langella
* \brief MSrun file reader for native Bruker TimsTOF specialized for DIA
* purpose
*/
/*******************************************************************************
* Copyright (c) 2024 Olivier Langella
*<Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include "../../types.h"
#include "pappsomspp/core/msfile/msfileaccessor.h"
#include "../../vendors/tims/timsdata.h"
#include "../../vendors/tims/timsdiaslices.h"
#include "pappsomspp/export-import-config.h"
#include "pappsomspp/core/msrun/private/timsmsrunreaderbase.h"
namespace pappso
{
class PMSPP_LIB_DECL TimsMsRunReaderDia : public TimsMsRunReaderBase
{
friend class MsFileAccessor;
public:
/**
* Default constructor
*/
TimsMsRunReaderDia(MsRunIdCstSPtr &msrun_id_csp);
TimsMsRunReaderDia(const TimsMsRunReaderBase &msrun_reader_base);
/**
* Destructor
*/
virtual ~TimsMsRunReaderDia();
/** @brief get a MassSpectrumSPtr class given its spectrum index
*/
virtual MassSpectrumSPtr
massSpectrumSPtr(std::size_t spectrum_index) override;
virtual MassSpectrumCstSPtr
massSpectrumCstSPtr(std::size_t spectrum_index) override;
/** @brief get a QualifiedMassSpectrum class given its scan number
*/
virtual QualifiedMassSpectrum
qualifiedMassSpectrum(std::size_t spectrum_index,
bool want_binary_data = true) const override;
/** @brief get a xic coordinate object from a given spectrum index
*/
virtual XicCoordSPtr
newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index,
PrecisionPtr precision) const override;
/** @brief get a xic coordinate object from a given spectrum
*/
virtual XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(
const QualifiedMassSpectrum &mass_spectrum,
PrecisionPtr precision) const override;
/** @brief get the totat number of spectrum conained in the MSrun data file
*/
virtual std::size_t spectrumListSize() const override;
/** @brief function to visit an MsRunReader and get each Spectrum in a
* spectrum collection handler
*/
virtual void
readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override;
virtual void
readSpectrumCollection2(const MsRunReadConfig &config,
SpectrumCollectionHandlerInterface &handler) override;
/** @brief function to visit an MsRunReader and get each Spectrum in a
* spectrum collection handler by Ms Levels
*/
virtual void
readSpectrumCollectionByMsLevel(SpectrumCollectionHandlerInterface &handler,
unsigned int ms_level) override;
virtual bool acquireDevice() override;
virtual std::size_t
spectrumStringIdentifier2SpectrumIndex(const QString &spectrum_identifier) override;
protected:
virtual void initialize() override;
private:
TimsDiaSlices *mp_timsDiaSlices = nullptr;
};
} // namespace pappso
pappso::MsRunReadConfig
Definition msrunreadconfig.h:62
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:52
pappso::TimsDiaSlices
Definition timsdiaslices.h:38
pappso::TimsMsRunReaderBase::TimsMsRunReaderBase
TimsMsRunReaderBase(MsRunIdCstSPtr &msrun_id_csp)
Definition timsmsrunreaderbase.cpp:38
pappso::TimsMsRunReaderDia::readSpectrumCollection
virtual void readSpectrumCollection(SpectrumCollectionHandlerInterface &handler) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
Definition timsmsrunreaderdia.cpp:116
pappso::TimsMsRunReaderDia::mp_timsDiaSlices
TimsDiaSlices * mp_timsDiaSlices
Definition timsmsrunreaderdia.h:119
pappso::TimsMsRunReaderDia::readSpectrumCollectionByMsLevel
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
Definition timsmsrunreaderdia.cpp:96
pappso::TimsMsRunReaderDia::massSpectrumSPtr
virtual MassSpectrumSPtr massSpectrumSPtr(std::size_t spectrum_index) override
get a MassSpectrumSPtr class given its spectrum index
Definition timsmsrunreaderdia.cpp:133
pappso::TimsMsRunReaderDia::MsFileAccessor
friend class MsFileAccessor
Definition timsmsrunreaderdia.h:46
pappso::TimsMsRunReaderDia::newXicCoordSPtrFromSpectrumIndex
virtual XicCoordSPtr newXicCoordSPtrFromSpectrumIndex(std::size_t spectrum_index, PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum index
Definition timsmsrunreaderdia.cpp:79
pappso::TimsMsRunReaderDia::initialize
virtual void initialize() override
Definition timsmsrunreaderdia.cpp:58
pappso::TimsMsRunReaderDia::spectrumStringIdentifier2SpectrumIndex
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...
Definition timsmsrunreaderdia.cpp:166
pappso::TimsMsRunReaderDia::newXicCoordSPtrFromQualifiedMassSpectrum
virtual XicCoordSPtr newXicCoordSPtrFromQualifiedMassSpectrum(const QualifiedMassSpectrum &mass_spectrum, PrecisionPtr precision) const override
get a xic coordinate object from a given spectrum
Definition timsmsrunreaderdia.cpp:88
pappso::TimsMsRunReaderDia::TimsMsRunReaderDia
TimsMsRunReaderDia(MsRunIdCstSPtr &msrun_id_csp)
Definition timsmsrunreaderdia.cpp:38
pappso::TimsMsRunReaderDia::qualifiedMassSpectrum
virtual QualifiedMassSpectrum qualifiedMassSpectrum(std::size_t spectrum_index, bool want_binary_data=true) const override
get a QualifiedMassSpectrum class given its scan number
Definition timsmsrunreaderdia.cpp:105
pappso::TimsMsRunReaderDia::massSpectrumCstSPtr
virtual MassSpectrumCstSPtr massSpectrumCstSPtr(std::size_t spectrum_index) override
Definition timsmsrunreaderdia.cpp:139
pappso::TimsMsRunReaderDia::spectrumListSize
virtual std::size_t spectrumListSize() const override
get the totat number of spectrum conained in the MSrun data file
Definition timsmsrunreaderdia.cpp:146
pappso::TimsMsRunReaderDia::acquireDevice
virtual bool acquireDevice() override
acquire data back end device
Definition timsmsrunreaderdia.cpp:153
pappso::TimsMsRunReaderDia::readSpectrumCollection2
virtual void readSpectrumCollection2(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler) override
function to visit an MsRunReader and get each Spectrum in a spectrum collection handler
Definition timsmsrunreaderdia.cpp:124
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
msfileaccessor.h
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:54
pappso::PrecisionPtr
const PrecisionBase * PrecisionPtr
Definition precision.h:122
pappso::MassSpectrumSPtr
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
Definition massspectrum.h:53
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44
timsdata.h
timsdiaslices.h
timsmsrunreaderbase.h
types.h