Loading...
Searching...
No Matches
peptidemeasurementsbase.h
Go to the documentation of this file.
/**
* \file pappsomspp/masschroq/peptidemeasurements.h
* \date 24/01/2025
* \author Olivier Langella
* \brief peptide measurement model base in masschroqlite
*/
/*******************************************************************************
* Copyright (c) 2025 Olivier Langella
*<Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of MassChroQ.
*
* MassChroQ 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.
*
* MassChroQ 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 MassChroQ. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include "types.h"
#include "pappsomspp/core/msrun/xiccoord/xiccoord.h"
#include "pappsomspp/core/processing/detection/tracepeak.h"
#include "../peptide/peptidenaturalisotopelist.h"
#include "peptidebase.h"
#include "quantificationmethod.h"
namespace pappso::masschroq
{
class PeptideLabel;
class Peptide;
/**
* @todo write docs
*/
class PeptideMeasurementsBase
{
public:
/**
* Default constructor
*/
PeptideMeasurementsBase();
PeptideMeasurementsBase(const PeptideMeasurementsBase &other);
/**
* Destructor
*/
virtual ~PeptideMeasurementsBase();
/** the same peptide can be measured multiple times :
* - for each charge state
* - for each isotopologue
* One measurement contains :
* - a transient chromatogram extraction
* - extracted XIC and coordinates
* - peak quality : how the detected peak in the chromatogram was chosen
*
*/
struct Measurement
{
std::uint8_t m_charge;
pappso::XicCoordSPtr msp_xicCoord;
PeakQualityCategory m_peakQualityCategory = PeakQualityCategory::nomatch;
const PeptideLabel *mp_peptideLabel;
pappso::TracePeakCstSPtr m_tracePeakSp;
pappso::PeptideNaturalIsotopeAverageSp m_peptideNaturalIsotopeAverageSp;
};
virtual const std::vector<Measurement> &getMeasurementList() const;
virtual void pushBackXicCoordList(std::vector<pappso::XicCoordSPtr> &xic_coord_list) const final;
virtual void detectQuantifyPeaks(const QuantificationMethodSp &quantification_method) = 0;
virtual void flushXics() final;
/** @brief clear the measurement vector
*/
virtual void clear() final;
protected:
virtual void prepareMeasurementsForPeptide(Peptide &the_peptide,
const QuantificationMethodSp &quantification_method,
const pappso::XicCoordSPtr &best_xic_coord,
std::uint8_t charge,
double best_rt) final;
virtual void
generateMeasurementsForIsotopeList(PeptideBase &peptide_base,
const PeptideLabel *label_p,
const QuantificationMethodSp &quantification_method,
std::uint8_t charge,
double isotope_minimum_ratio,
const pappso::XicCoordSPtr &best_xic_coord,
double best_rt) final;
protected:
std::vector<Measurement> m_measurementList;
};
} // namespace pappso::masschroq
pappso::masschroq::PeptideBase
Definition peptidebase.h:40
pappso::masschroq::PeptideLabel
Definition peptidelabel.h:40
pappso::masschroq::PeptideMeasurementsBase::m_measurementList
std::vector< Measurement > m_measurementList
Definition peptidemeasurementsbase.h:117
pappso::masschroq::PeptideMeasurementsBase::getMeasurementList
virtual const std::vector< Measurement > & getMeasurementList() const
Definition peptidemeasurementsbase.cpp:50
pappso::masschroq::PeptideMeasurementsBase::detectQuantifyPeaks
virtual void detectQuantifyPeaks(const QuantificationMethodSp &quantification_method)=0
pappso::masschroq::PeptideMeasurementsBase::pushBackXicCoordList
virtual void pushBackXicCoordList(std::vector< pappso::XicCoordSPtr > &xic_coord_list) const final
Definition peptidemeasurementsbase.cpp:175
pappso::masschroq::PeptideMeasurementsBase::generateMeasurementsForIsotopeList
virtual void generateMeasurementsForIsotopeList(PeptideBase &peptide_base, const PeptideLabel *label_p, const QuantificationMethodSp &quantification_method, std::uint8_t charge, double isotope_minimum_ratio, const pappso::XicCoordSPtr &best_xic_coord, double best_rt) final
Definition peptidemeasurementsbase.cpp:56
pappso::masschroq::PeptideMeasurementsBase::PeptideMeasurementsBase
PeptideMeasurementsBase()
Definition peptidemeasurementsbase.cpp:34
pappso::masschroq::PeptideMeasurementsBase::clear
virtual void clear() final
clear the measurement vector
Definition peptidemeasurementsbase.cpp:199
pappso::masschroq::PeptideMeasurementsBase::flushXics
virtual void flushXics() final
Definition peptidemeasurementsbase.cpp:189
pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide
virtual void prepareMeasurementsForPeptide(Peptide &the_peptide, const QuantificationMethodSp &quantification_method, const pappso::XicCoordSPtr &best_xic_coord, std::uint8_t charge, double best_rt) final
Definition peptidemeasurementsbase.cpp:89
pappso::masschroq::PeptideMeasurementsBase::~PeptideMeasurementsBase
virtual ~PeptideMeasurementsBase()
Definition peptidemeasurementsbase.cpp:38
pappso::masschroq::Peptide
Definition peptide.h:58
types.h
pappso::masschroq
Definition alignmentmethod.h:38
pappso::masschroq::QuantificationMethodSp
std::shared_ptr< QuantificationMethod > QuantificationMethodSp
Definition quantificationmethod.h:46
pappso::masschroq::PeakQualityCategory
PeakQualityCategory
Definition types.h:42
pappso::masschroq::PeakQualityCategory::nomatch
@ nomatch
Definition types.h:43
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::PeptideNaturalIsotopeAverageSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp
Definition peptidenaturalisotopeaverage.h:40
pappso::TracePeakCstSPtr
std::shared_ptr< const TracePeak > TracePeakCstSPtr
Definition tracepeak.h:35
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44
peptidebase.h
peptidenaturalisotopelist.h
quantificationmethod.h
pappso::masschroq::PeptideMeasurementsBase::Measurement
Definition peptidemeasurementsbase.h:74
pappso::masschroq::PeptideMeasurementsBase::Measurement::m_charge
std::uint8_t m_charge
Definition peptidemeasurementsbase.h:75
pappso::masschroq::PeptideMeasurementsBase::Measurement::m_tracePeakSp
pappso::TracePeakCstSPtr m_tracePeakSp
Definition peptidemeasurementsbase.h:79
pappso::masschroq::PeptideMeasurementsBase::Measurement::m_peptideNaturalIsotopeAverageSp
pappso::PeptideNaturalIsotopeAverageSp m_peptideNaturalIsotopeAverageSp
Definition peptidemeasurementsbase.h:80
pappso::masschroq::PeptideMeasurementsBase::Measurement::msp_xicCoord
pappso::XicCoordSPtr msp_xicCoord
Definition peptidemeasurementsbase.h:76
pappso::masschroq::PeptideMeasurementsBase::Measurement::m_peakQualityCategory
PeakQualityCategory m_peakQualityCategory
Definition peptidemeasurementsbase.h:77
pappso::masschroq::PeptideMeasurementsBase::Measurement::mp_peptideLabel
const PeptideLabel * mp_peptideLabel
Definition peptidemeasurementsbase.h:78
tracepeak.h
xiccoord.h