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

#include <msrunpeptidelist.h>

Public Member Functions

 MsRunPeptideList (MsRunSp msrun)
 MsRunPeptideList (const MsRunPeptideList &other)
virtual ~MsRunPeptideList ()
void addPeptideSpectrumIndexObservation (PeptideSp peptide_sp, PeptideLabel *p_label, std::size_t spectrum_index, std::uint8_t charge)
void addPeptideScanNumberObservation (PeptideSp peptide_sp, PeptideLabel *p_label, std::size_t spectrum_index, std::uint8_t charge)
void quantify (const MsRunGroup *msrun_group_p, const QString &tmp_dir, 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)
const MsRunSpgetMsRunSp () const
void flushChromatogramTraces ()
void clearMeasurements ()
 clear all measurements MBR or not Clearing measurements also removes every chromatogram
std::shared_ptr< pappso::MsRunRetentionTime< QString > > & buildMsRunRetentionTimeSpOnPeptideObservations (const AlignmentMethodSp &alignment_method)
 build a retention time vector with seamarks using MS2 best intensities
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 reference time to store it for each peptides
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 time to store it for each peptides
const pappso::MsRunRetentionTime< QString > * getMsRunRetentionTimeConstPtr () const
pappso::MsRunRetentionTime< QString > * getMsRunRetentionTimePtr () const
const std::vector< PeptideMeasurementsSp > & getPeptideMeasurementsList () const
const std::vector< MbrPeptideMeasurementsSp > & getMbrPeptideMeasurementsList () const

Private Member Functions

std::vector< pappso::XicCoordSPtrbuildXicCoordList (const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
void detectQuantifyPeaks (pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
void mbrDetectQuantifyPeaks (pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
void addPeptideObservation2XicCoordList (const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideObservationSp &peptide_events_sp, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
void addMbrPeptideMeasurementsSp2XicCoordList (const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideSp &peptide, std::vector< pappso::XicCoordSPtr > &xic_coord_list)

Private Attributes

MsRunSp msp_msRun
std::map< Peptide *, PeptideObservationSpm_peptideObservationList
std::vector< PeptideMeasurementsSpm_peptideMeasurementsList
std::shared_ptr< pappso::MsRunRetentionTime< QString > > msp_msRunRetentionTime = nullptr
std::vector< MbrPeptideMeasurementsSpm_mbrPeptideMeasurementsList

Detailed Description

group together an msrun, available peptide observations, and peptide measurements

Definition at line 53 of file msrunpeptidelist.h.

Constructor & Destructor Documentation

◆ MsRunPeptideList() [1/2]

pappso::masschroq::MsRunPeptideList::MsRunPeptideList ( MsRunSp msrun)

Default constructor

Definition at line 34 of file msrunpeptidelist.cpp.

References msp_msRun.

◆ MsRunPeptideList() [2/2]

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

Copy constructor

Parameters
otherTODO

Definition at line 39 of file msrunpeptidelist.cpp.

41{
42 msp_msRun = other.msp_msRun;
43}

References msp_msRun.

◆ ~MsRunPeptideList()

pappso::masschroq::MsRunPeptideList::~MsRunPeptideList ( )
virtual

Destructor

Definition at line 45 of file msrunpeptidelist.cpp.

46{
47}

Member Function Documentation

◆ addMbrPeptideMeasurementsSp2XicCoordList()

void pappso::masschroq::MsRunPeptideList::addMbrPeptideMeasurementsSp2XicCoordList ( const MsRunGroup * msrun_group_p,
const QuantificationMethodSp & quantification_method,
const PeptideSp & peptide,
std::vector< pappso::XicCoordSPtr > & xic_coord_list )
private

Definition at line 438 of file msrunpeptidelist.cpp.

443{
444 MbrPeptideMeasurementsSp mbr_peptide_measurements =
445 std::make_shared<pappso::masschroq::MbrPeptideMeasurements>(peptide_sp);
446
447 m_mbrPeptideMeasurementsList.push_back(mbr_peptide_measurements);
448
449 mbr_peptide_measurements.get()->prepareMeasurements(
450 *(msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
451 msrun_group_p,
452 *(msp_msRunRetentionTime.get()),
453 quantification_method);
454 mbr_peptide_measurements.get()->pushBackXicCoordList(xic_coord_list);
455}
std::shared_ptr< pappso::MsRunRetentionTime< QString > > msp_msRunRetentionTime
std::vector< MbrPeptideMeasurementsSp > m_mbrPeptideMeasurementsList
std::shared_ptr< MbrPeptideMeasurements > MbrPeptideMeasurementsSp

References m_mbrPeptideMeasurementsList, msp_msRun, msp_msRunRetentionTime, pappso::masschroq::MbrPeptideMeasurements::prepareMeasurements(), and pappso::masschroq::PeptideMeasurementsBase::pushBackXicCoordList().

Referenced by quantifyMatchBetweenRun().

◆ addPeptideObservation2XicCoordList()

void pappso::masschroq::MsRunPeptideList::addPeptideObservation2XicCoordList ( const MsRunGroup * msrun_group_p,
const QuantificationMethodSp & quantification_method,
const PeptideObservationSp & peptide_events_sp,
std::vector< pappso::XicCoordSPtr > & xic_coord_list )
private

Definition at line 174 of file msrunpeptidelist.cpp.

179{
180 PeptideMeasurementsSp peptide_measurements =
181 std::make_shared<pappso::masschroq::PeptideMeasurements>(peptide_events_sp);
182
183 m_peptideMeasurementsList.push_back(peptide_measurements);
184
185 peptide_measurements.get()->prepareMeasurements(
186 *(msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
187 msrun_group_p,
188 quantification_method);
189 peptide_measurements.get()->pushBackXicCoordList(xic_coord_list);
190}
std::vector< PeptideMeasurementsSp > m_peptideMeasurementsList
std::shared_ptr< PeptideMeasurements > PeptideMeasurementsSp

References m_peptideMeasurementsList, msp_msRun, pappso::masschroq::PeptideMeasurements::prepareMeasurements(), and pappso::masschroq::PeptideMeasurementsBase::pushBackXicCoordList().

Referenced by buildXicCoordList().

◆ addPeptideScanNumberObservation()

void pappso::masschroq::MsRunPeptideList::addPeptideScanNumberObservation ( PeptideSp peptide_sp,
PeptideLabel * p_label,
std::size_t spectrum_index,
std::uint8_t charge )

Definition at line 71 of file msrunpeptidelist.cpp.

76{
77
78 auto it = m_peptideObservationList.insert(
79 {peptide_sp.get(), std::make_shared<pappso::masschroq::PeptideObservation>(peptide_sp)});
81 msp_msRun.get()->getPrecursorSPtrByScanNumber(scan_number);
82 it.first->second.get()->addObservation({scan_number, charge, precursor_sp, false, p_label});
83
84 peptide_sp.get()->addMsRunXicCoordCharge({msp_msRun.get(),
85 precursor_sp.get()->getXicCoordSPtr(),
86 charge,
87 precursor_sp.get()->getIntensity()});
88 qDebug() << "m_peptideObservationList.size()=" << m_peptideObservationList.size();
89}
std::map< Peptide *, PeptideObservationSp > m_peptideObservationList
std::shared_ptr< Precursor > PrecursorSp
Definition precursor.h:39

References pappso::masschroq::Peptide::addMsRunXicCoordCharge(), pappso::masschroq::Precursor::getIntensity(), pappso::masschroq::Precursor::getXicCoordSPtr(), m_peptideObservationList, and msp_msRun.

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

◆ addPeptideSpectrumIndexObservation()

void pappso::masschroq::MsRunPeptideList::addPeptideSpectrumIndexObservation ( PeptideSp peptide_sp,
PeptideLabel * p_label,
std::size_t spectrum_index,
std::uint8_t charge )

Definition at line 50 of file msrunpeptidelist.cpp.

55{
56
57 auto it = m_peptideObservationList.insert(
58 {peptide_sp.get(), std::make_shared<pappso::masschroq::PeptideObservation>(peptide_sp)});
60 msp_msRun.get()->getPrecursorSPtrBySpectrumIndex(spectrum_index);
61 it.first->second.get()->addObservation({spectrum_index, charge, precursor_sp, true, p_label});
62
63 peptide_sp.get()->addMsRunXicCoordCharge({msp_msRun.get(),
64 precursor_sp.get()->getXicCoordSPtr(),
65 charge,
66 precursor_sp.get()->getIntensity()});
67 qDebug() << "m_peptideObservationList.size()=" << m_peptideObservationList.size();
68}

References pappso::masschroq::Peptide::addMsRunXicCoordCharge(), pappso::masschroq::Precursor::getIntensity(), pappso::masschroq::Precursor::getXicCoordSPtr(), m_peptideObservationList, and msp_msRun.

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

◆ buildMsRunRetentionTimeSpOnPeptideObservations()

std::shared_ptr< pappso::MsRunRetentionTime< QString > > & pappso::masschroq::MsRunPeptideList::buildMsRunRetentionTimeSpOnPeptideObservations ( const AlignmentMethodSp & alignment_method)

build a retention time vector with seamarks using MS2 best intensities

Parameters
alignment_methodparameters to use for alignment

Definition at line 243 of file msrunpeptidelist.cpp.

245{
247 std::make_shared<pappso::MsRunRetentionTime<QString>>(msp_msRun->getRetentionTimeLine());
248
249 msp_msRunRetentionTime.get()->setMs2MedianFilter(
250 pappso::FilterMorphoMedian(alignment_method.get()->getMs2TendencyWindow()));
251 msp_msRunRetentionTime.get()->setMs2MeanFilter(
252 pappso::FilterMorphoMean(alignment_method.get()->getMs2SmoothingWindow()));
253 msp_msRunRetentionTime.get()->setMs1MeanFilter(
254 pappso::FilterMorphoMean(alignment_method.get()->getMs1SmoothingWindow()));
255
256
257 for(const auto &observation_pair : m_peptideObservationList)
258 {
259 QString peptide_id = observation_pair.first->getId();
260
261 for(std::uint8_t charge : observation_pair.second->getObservedChargeStates())
262 {
263
264 msp_msRunRetentionTime.get()->addPeptideAsSeamark(
265 QString("%1-%2").arg(peptide_id).arg(charge),
266 observation_pair.second.get()->getBestXicCoordSPtrForCharge(charge).get()->rtTarget,
267 1);
268 }
269 }
270 /*
271for(auto &one_xic_measure : measures.get()->getMeasurementList())
272{
273if((one_xic_measure.m_peakQualityCategory ==
274PeakQualityCategory::aa) ||
275(one_xic_measure.m_peakQualityCategory == PeakQualityCategory::a))
276{
277msp_msRunRetentionTime.get()->addPeptideAsSeamark(
278peptide_id,
279one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().x,
280one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().y);
281}
282}
283*/
284
285
286 msp_msRunRetentionTime.get()->computeSeamarks();
287
289}

References pappso::masschroq::AlignmentMethod::getMs1SmoothingWindow(), pappso::masschroq::AlignmentMethod::getMs2SmoothingWindow(), pappso::masschroq::AlignmentMethod::getMs2TendencyWindow(), m_peptideObservationList, msp_msRun, and msp_msRunRetentionTime.

◆ buildXicCoordList()

std::vector< pappso::XicCoordSPtr > pappso::masschroq::MsRunPeptideList::buildXicCoordList ( const MsRunGroup * msrun_group_p,
const QuantificationMethodSp & quantification_method )
private

Definition at line 154 of file msrunpeptidelist.cpp.

157{
158 std::vector<pappso::XicCoordSPtr> xic_coord_list;
159
160 for(auto pair_peptide : m_peptideObservationList)
161 {
162 pappso::masschroq::PeptideObservationSp peptide_events_sp = pair_peptide.second;
163
165 msrun_group_p, quantification_method, pair_peptide.second, xic_coord_list);
166 // peptide_events_sp.get()
167 }
168
169
170 return xic_coord_list;
171}
void addPeptideObservation2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideObservationSp &peptide_events_sp, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
std::shared_ptr< PeptideObservation > PeptideObservationSp

References addPeptideObservation2XicCoordList(), and m_peptideObservationList.

Referenced by quantify().

◆ clearMeasurements()

void pappso::masschroq::MsRunPeptideList::clearMeasurements ( )

clear all measurements MBR or not Clearing measurements also removes every chromatogram

Definition at line 513 of file msrunpeptidelist.cpp.

514{
515
516 for(auto &measure : m_peptideMeasurementsList)
517 {
518 measure.get()->flushXics();
519 }
520
521 for(auto &mbr_measure : m_mbrPeptideMeasurementsList)
522 {
523 mbr_measure.get()->flushXics();
524 }
525}

References m_mbrPeptideMeasurementsList, and m_peptideMeasurementsList.

◆ collectPeptideMs2RetentionTime()

void pappso::masschroq::MsRunPeptideList::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 time to store it for each peptides

Definition at line 320 of file msrunpeptidelist.cpp.

322{
323 // collect only peptides that were selected for measurement in the first pass
325 {
326 try
327 {
328
329 pappso::masschroq::Peptide *peptide_p =
330 measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
331 peptide_p->setReferenceMsRunRetentionTimePtr(msrun_retention_time_reference_p);
333 *(measures.get()->getPeptideObservationSp().get()), *(msp_msRunRetentionTime.get()));
334 }
335 catch(const pappso::PappsoException &error)
336 {
337 throw pappso::PappsoException(
338 QObject::tr("error collecting MS2 retention time in msrun %1 :\n%2")
339 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId()->getXmlId())
340 .arg(error.qwhat()));
341 }
342 }
343}
virtual const QString & qwhat() const
void setReferenceMsRunRetentionTimePtr(const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p)
sets the current msrun retention time reference
Definition peptide.cpp:252
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 d...
Definition peptide.cpp:180

References pappso::masschroq::Peptide::addAlignedPeptideObservation(), m_peptideMeasurementsList, msp_msRun, msp_msRunRetentionTime, pappso::PappsoException::qwhat(), and pappso::masschroq::Peptide::setReferenceMsRunRetentionTimePtr().

◆ collectPeptidePeakRetentionTime()

void pappso::masschroq::MsRunPeptideList::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 reference time to store it for each peptides

Definition at line 292 of file msrunpeptidelist.cpp.

294{
296 {
297 try
298 {
299 pappso::masschroq::Peptide *peptide_p =
300 measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
301 peptide_p->setReferenceMsRunRetentionTimePtr(msrun_retention_time_reference_p);
302 for(auto &one_xic_measure : measures.get()->getMeasurementList())
303 {
304 peptide_p->addAlignedPeakMeasurement(one_xic_measure,
305 *(msp_msRunRetentionTime.get()));
306 }
307 }
308 catch(const pappso::PappsoException &error)
309 {
310 throw pappso::PappsoException(
311 QObject::tr("error collecting peak retention time in msrun %1 :\n%2")
312 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId()->getXmlId())
313 .arg(error.qwhat()));
314 }
315 }
316}
void addAlignedPeakMeasurement(const PeptideMeasurements::Measurement &one_xic_measure, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
accumulate retention time information for MS1 peak measurement
Definition peptide.cpp:140

References pappso::masschroq::Peptide::addAlignedPeakMeasurement(), m_peptideMeasurementsList, msp_msRun, msp_msRunRetentionTime, pappso::PappsoException::qwhat(), and pappso::masschroq::Peptide::setReferenceMsRunRetentionTimePtr().

◆ detectQuantifyPeaks()

void pappso::masschroq::MsRunPeptideList::detectQuantifyPeaks ( pappso::UiMonitorInterface & m_uiMonitor,
const QuantificationMethodSp & quantification_method )
private

Definition at line 193 of file msrunpeptidelist.cpp.

195{
196
197 m_uiMonitor.appendText(QString("Detect and quantify peak"));
198 /*
199 for(auto &measure : m_peptideMeasurementsList)
200 {
201 measure->detectQuantifyPeaks(quantification_method);
202 }
203 */
204
205 std::function<void(const pappso::masschroq::PeptideMeasurementsSp &)> mapdetectQuantifyPeaks =
206 [quantification_method](const pappso::masschroq::PeptideMeasurementsSp &measure) {
207 measure->detectQuantifyPeaks(quantification_method);
208 };
209
210
211 QFuture<void> res =
212 QtConcurrent::map<std::vector<pappso::masschroq::PeptideMeasurementsSp>::iterator>(
213 m_peptideMeasurementsList.begin(), m_peptideMeasurementsList.end(), mapdetectQuantifyPeaks);
214 res.waitForFinished();
215
216
217 m_uiMonitor.appendText(QString("Detect and quantify peak done"));
218}
virtual void appendText(const QString &text)=0
append a text to a long report

References pappso::UiMonitorInterface::appendText(), and m_peptideMeasurementsList.

Referenced by quantify().

◆ flushChromatogramTraces()

void pappso::masschroq::MsRunPeptideList::flushChromatogramTraces ( )

flush (remove) transient chromatogram traces after peak detection to save space in memory

Definition at line 228 of file msrunpeptidelist.cpp.

229{
230
231 for(auto &measure : m_peptideMeasurementsList)
232 {
233 measure.get()->flushXics();
234 }
235
236 for(auto &mbr_measure : m_mbrPeptideMeasurementsList)
237 {
238 mbr_measure.get()->flushXics();
239 }
240}

References m_mbrPeptideMeasurementsList, and m_peptideMeasurementsList.

◆ getMbrPeptideMeasurementsList()

const std::vector< pappso::masschroq::MbrPeptideMeasurementsSp > & pappso::masschroq::MsRunPeptideList::getMbrPeptideMeasurementsList ( ) const

◆ getMsRunRetentionTimeConstPtr()

const pappso::MsRunRetentionTime< QString > * pappso::masschroq::MsRunPeptideList::getMsRunRetentionTimeConstPtr ( ) const

Definition at line 495 of file msrunpeptidelist.cpp.

496{
497 return msp_msRunRetentionTime.get();
498}

References msp_msRunRetentionTime.

Referenced by pappso::masschroq::CborOutputStream::writeQrDataBlock().

◆ getMsRunRetentionTimePtr()

pappso::MsRunRetentionTime< QString > * pappso::masschroq::MsRunPeptideList::getMsRunRetentionTimePtr ( ) const

Definition at line 490 of file msrunpeptidelist.cpp.

491{
492 return msp_msRunRetentionTime.get();
493}

References msp_msRunRetentionTime.

◆ getMsRunSp()

const pappso::masschroq::MsRunSp & pappso::masschroq::MsRunPeptideList::getMsRunSp ( ) const

◆ getPeptideMeasurementsList()

const std::vector< pappso::masschroq::PeptideMeasurementsSp > & pappso::masschroq::MsRunPeptideList::getPeptideMeasurementsList ( ) const

◆ mbrDetectQuantifyPeaks()

void pappso::masschroq::MsRunPeptideList::mbrDetectQuantifyPeaks ( pappso::UiMonitorInterface & m_uiMonitor,
const QuantificationMethodSp & quantification_method )
private

Definition at line 458 of file msrunpeptidelist.cpp.

461{
462
463 m_uiMonitor.appendText(QString("MBR Detect and quantify peak"));
464 /*
465 for(auto &measure : m_peptideMeasurementsList)
466 {
467 measure->detectQuantifyPeaks(quantification_method);
468 }
469 */
470
471 std::function<void(const pappso::masschroq::MbrPeptideMeasurementsSp &)> mapdetectQuantifyPeaks =
472 [quantification_method](const pappso::masschroq::MbrPeptideMeasurementsSp &measure) {
473 measure->detectQuantifyPeaks(quantification_method);
474 };
475
476
477 QFuture<void> res =
478 QtConcurrent::map<std::vector<pappso::masschroq::MbrPeptideMeasurementsSp>::iterator>(
481 mapdetectQuantifyPeaks);
482 res.waitForFinished();
483
484
485 m_uiMonitor.appendText(QString("Detect and quantify peak done"));
486}

References pappso::UiMonitorInterface::appendText(), and m_mbrPeptideMeasurementsList.

Referenced by quantifyMatchBetweenRun().

◆ quantify()

void pappso::masschroq::MsRunPeptideList::quantify ( const MsRunGroup * msrun_group_p,
const QString & tmp_dir,
pappso::UiMonitorInterface & m_uiMonitor,
const QuantificationMethodSp & quantification_method )

Definition at line 92 of file msrunpeptidelist.cpp.

96{
98 ui_monitor.appendText(
99 QString("Starting quantification for msrun %1")
100 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
101
102 qDebug() << m_peptideObservationList.size();
104
105 qDebug();
108
109 qDebug();
110 ui_monitor.appendText(QString("Preparing extraction list"));
111 std::vector<pappso::XicCoordSPtr> xic_coord_list =
112 buildXicCoordList(msrun_group_p, quantification_method);
113
114 ui_monitor.appendText(QString("Preparing extraction list done"));
115
116 ui_monitor.appendText(QString("Building XIC extractor"));
119 msp_msRun.get()->getMsRunReaderSPtr());
120
121 qDebug();
122 extractor_pwiz->setXicExtractMethod(quantification_method.get()->getXicExtractMethod());
123
124 // qWarning() << quantification_method.get()->getXicExtractionRtRange();
125
126 extractor_pwiz.get()->setRetentionTimeAroundTarget(
127 quantification_method.get()->getXicExtractionRtRange());
128
129 qDebug();
130 pappso::FilterInterfaceCstSPtr csp_filter_suite = quantification_method.get()->getXicFilter();
131
132 qDebug();
133 extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
134
135 qDebug();
136
137 ui_monitor.appendText(QString("Building XIC extractor done"));
138 ui_monitor.appendText(QString("Extracting"));
139 extractor_pwiz.get()->extractXicCoordSPtrListParallelized(ui_monitor, xic_coord_list);
140
141 // qWarning() << "size of first xic=" << xic_coord_list.at(0).get()->xicSptr.get()->size();
142 qDebug();
143
144 detectQuantifyPeaks(ui_monitor, quantification_method);
145
146
147 ui_monitor.appendText(
148 QString("Quantification for msrun %1 done")
149 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
150}
void setTmpDir(const QString &dir_name)
set the temporary working directory
MsRunXicExtractorInterfaceSp buildMsRunXicExtractorSp(MsRunReaderSPtr &msrun_reader) const
build a simple XIC extractor that directly uses Proeowizard library to read and extract XICs building...
static MsRunXicExtractorFactory & getInstance()
singleton to get the only instance of the factory
void setMsRunXicExtractorFactoryType(pappso::MsRunXicExtractorFactoryType type)
sets the xic extractor type
void detectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
std::vector< pappso::XicCoordSPtr > buildXicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp

References pappso::UiMonitorInterface::appendText(), pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorSp(), buildXicCoordList(), detectQuantifyPeaks(), pappso::diskbuffer, pappso::MsRunXicExtractorFactory::getInstance(), pappso::masschroq::QuantificationMethod::getXicExtractionRtRange(), pappso::masschroq::QuantificationMethod::getXicExtractMethod(), pappso::masschroq::QuantificationMethod::getXicFilter(), m_peptideMeasurementsList, m_peptideObservationList, msp_msRun, pappso::MsRunXicExtractorFactory::setMsRunXicExtractorFactoryType(), and pappso::MsRunXicExtractorFactory::setTmpDir().

◆ quantifyMatchBetweenRun()

void pappso::masschroq::MsRunPeptideList::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 )

Definition at line 347 of file msrunpeptidelist.cpp.

353{
354 try
355 {
357 ui_monitor.appendText(
358 QString("Starting quantification for msrun %1 (MBR)")
359 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
360
361 qDebug();
363
364 qDebug();
367
368 qDebug();
369 ui_monitor.appendText(
370 QString("MBR Preparing extraction list (%1)").arg(peptide_mbr_list.size()));
371
372
373 std::vector<pappso::XicCoordSPtr> xic_coord_list;
374
375 for(auto &peptide_sp : peptide_mbr_list)
376 {
377 /*
378 pappso::masschroq::PeptideObservationSp peptide_events_sp = pair_peptide.second;
379
380 addPeptideObservation2XicCoordList(quantification_method,
381 pair_peptide.second,
382 xic_coord_list,
383 ni_minimum_abundance);
384 */
386 msrun_group_p, quantification_method, peptide_sp, xic_coord_list);
387 // peptide_events_sp.get()
388 }
389
390
391 ui_monitor.appendText(QString("MBR Preparing extraction list done (%1 %2)")
393 .arg(xic_coord_list.size()));
394
395 ui_monitor.appendText(QString("MBR Building XIC extractor"));
398 msp_msRun.get()->getMsRunReaderSPtr());
399
400 qDebug();
401 extractor_pwiz->setXicExtractMethod(quantification_method.get()->getXicExtractMethod());
402
403 qDebug();
404
405 extractor_pwiz.get()->setRetentionTimeAroundTarget(
406 quantification_method.get()->getXicExtractionRtRange());
407
408 qDebug();
409 pappso::FilterInterfaceCstSPtr csp_filter_suite = quantification_method.get()->getXicFilter();
410
411 qDebug();
412 extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
413
414 qDebug();
415
416 ui_monitor.appendText(QString("MBR Building XIC extractor done"));
417 ui_monitor.appendText(QString("MBR Extracting"));
418 extractor_pwiz.get()->extractXicCoordSPtrListParallelized(ui_monitor, xic_coord_list);
419
420 qDebug();
421
422 mbrDetectQuantifyPeaks(ui_monitor, quantification_method);
423
424
425 ui_monitor.appendText(
426 QString("MBR Quantification for msrun %1 done")
427 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
428 }
429 catch(const pappso::PappsoException &error)
430 {
431 throw pappso::PappsoException(
432 QObject::tr("error in %1 :\n%2").arg(__FUNCTION__).arg(error.qwhat()));
433 }
434}
void addMbrPeptideMeasurementsSp2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideSp &peptide, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
void mbrDetectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)

References addMbrPeptideMeasurementsSp2XicCoordList(), pappso::UiMonitorInterface::appendText(), pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorSp(), pappso::diskbuffer, pappso::MsRunXicExtractorFactory::getInstance(), pappso::masschroq::QuantificationMethod::getXicExtractionRtRange(), pappso::masschroq::QuantificationMethod::getXicExtractMethod(), pappso::masschroq::QuantificationMethod::getXicFilter(), m_mbrPeptideMeasurementsList, m_peptideMeasurementsList, mbrDetectQuantifyPeaks(), msp_msRun, pappso::PappsoException::qwhat(), pappso::MsRunXicExtractorFactory::setMsRunXicExtractorFactoryType(), and pappso::MsRunXicExtractorFactory::setTmpDir().

Member Data Documentation

◆ m_mbrPeptideMeasurementsList

std::vector<MbrPeptideMeasurementsSp> pappso::masschroq::MsRunPeptideList::m_mbrPeptideMeasurementsList
private

◆ m_peptideMeasurementsList

◆ m_peptideObservationList

std::map<Peptide *, PeptideObservationSp> pappso::masschroq::MsRunPeptideList::m_peptideObservationList
private

◆ msp_msRun

◆ msp_msRunRetentionTime


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