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 35 of file msrunpeptidelist.cpp.

References msp_msRun.

◆ MsRunPeptideList() [2/2]

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

Copy constructor

Parameters
otherTODO

Definition at line 40 of file msrunpeptidelist.cpp.

42{
43 msp_msRun = other.msp_msRun;
44}

References msp_msRun.

◆ ~MsRunPeptideList()

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

Destructor

Definition at line 46 of file msrunpeptidelist.cpp.

47{
48}

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 439 of file msrunpeptidelist.cpp.

444{
445 MbrPeptideMeasurementsSp mbr_peptide_measurements =
446 std::make_shared<pappso::masschroq::MbrPeptideMeasurements>(peptide_sp);
447
448 m_mbrPeptideMeasurementsList.push_back(mbr_peptide_measurements);
449
450 mbr_peptide_measurements.get()->prepareMeasurements(
451 *(msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
452 msrun_group_p,
453 *(msp_msRunRetentionTime.get()),
454 quantification_method);
455 mbr_peptide_measurements.get()->pushBackXicCoordList(xic_coord_list);
456}
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 175 of file msrunpeptidelist.cpp.

180{
181 PeptideMeasurementsSp peptide_measurements =
182 std::make_shared<pappso::masschroq::PeptideMeasurements>(peptide_events_sp);
183
184 m_peptideMeasurementsList.push_back(peptide_measurements);
185
186 peptide_measurements.get()->prepareMeasurements(
187 *(msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
188 msrun_group_p,
189 quantification_method);
190 peptide_measurements.get()->pushBackXicCoordList(xic_coord_list);
191}
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 72 of file msrunpeptidelist.cpp.

77{
78
79 auto it = m_peptideObservationList.insert(
80 {peptide_sp.get(), std::make_shared<pappso::masschroq::PeptideObservation>(peptide_sp)});
82 msp_msRun.get()->getPrecursorSPtrByScanNumber(scan_number);
83 it.first->second.get()->addObservation({scan_number, charge, precursor_sp, false, p_label});
84
85 peptide_sp.get()->addMsRunXicCoordCharge({msp_msRun.get(),
86 precursor_sp.get()->getXicCoordSPtr(),
87 charge,
88 precursor_sp.get()->getIntensity()});
89 qDebug() << "m_peptideObservationList.size()=" << m_peptideObservationList.size();
90}
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 51 of file msrunpeptidelist.cpp.

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

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 244 of file msrunpeptidelist.cpp.

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

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 155 of file msrunpeptidelist.cpp.

158{
159 std::vector<pappso::XicCoordSPtr> xic_coord_list;
160
161 for(auto pair_peptide : m_peptideObservationList)
162 {
163 pappso::masschroq::PeptideObservationSp peptide_events_sp = pair_peptide.second;
164
166 msrun_group_p, quantification_method, pair_peptide.second, xic_coord_list);
167 // peptide_events_sp.get()
168 }
169
170
171 return xic_coord_list;
172}
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 514 of file msrunpeptidelist.cpp.

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

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 321 of file msrunpeptidelist.cpp.

323{
324 // collect only peptides that were selected for measurement in the first pass
326 {
327 try
328 {
329
330 pappso::masschroq::Peptide *peptide_p =
331 measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
332 peptide_p->setReferenceMsRunRetentionTimePtr(msrun_retention_time_reference_p);
334 *(measures.get()->getPeptideObservationSp().get()), *(msp_msRunRetentionTime.get()));
335 }
336 catch(const pappso::PappsoException &error)
337 {
338 throw pappso::PappsoException(
339 QObject::tr("error collecting MS2 retention time in msrun %1 :\n%2")
340 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId()->getXmlId())
341 .arg(error.qwhat()));
342 }
343 }
344}
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:251
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 293 of file msrunpeptidelist.cpp.

295{
297 {
298 try
299 {
300 pappso::masschroq::Peptide *peptide_p =
301 measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
302 peptide_p->setReferenceMsRunRetentionTimePtr(msrun_retention_time_reference_p);
303 for(auto &one_xic_measure : measures.get()->getMeasurementList())
304 {
305 peptide_p->addAlignedPeakMeasurement(one_xic_measure,
306 *(msp_msRunRetentionTime.get()));
307 }
308 }
309 catch(const pappso::PappsoException &error)
310 {
311 throw pappso::PappsoException(
312 QObject::tr("error collecting peak retention time in msrun %1 :\n%2")
313 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId()->getXmlId())
314 .arg(error.qwhat()));
315 }
316 }
317}
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 194 of file msrunpeptidelist.cpp.

196{
197
198 m_uiMonitor.appendText(QString("Detect and quantify peak"));
199 /*
200 for(auto &measure : m_peptideMeasurementsList)
201 {
202 measure->detectQuantifyPeaks(quantification_method);
203 }
204 */
205
206 std::function<void(const pappso::masschroq::PeptideMeasurementsSp &)> mapdetectQuantifyPeaks =
207 [quantification_method](const pappso::masschroq::PeptideMeasurementsSp &measure) {
208 measure->detectQuantifyPeaks(quantification_method);
209 };
210
211
212 QFuture<void> res =
213 QtConcurrent::map<std::vector<pappso::masschroq::PeptideMeasurementsSp>::iterator>(
214 m_peptideMeasurementsList.begin(), m_peptideMeasurementsList.end(), mapdetectQuantifyPeaks);
215 res.waitForFinished();
216
217
218 m_uiMonitor.appendText(QString("Detect and quantify peak done"));
219}
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 229 of file msrunpeptidelist.cpp.

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

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 496 of file msrunpeptidelist.cpp.

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

References msp_msRunRetentionTime.

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

◆ getMsRunRetentionTimePtr()

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

Definition at line 491 of file msrunpeptidelist.cpp.

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

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 459 of file msrunpeptidelist.cpp.

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

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 93 of file msrunpeptidelist.cpp.

97{
99 ui_monitor.appendText(
100 QString("Starting quantification for msrun %1")
101 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
102
103 qDebug() << m_peptideObservationList.size();
105
106 qDebug();
109
110 qDebug();
111 ui_monitor.appendText(QString("Preparing extraction list"));
112 std::vector<pappso::XicCoordSPtr> xic_coord_list =
113 buildXicCoordList(msrun_group_p, quantification_method);
114
115 ui_monitor.appendText(QString("Preparing extraction list done"));
116
117 ui_monitor.appendText(QString("Building XIC extractor"));
120 msp_msRun.get()->getMsRunReaderSPtr());
121
122 qDebug();
123 extractor_pwiz->setXicExtractMethod(quantification_method.get()->getXicExtractMethod());
124
125 // qWarning() << quantification_method.get()->getXicExtractionRtRange();
126
127 extractor_pwiz.get()->setRetentionTimeAroundTarget(
128 quantification_method.get()->getXicExtractionRtRange());
129
130 qDebug();
131 pappso::FilterInterfaceCstSPtr csp_filter_suite = quantification_method.get()->getXicFilter();
132
133 qDebug();
134 extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
135
136 qDebug();
137
138 ui_monitor.appendText(QString("Building XIC extractor done"));
139 ui_monitor.appendText(QString("Extracting"));
140 extractor_pwiz.get()->extractXicCoordSPtrListParallelized(ui_monitor, xic_coord_list);
141
142 // qWarning() << "size of first xic=" << xic_coord_list.at(0).get()->xicSptr.get()->size();
143 qDebug();
144
145 detectQuantifyPeaks(ui_monitor, quantification_method);
146
147
148 ui_monitor.appendText(
149 QString("Quantification for msrun %1 done")
150 .arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
151}
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 348 of file msrunpeptidelist.cpp.

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