libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::masschroq::Peptide Class Reference

#include <peptide.h>

Inheritance diagram for pappso::masschroq::Peptide:
pappso::masschroq::PeptideBase

Classes

struct  AlignedPeakPositionElement
 internal structure to compute consensus retention times More...
 
struct  MsRunXicCoordCharge
 internal structure to store msrun + charge + intensity + xic coordinate More...
 

Public Member Functions

 Peptide (const QString &id, const pappso::PeptideSp &peptide_sp, const std::vector< ProteinSp > &protein_list)
 constructor
 
 Peptide (const Peptide &other)
 
virtual ~Peptide ()
 
virtual void computeIsotopologues (double ni_min_abundance) override
 compute possible isotopes for this molecule
 
const QString & getId () const
 get peptide unique identifier
 
void setMods (const QString &mods)
 set optional information as text to this peptide
 
const QString & getMods () const
 get optional information as text
 
void addObservedChargeState (std::uint8_t charge)
 
void addObservedInMsRunSp (const MsRunSp &msrun_sp)
 
const std::vector< std::uint8_t > & getAllObservedChargeStateList () const
 
const std::vector< ProteinSp > & getProteinSpList () const
 
void addAlignedPeakMeasurement (const PeptideMeasurements::Measurement &one_xic_measure, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
 accumulate retention time information for MS1 peak measurement
 
void addAlignedPeptideObservation (const PeptideObservation &peptide_observation, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
 accumulate retention time information for MS2 observation convenient function used while collecting data from first pass quantification process
 
void computeConsensusRetentionTime ()
 compute consensus retention time (on MS2 observations and MS1 peak measurements) the computation is based on data collected during the first pass of quantification
 
bool isObservedInMsRunSp (const MsRun *msrun_p)
 tell if this peptide is observed (MS2 fragmentation and identification) in this msrun
 
pappso::XicCoordSPtr getBestXicCoordSPtrForChargeInMsRunGroup (const MsRunGroup *msrun_group_p, std::uint8_t charge) const
 get the XIC coordinates of the higher observed intensity for this peptide and charge in other MS run in the group
 
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
 
void setReferenceMsRunRetentionTimePtr (const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p)
 sets the current msrun retention time reference
 
double getConsensusPeakRetentionTime () const
 get consensus retention time based on XIC peak measurements
 
double getConsensusMs2RetentionTime () const
 get consensus retention time based on MS2 fragmenation and identification events
 
void addMsRunXicCoordCharge (const MsRunXicCoordCharge &msrun_xic_coord)
 
void populateIonMobilityGrid (pappso::IonMobilityGrid *ion_mobility_grid_p) const
 Populate ion mobility grid with observed XIC coordinates for this peptide on all MSruns The ion mobility grid only works with Tims TOF mobility index.
 
void setJsonLabelList (const QJsonObject &json_label_list)
 build peptide label map from JSON label_list object
 
PeptideLabelgetPeptideLabelPtr (const QString &label) const
 get a peptide label pointer with the corresponding label identifier
 
const std::map< QString, PeptideLabelSp > & getPeptideLabelMap () const
 get the peptide label label_list
 
- Public Member Functions inherited from pappso::masschroq::PeptideBase
 PeptideBase (const pappso::PeptideSp &peptide_sp)
 
virtual ~PeptideBase ()
 
virtual const pappso::PeptideSpgetPappsoPeptideSp () const
 get the peptide sequence
 
virtual const pappso::PeptideNaturalIsotopeListgetPeptideNaturalIsotopeList () const
 get list of isotopes for this peptide needs computeIsotopologues before
 
virtual const std::vector< pappso::PeptideNaturalIsotopeAverageSp > & getPeptideNaturalIsotopeAverageSpList (pappso::PrecisionPtr precision, std::uint8_t charge, double ni_min_abundance)
 get possible and distinguishable masses of isotopes get list of distinguishable isotopes given the charge and mass precision
 

Private Attributes

const QString m_id
 
const std::vector< ProteinSpm_proteinSpList
 
QString m_mods
 
std::vector< std::uint8_t > m_allObservedChargeStateList
 
std::vector< MsRunSpm_observedInMsRunSpList
 
std::vector< AlignedPeakPositionElementm_alignedPeakPositionElementList
 
double m_consensusAlignedPeakRetentionTime = 0
 
double m_consensusAlignedMs2RetentionTime = 0
 
const pappso::MsRunRetentionTime< QString > * mp_referenceMsRunRetentionTime = nullptr
 
std::vector< double > m_referenceMs2ObservationList
 
std::vector< MsRunXicCoordChargem_msRunXicCoordChargeList
 
std::map< QString, PeptideLabelSpm_peptideLabelMap
 

Additional Inherited Members

- Protected Attributes inherited from pappso::masschroq::PeptideBase
const pappso::PeptideSp msp_peptide
 
pappso::PeptideNaturalIsotopeListmpa_peptideNaturalIsotopeList = nullptr
 
std::map< std::uint8_t, std::vector< pappso::PeptideNaturalIsotopeAverageSp > > m_peptideNaturalIsotopeAverageSpListByCharge
 
double m_niMinAbundance = 0
 
QMutex m_mutex
 

Detailed Description

unique studied entity representing the molecule we want to measure

Definition at line 57 of file peptide.h.

Constructor & Destructor Documentation

◆ Peptide() [1/2]

pappso::masschroq::Peptide::Peptide ( const QString & id,
const pappso::PeptideSp & peptide_sp,
const std::vector< ProteinSp > & protein_list )

constructor

Parameters
idunique identifier for this peptide
msp_peptidepeptide sequence
protein_listvector of protein shared pointer linked to this peptide^

Definition at line 36 of file peptide.cpp.

39 : PeptideBase(peptide_sp), m_id(id), m_proteinSpList(protein_list)
40{
41}
PeptideBase(const pappso::PeptideSp &peptide_sp)
const std::vector< ProteinSp > m_proteinSpList
Definition peptide.h:238

References pappso::masschroq::PeptideBase::PeptideBase(), m_id, and m_proteinSpList.

Referenced by Peptide().

◆ Peptide() [2/2]

pappso::masschroq::Peptide::Peptide ( const Peptide & other)

Copy constructor

Parameters
otherTODO

Definition at line 43 of file peptide.cpp.

44 : PeptideBase(other.msp_peptide), m_id(other.m_id), m_proteinSpList(other.m_proteinSpList)
45{
46 m_mods = other.m_mods;
47}

References Peptide(), pappso::masschroq::PeptideBase::PeptideBase(), m_id, m_mods, m_proteinSpList, and pappso::masschroq::PeptideBase::msp_peptide.

◆ ~Peptide()

pappso::masschroq::Peptide::~Peptide ( )
virtual

Destructor

Definition at line 49 of file peptide.cpp.

50{
53}
pappso::PeptideNaturalIsotopeList * mpa_peptideNaturalIsotopeList
Definition peptidebase.h:89

References pappso::masschroq::PeptideBase::mpa_peptideNaturalIsotopeList.

Member Function Documentation

◆ addAlignedPeakMeasurement()

void pappso::masschroq::Peptide::addAlignedPeakMeasurement ( const PeptideMeasurements::Measurement & one_xic_measure,
const pappso::MsRunRetentionTime< QString > & msrun_retention_time )

accumulate retention time information for MS1 peak measurement

convenient function used while collecting data from first pass quantification process

Parameters
one_xic_measurea peak to process
msrun_retention_timethe msrun retention time converter for this msrun

Definition at line 140 of file peptide.cpp.

143{
144 if(one_xic_measure.m_tracePeakSp.get() != nullptr)
145 {
147 position.intensity = one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().y;
148 if(msrun_retention_time.isAligned())
149 {
150 position.alignedRetentionTime =
151 msrun_retention_time.translateOriginal2AlignedRetentionTime(
152 one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().x);
153 position.alignedRetentionTimeCenter =
154 msrun_retention_time.translateOriginal2AlignedRetentionTime(
155 (one_xic_measure.m_tracePeakSp.get()->getLeftBoundary().x +
156 one_xic_measure.m_tracePeakSp.get()->getRightBoundary().x) /
157 2);
158 }
159 else
160 {
161 position.alignedRetentionTime = one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().x;
162 position.alignedRetentionTimeCenter =
163 ((one_xic_measure.m_tracePeakSp.get()->getLeftBoundary().x +
164 one_xic_measure.m_tracePeakSp.get()->getRightBoundary().x) /
165 2);
166 }
167 /*
168 position.alignedRetentionTime =
169 position.alignedRetentionTime +
170 ((position.alignedRetentionTimeCenter - position.alignedRetentionTime) /
171 4);*/
172 position.wide = one_xic_measure.m_tracePeakSp.get()->getArea();
173 // one_xic_measure.m_tracePeakSp.get()->getRightBoundary().x -
174 // one_xic_measure.m_tracePeakSp.get()->getLeftBoundary().x;
175 m_alignedPeakPositionElementList.push_back(position);
176 }
177}
double translateOriginal2AlignedRetentionTime(double original_retention_time) const
std::vector< AlignedPeakPositionElement > m_alignedPeakPositionElementList
Definition peptide.h:243
internal structure to compute consensus retention times
Definition peptide.h:145

References pappso::masschroq::Peptide::AlignedPeakPositionElement::alignedRetentionTime, pappso::masschroq::Peptide::AlignedPeakPositionElement::alignedRetentionTimeCenter, pappso::masschroq::Peptide::AlignedPeakPositionElement::intensity, pappso::MsRunRetentionTime< T >::isAligned(), m_alignedPeakPositionElementList, pappso::masschroq::PeptideMeasurementsBase::Measurement::m_tracePeakSp, pappso::MsRunRetentionTime< T >::translateOriginal2AlignedRetentionTime(), pappso::masschroq::Peptide::AlignedPeakPositionElement::wide, and pappso::x.

Referenced by pappso::masschroq::MsRunPeptideList::collectPeptidePeakRetentionTime().

◆ addAlignedPeptideObservation()

void pappso::masschroq::Peptide::addAlignedPeptideObservation ( const PeptideObservation & peptide_observation,
const pappso::MsRunRetentionTime< QString > & msrun_retention_time )

accumulate retention time information for MS2 observation convenient function used while collecting data from first pass quantification process

Parameters
peptide_observationan MS2 observation
msrun_retention_timethe msrun retention time converter for this msrun

Definition at line 180 of file peptide.cpp.

183{
184 double best_rt = peptide_observation.getBestXicCoord().get()->rtTarget;
185 if(msrun_retention_time.isAligned())
186 {
187 best_rt = msrun_retention_time.translateOriginal2AlignedRetentionTime(best_rt);
188 }
189
190 m_referenceMs2ObservationList.push_back(best_rt);
191}
std::vector< double > m_referenceMs2ObservationList
Definition peptide.h:249

References pappso::masschroq::PeptideObservation::getBestXicCoord(), pappso::MsRunRetentionTime< T >::isAligned(), m_referenceMs2ObservationList, and pappso::MsRunRetentionTime< T >::translateOriginal2AlignedRetentionTime().

Referenced by pappso::masschroq::MsRunPeptideList::collectPeptideMs2RetentionTime().

◆ addMsRunXicCoordCharge()

void pappso::masschroq::Peptide::addMsRunXicCoordCharge ( const MsRunXicCoordCharge & msrun_xic_coord)

◆ addObservedChargeState()

void pappso::masschroq::Peptide::addObservedChargeState ( std::uint8_t charge)

Definition at line 106 of file peptide.cpp.

107{
109 std::find(m_allObservedChargeStateList.begin(), m_allObservedChargeStateList.end(), charge))
110 {
111 m_allObservedChargeStateList.push_back(charge);
112 }
113}
std::vector< std::uint8_t > m_allObservedChargeStateList
Definition peptide.h:240

References m_allObservedChargeStateList.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

◆ addObservedInMsRunSp()

void pappso::masschroq::Peptide::addObservedInMsRunSp ( const MsRunSp & msrun_sp)

Definition at line 123 of file peptide.cpp.

124{
125 auto it = std::find(m_observedInMsRunSpList.begin(), m_observedInMsRunSpList.end(), msrun_sp);
126 if(it == m_observedInMsRunSpList.end())
127 {
128 m_observedInMsRunSpList.push_back(msrun_sp);
129 }
130}
std::vector< MsRunSp > m_observedInMsRunSpList
Definition peptide.h:241

References m_observedInMsRunSpList.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

◆ computeConsensusRetentionTime()

void pappso::masschroq::Peptide::computeConsensusRetentionTime ( )

compute consensus retention time (on MS2 observations and MS1 peak measurements) the computation is based on data collected during the first pass of quantification

Definition at line 194 of file peptide.cpp.

195{
197
199 {
200 std::sort(m_alignedPeakPositionElementList.begin(),
203 return a.wide > b.wide;
204 });
205
206 // take only the 90% best measures
207 std::size_t limit = m_alignedPeakPositionElementList.size() * 0.9;
208 if(limit < 5)
209 {
211 // throw pappso::PappsoException("limit < 3");
212 }
213 double total_intensity = std::accumulate(m_alignedPeakPositionElementList.begin(),
214 m_alignedPeakPositionElementList.begin() + limit,
215 (double)0.0,
216 [](double sum, AlignedPeakPositionElement &element) {
217 sum += element.intensity;
218 return (sum);
219 });
220 double sum_rt = std::accumulate(m_alignedPeakPositionElementList.begin(),
221 m_alignedPeakPositionElementList.begin() + limit,
222 (double)0.0,
223 [](double sum, AlignedPeakPositionElement &element) {
224 sum += element.intensity * element.alignedRetentionTime;
225 return (sum);
226 });
227
228 m_consensusAlignedPeakRetentionTime = sum_rt / total_intensity;
229 }
231
232 double sum_rt = std::accumulate(
235
237}
double m_consensusAlignedPeakRetentionTime
Definition peptide.h:245
double m_consensusAlignedMs2RetentionTime
Definition peptide.h:246
@ a
peak detected using a single direct MS2 observation
Definition types.h:46

References pappso::masschroq::a, pappso::masschroq::b, m_alignedPeakPositionElementList, m_consensusAlignedMs2RetentionTime, m_consensusAlignedPeakRetentionTime, and m_referenceMs2ObservationList.

◆ computeIsotopologues()

void pappso::masschroq::Peptide::computeIsotopologues ( double ni_min_abundance)
overridevirtual

compute possible isotopes for this molecule

Parameters
ni_min_abundancethe minimal isotop abundance proportion to cover (0.9 will compute isotopes to reach at least 90% of its theoretical abundance

Reimplemented from pappso::masschroq::PeptideBase.

Definition at line 56 of file peptide.cpp.

57{
58 qDebug();
59 if(ni_min_abundance > 0)
60 {
61 if(m_peptideLabelMap.size() > 0)
62 {
63 qDebug();
64 for(auto &pair_label : m_peptideLabelMap)
65 {
66 qDebug() << pair_label.second.get();
67 pair_label.second->computeIsotopologues(ni_min_abundance);
68 qDebug();
69 }
70 qDebug();
71 }
72 else
73 {
74 qDebug();
75 PeptideBase::computeIsotopologues(ni_min_abundance);
76 }
77 }
78 qDebug();
79}
virtual void computeIsotopologues(double ni_min_abundance)
compute possible isotopes for this molecule
std::map< QString, PeptideLabelSp > m_peptideLabelMap
Definition peptide.h:253

References pappso::masschroq::PeptideBase::computeIsotopologues(), and m_peptideLabelMap.

◆ getAllObservedChargeStateList()

const std::vector< std::uint8_t > & pappso::masschroq::Peptide::getAllObservedChargeStateList ( ) const

◆ getBestIonMobilityXicCoordToExtractOverallMsRunGroup()

pappso::XicCoordSPtr pappso::masschroq::Peptide::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

Parameters
msrun_group_ppointer on the msrun group
targeted_msrunthe xic coordinate target (required to adjust ion mobility to this msrun)
chargethe targeted charge
Returns
pappso::XicCoordSPtr shared pointer on xic coordinate

Definition at line 348 of file peptide.cpp.

352{
353 pappso::XicCoordSPtr xic_coord_mean;
354 std::size_t count = 0;
355 pappso::IonMobilityGrid *ion_mobility_grid_p = msrun_group.getIonMobilityGridSp().get();
356
357 for(auto &msrun_xic_coord_charge : m_msRunXicCoordChargeList)
358 {
359 if(msrun_group.contains(msrun_xic_coord_charge.msrun_p))
360 {
361
362 if(msrun_xic_coord_charge.charge == charge)
363 {
364 // compute the mean coordinate :
365 pappso::XicCoordSPtr xic_coord_to_add = msrun_xic_coord_charge.xic_coord_sp;
366
367 if(ion_mobility_grid_p != nullptr)
368 {
369 // ion mobility coordinate translation for the targeted msrun
370 xic_coord_to_add = ion_mobility_grid_p->translateXicCoordFromTo(
371 *xic_coord_to_add.get(),
372 *(msrun_xic_coord_charge.msrun_p->getMsRunReaderSPtr()
373 .get()
374 ->getMsRunId()
375 .get()),
376 targeted_msrun);
377 }
378
379 if(xic_coord_mean.get() == nullptr)
380 {
381 xic_coord_mean = xic_coord_to_add.get()->initializeAndClone();
382 }
383 else
384 {
385 xic_coord_mean = xic_coord_mean.get()->addition(xic_coord_to_add);
386 }
387 count++;
388 qDebug() << " xic_coord_mean.get()->toString=" << xic_coord_mean.get()->toString();
389 }
390 }
391 }
392 if(xic_coord_mean.get() != nullptr)
393 {
394 xic_coord_mean = xic_coord_mean.get()->divideBy(count);
395 }
396
397
398 return xic_coord_mean;
399}
pappso::XicCoordSPtr translateXicCoordFromTo(const pappso::XicCoord &source_xic_coord, const MsRunId &source_msrunid, const MsRunId &target_msrunid) const
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44

References pappso::masschroq::MsRunGroup::contains(), pappso::masschroq::MsRunGroup::getIonMobilityGridSp(), m_msRunXicCoordChargeList, and pappso::IonMobilityGrid::translateXicCoordFromTo().

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements(), and pappso::masschroq::PeptideMeasurements::prepareMeasurements().

◆ getBestXicCoordSPtrForChargeInMsRunGroup()

pappso::XicCoordSPtr pappso::masschroq::Peptide::getBestXicCoordSPtrForChargeInMsRunGroup ( const MsRunGroup * msrun_group_p,
std::uint8_t charge ) const

get the XIC coordinates of the higher observed intensity for this peptide and charge in other MS run in the group

Parameters
msrun_group_ppointer on the msrun group
chargethe targeted charge
Returns
pappso::XicCoordSPtr shared pointer on xic coordinate

Definition at line 278 of file peptide.cpp.

280{
281 // get XIC coordinates of the most intense precursor
282 pappso::pappso_double intensity = -1;
283 pappso::XicCoordSPtr best_xic_coord;
284
285 for(auto &xic_coord_charge : m_msRunXicCoordChargeList)
286 {
287 if(msrun_group_p->contains(xic_coord_charge.msrun_p))
288 {
289 if(xic_coord_charge.charge == charge)
290 {
291 if(xic_coord_charge.intensity > intensity)
292 {
293 intensity = xic_coord_charge.intensity;
294 best_xic_coord = xic_coord_charge.xic_coord_sp;
295 qDebug();
296 }
297 }
298 }
299 }
300
301 return best_xic_coord;
302}
double pappso_double
A type definition for doubles.
Definition types.h:61

References pappso::masschroq::MsRunGroup::contains(), and m_msRunXicCoordChargeList.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements().

◆ getConsensusMs2RetentionTime()

double pappso::masschroq::Peptide::getConsensusMs2RetentionTime ( ) const

get consensus retention time based on MS2 fragmenation and identification events

Returns
retention time in seconds

Definition at line 264 of file peptide.cpp.

265{
267}

References m_consensusAlignedMs2RetentionTime.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements().

◆ getConsensusPeakRetentionTime()

double pappso::masschroq::Peptide::getConsensusPeakRetentionTime ( ) const

get consensus retention time based on XIC peak measurements

Returns
retention time in seconds

Definition at line 258 of file peptide.cpp.

259{
261}

References m_consensusAlignedPeakRetentionTime.

Referenced by pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements().

◆ getId()

const QString & pappso::masschroq::Peptide::getId ( ) const

◆ getMods()

const QString & pappso::masschroq::Peptide::getMods ( ) const

get optional information as text

Definition at line 94 of file peptide.cpp.

95{
96 return m_mods;
97}

References m_mods.

Referenced by pappso::masschroq::CborOutputStream::writeMbrPeptideMeasurements(), and pappso::masschroq::CborOutputStream::writePeptideMeasurements().

◆ getPeptideLabelMap()

const std::map< QString, pappso::masschroq::PeptideLabelSp > & pappso::masschroq::Peptide::getPeptideLabelMap ( ) const

get the peptide label label_list

Definition at line 100 of file peptide.cpp.

101{
102 return m_peptideLabelMap;
103}

References m_peptideLabelMap.

Referenced by pappso::masschroq::PeptideMeasurementsBase::prepareMeasurementsForPeptide().

◆ getPeptideLabelPtr()

pappso::masschroq::PeptideLabel * pappso::masschroq::Peptide::getPeptideLabelPtr ( const QString & label) const

get a peptide label pointer with the corresponding label identifier

Definition at line 430 of file peptide.cpp.

431{
432 auto it = m_peptideLabelMap.find(label);
433 if(it == m_peptideLabelMap.end())
434 {
435 throw pappso::ExceptionNotFound(
436 QObject::tr("ERROR: label %1 not found in peptide %2").arg(label).arg(m_id));
437 }
438 return it->second.get();
439}

References m_id, and m_peptideLabelMap.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

◆ getProteinSpList()

const std::vector< pappso::masschroq::ProteinSp > & pappso::masschroq::Peptide::getProteinSpList ( ) const

Definition at line 134 of file peptide.cpp.

135{
136 return m_proteinSpList;
137}

References m_proteinSpList.

◆ isObservedInMsRunSp()

bool pappso::masschroq::Peptide::isObservedInMsRunSp ( const MsRun * msrun_p)

tell if this peptide is observed (MS2 fragmentation and identification) in this msrun

Parameters
msrun_pmsrun pointer
Returns
true if observed, false otherwise

Definition at line 240 of file peptide.cpp.

241{
242 auto it = std::find_if(m_observedInMsRunSpList.begin(),
244 [msrun_p](const pappso::masschroq::MsRunSp &a) { return (a.get() == msrun_p); });
245 if(it == m_observedInMsRunSpList.end())
246 return false;
247 return true;
248}
std::shared_ptr< MsRun > MsRunSp
Definition msrun.h:44

References pappso::masschroq::a, and m_observedInMsRunSpList.

◆ populateIonMobilityGrid()

void pappso::masschroq::Peptide::populateIonMobilityGrid ( pappso::IonMobilityGrid * ion_mobility_grid_p) const

Populate ion mobility grid with observed XIC coordinates for this peptide on all MSruns The ion mobility grid only works with Tims TOF mobility index.

Definition at line 306 of file peptide.cpp.

307{
308
309 for(auto &xic_coord_charge_a : m_msRunXicCoordChargeList)
310 {
311 // qInfo() << " observed_in_a";
312 const pappso::MsRunId &msrun_id_a =
313 *(xic_coord_charge_a.msrun_p->getMsRunReaderSPtr().get()->getMsRunId().get());
314 pappso::XicCoordSPtr xic_coord_a = xic_coord_charge_a.xic_coord_sp;
315
316 for(auto &xic_coord_charge_b : m_msRunXicCoordChargeList)
317 {
318 if(&xic_coord_charge_a == &xic_coord_charge_b)
319 {
320 break;
321 }
322 else
323 {
324
325 // qInfo() << " observed_in_b";
326 const pappso::MsRunId &msrun_id_b =
327 *(xic_coord_charge_b.msrun_p->getMsRunReaderSPtr().get()->getMsRunId().get());
328 if(msrun_id_b == msrun_id_a)
329 {
330 }
331 else
332 {
333 pappso::XicCoordSPtr xic_coord_b = xic_coord_charge_b.xic_coord_sp;
334
335 if(xic_coord_charge_a.charge == xic_coord_charge_b.charge)
336 {
337 ion_mobility_grid_p->storeObservedIdentityBetween(
338 msrun_id_a, xic_coord_a.get(), msrun_id_b, xic_coord_b.get());
339 }
340 }
341 }
342 }
343 }
344}
void storeObservedIdentityBetween(const MsRunId &msrun_ida, const XicCoord *xic_coorda, const MsRunId &msrun_idb, const XicCoord *xic_coordb)

References m_msRunXicCoordChargeList, and pappso::IonMobilityGrid::storeObservedIdentityBetween().

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations().

◆ setJsonLabelList()

void pappso::masschroq::Peptide::setJsonLabelList ( const QJsonObject & json_label_list)

build peptide label map from JSON label_list object

Definition at line 402 of file peptide.cpp.

403{
404 auto it = json_label_list.begin();
405
406 while(it != json_label_list.end())
407 {
408 QString label = it.key();
409
410 QString proforma = it.value().toObject().value("proforma").toString();
411
412 pappso::masschroq::PeptideLabelSp peptide_label_sp;
413
414 if(proforma.isEmpty())
415 {
416 throw pappso::ExceptionNotFound(
417 QObject::tr("ERROR: label %1 %2 must contain proforma sequence").arg(label).arg(m_id));
418 }
419 else
420 {
421 peptide_label_sp = std::make_shared<pappso::masschroq::PeptideLabel>(
422 pappso::PeptideProFormaParser::parseString(proforma), this, label);
423 }
424 m_peptideLabelMap.insert({label, peptide_label_sp});
425 it++;
426 }
427}
static PeptideSp parseString(const QString &pepstr)
std::shared_ptr< PeptideLabel > PeptideLabelSp
Definition peptide.h:52

References m_id, m_peptideLabelMap, and pappso::PeptideProFormaParser::parseString().

Referenced by pappso::masschroq::JsonInput::read_peptide_list().

◆ setMods()

void pappso::masschroq::Peptide::setMods ( const QString & mods)

set optional information as text to this peptide

Definition at line 88 of file peptide.cpp.

89{
90 m_mods = mods;
91}

References m_mods.

Referenced by pappso::masschroq::JsonInput::read_peptide_list().

◆ setReferenceMsRunRetentionTimePtr()

void pappso::masschroq::Peptide::setReferenceMsRunRetentionTimePtr ( const pappso::MsRunRetentionTime< QString > * msrun_retention_time_reference_p)

sets the current msrun retention time reference

Parameters
pappso::MsRunRetentionTime<QString>msrun run retention time reference

Definition at line 251 of file peptide.cpp.

253{
254 mp_referenceMsRunRetentionTime = msrun_retention_time_reference_p;
255}
const pappso::MsRunRetentionTime< QString > * mp_referenceMsRunRetentionTime
Definition peptide.h:248

References mp_referenceMsRunRetentionTime.

Referenced by pappso::masschroq::MsRunPeptideList::collectPeptideMs2RetentionTime(), and pappso::masschroq::MsRunPeptideList::collectPeptidePeakRetentionTime().

Member Data Documentation

◆ m_alignedPeakPositionElementList

std::vector<AlignedPeakPositionElement> pappso::masschroq::Peptide::m_alignedPeakPositionElementList
private

Definition at line 243 of file peptide.h.

Referenced by addAlignedPeakMeasurement(), and computeConsensusRetentionTime().

◆ m_allObservedChargeStateList

std::vector<std::uint8_t> pappso::masschroq::Peptide::m_allObservedChargeStateList
private

Definition at line 240 of file peptide.h.

Referenced by addObservedChargeState(), and getAllObservedChargeStateList().

◆ m_consensusAlignedMs2RetentionTime

double pappso::masschroq::Peptide::m_consensusAlignedMs2RetentionTime = 0
private

Definition at line 246 of file peptide.h.

Referenced by computeConsensusRetentionTime(), and getConsensusMs2RetentionTime().

◆ m_consensusAlignedPeakRetentionTime

double pappso::masschroq::Peptide::m_consensusAlignedPeakRetentionTime = 0
private

Definition at line 245 of file peptide.h.

Referenced by computeConsensusRetentionTime(), and getConsensusPeakRetentionTime().

◆ m_id

const QString pappso::masschroq::Peptide::m_id
private

Definition at line 237 of file peptide.h.

Referenced by Peptide(), Peptide(), getId(), getPeptideLabelPtr(), and setJsonLabelList().

◆ m_mods

QString pappso::masschroq::Peptide::m_mods
private

Definition at line 239 of file peptide.h.

Referenced by Peptide(), getMods(), and setMods().

◆ m_msRunXicCoordChargeList

std::vector<MsRunXicCoordCharge> pappso::masschroq::Peptide::m_msRunXicCoordChargeList
private

◆ m_observedInMsRunSpList

std::vector<MsRunSp> pappso::masschroq::Peptide::m_observedInMsRunSpList
private

Definition at line 241 of file peptide.h.

Referenced by addObservedInMsRunSp(), and isObservedInMsRunSp().

◆ m_peptideLabelMap

std::map<QString, PeptideLabelSp> pappso::masschroq::Peptide::m_peptideLabelMap
private

◆ m_proteinSpList

const std::vector<ProteinSp> pappso::masschroq::Peptide::m_proteinSpList
private

Definition at line 238 of file peptide.h.

Referenced by Peptide(), Peptide(), and getProteinSpList().

◆ m_referenceMs2ObservationList

std::vector<double> pappso::masschroq::Peptide::m_referenceMs2ObservationList
private

Definition at line 249 of file peptide.h.

Referenced by addAlignedPeptideObservation(), and computeConsensusRetentionTime().

◆ mp_referenceMsRunRetentionTime

const pappso::MsRunRetentionTime<QString>* pappso::masschroq::Peptide::mp_referenceMsRunRetentionTime = nullptr
private

Definition at line 248 of file peptide.h.

Referenced by setReferenceMsRunRetentionTimePtr().


The documentation for this class was generated from the following files: