Loading...
Searching...
No Matches
peptideobservation.h
Go to the documentation of this file.
/**
* \file pappsomspp/masschroq/peptideobservation.h
* \date 24/09/2024
* \author Olivier Langella
* \brief peptide model in masschroqlite
*/
/*******************************************************************************
* Copyright (c) 2024 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 "precursor.h"
#include "peptide.h"
#include <cstdint>
namespace pappso::masschroq
{
class PeptideObservation;
typedef std::shared_ptr<PeptideObservation> PeptideObservationSp;
/**
* @todo group together one Peptide and observations on this peptide
*/
class PeptideObservation
{
public:
/**
* Default constructor
*/
PeptideObservation(PeptideSp peptide);
/**
* Copy constructor
*
* @param other TODO
*/
PeptideObservation(const PeptideObservation &other);
/**
* Destructor
*/
virtual ~PeptideObservation();
const PeptideSp &getPeptideSp() const;
struct Observation
{
/// The MS scan_number(mzxml) it has been observed in
std::size_t m_scanNumber = 0;
/// The charge it has been observed in
std::uint8_t m_charge = 0;
PrecursorSp msp_precursor = nullptr;
bool m_isSpectrumIndex = true;
PeptideLabel *p_label = nullptr;
};
void addObservation(const PeptideObservation::Observation &observation);
std::vector<std::uint8_t> getObservedChargeStates() const;
double getBestRtOverallChargeStates() const;
std::vector<double> getObservedRetentionTimesOverallChargeStates() const;
pappso::XicCoordSPtr getBestXicCoordSPtrForCharge(std::uint8_t charge) const;
pappso::XicCoordSPtr getBestXicCoord() const;
const std::vector<Observation> &getObservationList() const;
private:
PeptideSp msp_peptide;
std::vector<Observation> m_observationList;
};
} // namespace pappso::masschroq
pappso::masschroq::PeptideLabel
Definition peptidelabel.h:40
pappso::masschroq::PeptideObservation
Definition peptideobservation.h:48
pappso::masschroq::PeptideObservation::getObservationList
const std::vector< Observation > & getObservationList() const
Definition peptideobservation.cpp:150
pappso::masschroq::PeptideObservation::getBestXicCoord
pappso::XicCoordSPtr getBestXicCoord() const
Definition peptideobservation.cpp:117
pappso::masschroq::PeptideObservation::~PeptideObservation
virtual ~PeptideObservation()
Definition peptideobservation.cpp:46
pappso::masschroq::PeptideObservation::getObservedRetentionTimesOverallChargeStates
std::vector< double > getObservedRetentionTimesOverallChargeStates() const
Definition peptideobservation.cpp:138
pappso::masschroq::PeptideObservation::addObservation
void addObservation(const PeptideObservation::Observation &observation)
Definition peptideobservation.cpp:51
pappso::masschroq::PeptideObservation::getObservedChargeStates
std::vector< std::uint8_t > getObservedChargeStates() const
Definition peptideobservation.cpp:57
pappso::masschroq::PeptideObservation::m_observationList
std::vector< Observation > m_observationList
Definition peptideobservation.h:99
pappso::masschroq::PeptideObservation::getBestRtOverallChargeStates
double getBestRtOverallChargeStates() const
Definition peptideobservation.cpp:77
pappso::masschroq::PeptideObservation::getPeptideSp
const PeptideSp & getPeptideSp() const
Definition peptideobservation.cpp:71
pappso::masschroq::PeptideObservation::getBestXicCoordSPtrForCharge
pappso::XicCoordSPtr getBestXicCoordSPtrForCharge(std::uint8_t charge) const
Definition peptideobservation.cpp:94
pappso::masschroq::PeptideObservation::PeptideObservation
PeptideObservation(PeptideSp peptide)
Definition peptideobservation.cpp:34
pappso::masschroq::PeptideObservation::msp_peptide
PeptideSp msp_peptide
Definition peptideobservation.h:98
peptide.h
precursor.h
pappso::masschroq
Definition alignmentmethod.h:38
pappso::masschroq::PeptideSp
std::shared_ptr< Peptide > PeptideSp
Definition peptide.h:46
pappso::masschroq::PrecursorSp
std::shared_ptr< Precursor > PrecursorSp
Definition precursor.h:39
pappso::masschroq::PeptideObservationSp
std::shared_ptr< PeptideObservation > PeptideObservationSp
Definition peptidemeasurements.h:45
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44
pappso::masschroq::PeptideObservation::Observation
Definition peptideobservation.h:70
pappso::masschroq::PeptideObservation::Observation::m_charge
std::uint8_t m_charge
The charge it has been observed in.
Definition peptideobservation.h:74
pappso::masschroq::PeptideObservation::Observation::m_scanNumber
std::size_t m_scanNumber
The MS scan_number(mzxml) it has been observed in.
Definition peptideobservation.h:72
pappso::masschroq::PeptideObservation::Observation::msp_precursor
PrecursorSp msp_precursor
Definition peptideobservation.h:76
pappso::masschroq::PeptideObservation::Observation::m_isSpectrumIndex
bool m_isSpectrumIndex
Definition peptideobservation.h:78
pappso::masschroq::PeptideObservation::Observation::p_label
PeptideLabel * p_label
Definition peptideobservation.h:80