libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
msrunpeptidelist.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/masschroq/msrunpeptidelist.h
3 * \date 25/09/2024
4 * \author Olivier Langella
5 * \brief msrun model including fragmented peptides in masschroqlite
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2024 Olivier Langella
10 *<Olivier.Langella@universite-paris-saclay.fr>.
11 *
12 * This file is part of MassChroQ.
13 *
14 * MassChroQ is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * MassChroQ is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with MassChroQ. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29#pragma once
30
31
32#include "msrun.h"
33#include "peptidelabel.h"
34#include "peptideobservation.h"
35#include "peptidemeasurements.h"
37#include <cstdint>
38#include "alignmentmethod.h"
41
42namespace pappso::masschroq
43{
46
47typedef std::shared_ptr<MsRunPeptideList> MsRunPeptideListSp;
48
49/**
50 * group together an msrun, available peptide observations, and peptide
51 * measurements
52 */
54{
55 public:
56 /**
57 * Default constructor
58 */
60
61 /**
62 * Copy constructor
63 *
64 * @param other TODO
65 */
67
68 /**
69 * Destructor
70 */
71 virtual ~MsRunPeptideList();
72
74 PeptideLabel *p_label,
75 std::size_t spectrum_index,
76 std::uint8_t charge);
78 PeptideLabel *p_label,
79 std::size_t spectrum_index,
80 std::uint8_t charge);
81
82 void quantify(const MsRunGroup *msrun_group_p,
83 const QString &tmp_dir,
84 pappso::UiMonitorInterface &m_uiMonitor,
85 const QuantificationMethodSp &quantification_method);
86
87
88 void quantifyMatchBetweenRun(const MsRunGroup *msrun_group_p,
89 const std::vector<PeptideSp> &peptide_mbr_list,
90 const QString &tmp_dir,
91 pappso::UiMonitorInterface &m_uiMonitor,
92 const QuantificationMethodSp &quantification_method);
93
94
95 const MsRunSp &getMsRunSp() const;
96
97 /** flush (remove) transient chromatogram traces after peak detection to save
98 * space in memory
99 */
101
102 /** @brief clear all measurements MBR or not
103 * Clearing measurements also removes every chromatogram
104 */
105 void clearMeasurements();
106
107
108 /** @brief build a retention time vector with seamarks using MS2 best
109 * intensities
110 * @param alignment_method parameters to use for alignment
111 */
112 std::shared_ptr<pappso::MsRunRetentionTime<QString>> &
114
115 /** @brief collect peak retention times
116 * collect all quantified peptides retention times and convert it to the
117 * reference time to store it for each peptides
118 */
120 const pappso::MsRunRetentionTime<QString> *msrun_retention_time_reference_p) const;
121
122 /** @brief collect ms2 retention times
123 * collect all MS2 events retention times and convert it to the
124 * reference time to store it for each peptides
125 */
127 const pappso::MsRunRetentionTime<QString> *msrun_retention_time_reference_p) const;
128
130
132
133 const std::vector<PeptideMeasurementsSp> &getPeptideMeasurementsList() const;
134
135 const std::vector<MbrPeptideMeasurementsSp> &getMbrPeptideMeasurementsList() const;
136
137 private:
138 std::vector<pappso::XicCoordSPtr>
139 buildXicCoordList(const MsRunGroup *msrun_group_p,
140 const QuantificationMethodSp &quantification_method);
141
143 const QuantificationMethodSp &quantification_method);
144
145
147 const QuantificationMethodSp &quantification_method);
148
149 void addPeptideObservation2XicCoordList(const MsRunGroup *msrun_group_p,
150 const QuantificationMethodSp &quantification_method,
151 const PeptideObservationSp &peptide_events_sp,
152 std::vector<pappso::XicCoordSPtr> &xic_coord_list);
153
155 const QuantificationMethodSp &quantification_method,
156 const PeptideSp &peptide,
157 std::vector<pappso::XicCoordSPtr> &xic_coord_list);
158
159 private:
161
162 std::map<Peptide *, PeptideObservationSp> m_peptideObservationList;
163
164 std::vector<PeptideMeasurementsSp> m_peptideMeasurementsList;
165
166 std::shared_ptr<pappso::MsRunRetentionTime<QString>> msp_msRunRetentionTime = nullptr;
167
168
169 std::vector<MbrPeptideMeasurementsSp> m_mbrPeptideMeasurementsList;
170};
171} // namespace pappso::masschroq
std::vector< PeptideMeasurementsSp > m_peptideMeasurementsList
void addMbrPeptideMeasurementsSp2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideSp &peptide, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
void quantify(const MsRunGroup *msrun_group_p, const QString &tmp_dir, pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
void detectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
void quantifyMatchBetweenRun(const MsRunGroup *msrun_group_p, const std::vector< PeptideSp > &peptide_mbr_list, const QString &tmp_dir, pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
std::map< Peptide *, PeptideObservationSp > m_peptideObservationList
const std::vector< MbrPeptideMeasurementsSp > & getMbrPeptideMeasurementsList() const
std::shared_ptr< pappso::MsRunRetentionTime< QString > > msp_msRunRetentionTime
std::vector< MbrPeptideMeasurementsSp > m_mbrPeptideMeasurementsList
std::vector< pappso::XicCoordSPtr > buildXicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
void collectPeptideMs2RetentionTime(const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p) const
collect ms2 retention times collect all MS2 events retention times and convert it to the reference ti...
void addPeptideScanNumberObservation(PeptideSp peptide_sp, PeptideLabel *p_label, std::size_t spectrum_index, std::uint8_t charge)
std::shared_ptr< pappso::MsRunRetentionTime< QString > > & buildMsRunRetentionTimeSpOnPeptideObservations(const AlignmentMethodSp &alignment_method)
build a retention time vector with seamarks using MS2 best intensities
void addPeptideObservation2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideObservationSp &peptide_events_sp, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
pappso::MsRunRetentionTime< QString > * getMsRunRetentionTimePtr() const
void addPeptideSpectrumIndexObservation(PeptideSp peptide_sp, PeptideLabel *p_label, std::size_t spectrum_index, std::uint8_t charge)
void mbrDetectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
void clearMeasurements()
clear all measurements MBR or not Clearing measurements also removes every chromatogram
const std::vector< PeptideMeasurementsSp > & getPeptideMeasurementsList() const
const pappso::MsRunRetentionTime< QString > * getMsRunRetentionTimeConstPtr() const
void collectPeptidePeakRetentionTime(const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p) const
collect peak retention times collect all quantified peptides retention times and convert it to the re...
std::shared_ptr< QuantificationMethod > QuantificationMethodSp
std::shared_ptr< MsRunPeptideList > MsRunPeptideListSp
std::shared_ptr< AlignmentMethod > AlignmentMethodSp
std::shared_ptr< Peptide > PeptideSp
Definition peptide.h:46
std::shared_ptr< PeptideObservation > PeptideObservationSp
std::shared_ptr< MsRun > MsRunSp
Definition msrun.h:44