Loading...
Searching...
No Matches
msrunxicextractor.h
Go to the documentation of this file.
/**
* \file pappsomspp/xicextractor/private/msrunxicextractorpwiz.h
* \date 07/05/2018
* \author Olivier Langella
* \brief simple proteowizard based XIC extractor
*/
/*******************************************************************************
* Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.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/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include "../msrunxicextractorinterface.h"
class MsRunXicExtractorFactory;
namespace pappso
{
class MsRunXicExtractor : public MsRunXicExtractorInterface
{
friend MsRunXicExtractorFactory;
public:
MsRunXicExtractor(const MsRunXicExtractor &other);
virtual ~MsRunXicExtractor();
protected:
MsRunXicExtractor(MsRunReaderSPtr &msrun_reader);
virtual void protectedExtractXicCoordSPtrList(
UiMonitorInterface &monitor,
std::vector<XicCoordSPtr>::iterator it_xic_coord_list_begin,
std::vector<XicCoordSPtr>::iterator it_xic_coord_list_end) override;
protected:
struct MsRunXicExtractorPoints
{
std::size_t spectrum_index;
double rt;
};
/** @brief class to read retention time points of MsRun
*/
class MsRunXicExtractorReadPoints : public SpectrumCollectionHandlerInterface
{
private:
std::vector<MsRunXicExtractorPoints> &m_msrun_points;
public:
MsRunXicExtractorReadPoints(std::vector<MsRunXicExtractorPoints> &msrun_points)
: m_msrun_points(msrun_points) {};
virtual void
setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum) override
{
if(spectrum.getMsLevel() == 1)
{
qDebug() << spectrum.getMassSpectrumId().getSpectrumIndex();
m_msrun_points.push_back(
{spectrum.getMassSpectrumId().getSpectrumIndex(), spectrum.getRtInSeconds()});
}
}
virtual bool
needPeakList() const override
{
return false;
}
virtual void
loadingEnded() override
{
}
};
protected:
std::vector<MsRunXicExtractorPoints> m_msrun_points;
private:
void extractOneXicCoord(XicCoord &xic_coord);
};
} // namespace pappso
pappso::MassSpectrumId::getSpectrumIndex
std::size_t getSpectrumIndex() const
Definition massspectrumid.cpp:113
pappso::MsRunXicExtractorInterface::MsRunXicExtractorInterface
MsRunXicExtractorInterface(MsRunReaderSPtr &msrun_reader)
constructor is private, use the MsRunXicExtractorFactory
Definition msrunxicextractorinterface.cpp:40
pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints::needPeakList
virtual bool needPeakList() const override
tells if we need the peak list (if we want the binary data) for each spectrum
Definition msrunxicextractor.h:87
pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints::loadingEnded
virtual void loadingEnded() override
Definition msrunxicextractor.h:92
pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints::MsRunXicExtractorReadPoints
MsRunXicExtractorReadPoints(std::vector< MsRunXicExtractorPoints > &msrun_points)
Definition msrunxicextractor.h:73
pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints::setQualifiedMassSpectrum
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum) override
Definition msrunxicextractor.h:77
pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints::m_msrun_points
std::vector< MsRunXicExtractorPoints > & m_msrun_points
Definition msrunxicextractor.h:70
pappso::MsRunXicExtractor::MsRunXicExtractor
MsRunXicExtractor(const MsRunXicExtractor &other)
Definition msrunxicextractor.cpp:73
pappso::MsRunXicExtractor::extractOneXicCoord
void extractOneXicCoord(XicCoord &xic_coord)
Definition msrunxicextractor.cpp:106
pappso::MsRunXicExtractor::m_msrun_points
std::vector< MsRunXicExtractorPoints > m_msrun_points
Definition msrunxicextractor.h:99
pappso::MsRunXicExtractor::MsRunXicExtractorFactory
friend MsRunXicExtractorFactory
Definition msrunxicextractor.h:43
pappso::MsRunXicExtractor::~MsRunXicExtractor
virtual ~MsRunXicExtractor()
Definition msrunxicextractor.cpp:68
pappso::MsRunXicExtractor::protectedExtractXicCoordSPtrList
virtual void protectedExtractXicCoordSPtrList(UiMonitorInterface &monitor, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_begin, std::vector< XicCoordSPtr >::iterator it_xic_coord_list_end) override
Definition msrunxicextractor.cpp:81
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition qualifiedmassspectrum.h:99
pappso::QualifiedMassSpectrum::getMsLevel
uint getMsLevel() const
Get the mass spectrum level.
Definition qualifiedmassspectrum.cpp:189
pappso::QualifiedMassSpectrum::getMassSpectrumId
const MassSpectrumId & getMassSpectrumId() const
Get the MassSpectrumId.
Definition qualifiedmassspectrum.cpp:154
pappso::QualifiedMassSpectrum::getRtInSeconds
pappso_double getRtInSeconds() const
Get the retention time in seconds.
Definition qualifiedmassspectrum.cpp:205
pappso::SpectrumCollectionHandlerInterface
interface to collect spectrums from the MsRunReader class
Definition spectrumcollectionhandlerinterface.h:52
pappso::UiMonitorInterface
Definition uimonitorinterface.h:50
msrunxicextractorinterface.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::MsRunReaderSPtr
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition msrunreader.h:57
pappso::MsRunXicExtractor::MsRunXicExtractorPoints
Definition msrunxicextractor.h:60
pappso::MsRunXicExtractor::MsRunXicExtractorPoints::rt
double rt
Definition msrunxicextractor.h:62
pappso::MsRunXicExtractor::MsRunXicExtractorPoints::spectrum_index
std::size_t spectrum_index
Definition msrunxicextractor.h:61
pappso::XicCoord
coordinates of the XIC to extract and the resulting XIC after extraction
Definition xiccoord.h:68