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 351 of file peptide.cpp.

355{
356 pappso::XicCoordSPtr xic_coord_mean;
357 std::size_t count = 0;
358 pappso::IonMobilityGrid *ion_mobility_grid_p = msrun_group.getIonMobilityGridSp().get();
359
360 for(auto &msrun_xic_coord_charge : m_msRunXicCoordChargeList)
361 {
362 if(msrun_group.contains(msrun_xic_coord_charge.msrun_p))
363 {
364
365 if(msrun_xic_coord_charge.charge == charge)
366 {
367 // compute the mean coordinate :
368 pappso::XicCoordSPtr xic_coord_to_add = msrun_xic_coord_charge.xic_coord_sp;
369
370 if(ion_mobility_grid_p != nullptr)
371 {
372 // ion mobility coordinate translation for the targeted msrun
373 xic_coord_to_add = ion_mobility_grid_p->translateXicCoordFromTo(
374 *xic_coord_to_add.get(),
375 *(msrun_xic_coord_charge.msrun_p->getMsRunReaderSPtr()
376 .get()
377 ->getMsRunId()
378 .get()),
379 targeted_msrun);
380 }
381
382 if(xic_coord_mean.get() == nullptr)
383 {
384 xic_coord_mean = xic_coord_to_add.get()->initializeAndClone();
385 }
386 else
387 {
388 xic_coord_mean = xic_coord_mean.get()->addition(xic_coord_to_add);
389 }
390 count++;
391 qDebug() << " xic_coord_mean.get()->toString=" << xic_coord_mean.get()->toString();
392 }
393 }
394 }
395 if(xic_coord_mean.get() != nullptr)
396 {
397 xic_coord_mean = xic_coord_mean.get()->divideBy(count);
398 }
399
400
401 return xic_coord_mean;
402}
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 280 of file peptide.cpp.

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

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 265 of file peptide.cpp.

266{
268}

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 259 of file peptide.cpp.

260{
262}

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 433 of file peptide.cpp.

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

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 =
243 std::find_if(m_observedInMsRunSpList.begin(),
245 [msrun_p](const pappso::masschroq::MsRunSp &a) { return (a.get() == msrun_p); });
246 if(it == m_observedInMsRunSpList.end())
247 return false;
248 return true;
249}
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 308 of file peptide.cpp.

310{
311
312 for(auto &xic_coord_charge_a : m_msRunXicCoordChargeList)
313 {
314 // qInfo() << " observed_in_a";
315 const pappso::MsRunId &msrun_id_a =
316 *(xic_coord_charge_a.msrun_p->getMsRunReaderSPtr().get()->getMsRunId().get());
317 pappso::XicCoordSPtr xic_coord_a = xic_coord_charge_a.xic_coord_sp;
318
319 for(auto &xic_coord_charge_b : m_msRunXicCoordChargeList)
320 {
321 if(&xic_coord_charge_a == &xic_coord_charge_b)
322 {
323 break;
324 }
325 else
326 {
327
328 // qInfo() << " observed_in_b";
329 const pappso::MsRunId &msrun_id_b =
330 *(xic_coord_charge_b.msrun_p->getMsRunReaderSPtr().get()->getMsRunId().get());
331 if(msrun_id_b == msrun_id_a)
332 {
333 }
334 else
335 {
336 pappso::XicCoordSPtr xic_coord_b = xic_coord_charge_b.xic_coord_sp;
337
338 if(xic_coord_charge_a.charge == xic_coord_charge_b.charge)
339 {
340 ion_mobility_grid_p->storeObservedIdentityBetween(
341 msrun_id_a, xic_coord_a.get(), msrun_id_b, xic_coord_b.get());
342 }
343 }
344 }
345 }
346 }
347}
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 405 of file peptide.cpp.

406{
407 auto it = json_label_list.begin();
408
409 while(it != json_label_list.end())
410 {
411 QString label = it.key();
412
413 QString proforma = it.value().toObject().value("proforma").toString();
414
415 pappso::masschroq::PeptideLabelSp peptide_label_sp;
416
417 if(proforma.isEmpty())
418 {
419 throw pappso::ExceptionNotFound(
420 QObject::tr("ERROR: label %1 %2 must contain proforma sequence").arg(label).arg(m_id));
421 }
422 else
423 {
424 peptide_label_sp = std::make_shared<pappso::masschroq::PeptideLabel>(
425 pappso::PeptideProFormaParser::parseString(proforma), this, label);
426 }
427 m_peptideLabelMap.insert({label, peptide_label_sp});
428 it++;
429 }
430}
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 252 of file peptide.cpp.

254{
255 mp_referenceMsRunRetentionTime = msrun_retention_time_reference_p;
256}
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: