32#include "../processing/detection/tracepeaklist.h"
33#include "../pappsoexception.h"
63 double best_rt = msp_peptideObservation.get()->getBestRtOverallChargeStates();
68 if(best_xic_coord.get() ==
nullptr)
73 for(std::uint8_t charge : charge_states)
79 best_xic_coord = msp_peptideObservation.get()->getBestXicCoordSPtrForCharge(charge);
81 if(best_xic_coord.get() ==
nullptr)
86 *msrun_group_p, targeted_msrun, charge);
88 if(best_xic_coord.get() ==
nullptr)
91 best_xic_coord.get()->rtTarget = best_rt;
94 prepareMeasurementsForPeptide(
95 *the_peptide_p, quantification_method, best_xic_coord, charge, best_rt);
107 std::vector<double> observed_rt_list =
108 msp_peptideObservation.get()->getObservedRetentionTimesOverallChargeStates();
110 std::vector<std::uint8_t> observed_charge_states =
111 msp_peptideObservation->getObservedChargeStates();
113 for(
auto &measure_one : m_measurementList)
116 pappso::Xic *xic_p = measure_one.msp_xicCoord.get()->xicSptr.get();
122 std::size_t nb_peaks = 0;
123 quantification_method.get()->getTraceDetectionInterfaceCstSPtr().get()->detect(
124 *xic_p, peak_list,
false);
128 peak_list.begin(), peak_list.end(), observed_rt_list, nb_peaks);
132 bool direct_charge_observation_in_msrun =
true;
133 if(observed_charge_states.end() ==
134 find(observed_charge_states.begin(), observed_charge_states.end(), measure_one.m_charge))
136 direct_charge_observation_in_msrun =
false;
138 if(it_best_matched_peak != peak_list.end())
140 measure_one.m_tracePeakSp = it_best_matched_peak->makeTracePeakCstSPtr();
145 if(direct_charge_observation_in_msrun)
148 if(observed_rt_list.size() > 1)
151 if(direct_charge_observation_in_msrun)
155 else if(nb_peaks > 1)
158 if(direct_charge_observation_in_msrun)
168 return msp_peptideObservation;
MS run identity MsRunId identifies an MS run with a unique ID (XmlId) and contains eventually informa...
const std::shared_ptr< pappso::IonMobilityGrid > & getIonMobilityGridSp() const
PeptideObservationSp msp_peptideObservation
const PeptideObservationSp & getPeptideObservationSp() const
virtual ~PeptideMeasurements()
PeptideMeasurements(const PeptideObservationSp &peptide_observations)
virtual void detectQuantifyPeaks(const QuantificationMethodSp &quantification_method) override
void prepareMeasurements(const pappso::MsRunId &targeted_msrun, const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
const std::vector< std::uint8_t > & getAllObservedChargeStateList() const
pappso::XicCoordSPtr getBestIonMobilityXicCoordToExtractOverallMsRunGroup(const MsRunGroup &msrun_group, const pappso::MsRunId &targeted_msrun, std::uint8_t charge) const
get ion mobility coordinates corrected against other MSruns in the group
group msrun together in masschroqlite
std::shared_ptr< QuantificationMethod > QuantificationMethodSp
@ a
peak detected using a single direct MS2 observation
@ missed
no peak found at all
@ aa
best possible : more than one direct MS2 fragmentation in same MSRUN
std::shared_ptr< PeptideObservation > PeptideObservationSp
PMSPP_LIB_DECL std::vector< TracePeak >::iterator findBestTracePeakGivenRtList(std::vector< TracePeak >::iterator begin, std::vector< TracePeak >::iterator end, const std::vector< double > &rt_list, std::size_t &nb_peaks)
find the best peak matching a list of retention times
std::shared_ptr< XicCoord > XicCoordSPtr
peptide extracted measures model in masschroqlite
peptide model in masschroqlite