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 MsRunSp & | getMsRunSp () 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::XicCoordSPtr > | buildXicCoordList (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 *, PeptideObservationSp > | m_peptideObservationList
std::vector< PeptideMeasurementsSp > | m_peptideMeasurementsList
std::shared_ptr< pappso::MsRunRetentionTime< QString > > | msp_msRunRetentionTime = nullptr
std::vector< MbrPeptideMeasurementsSp > | m_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.

{
msp_msRun = msrun;
}
pappso::masschroq::MsRunPeptideList::msp_msRun
MsRunSp msp_msRun
Definition msrunpeptidelist.h:160

References msp_msRun.

## MsRunPeptideList() [2/2]

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

Copy constructor

Parameters

  other | TODO

Definition at line 39 of file msrunpeptidelist.cpp.

{
msp_msRun = other.msp_msRun;
}

References msp_msRun.

## ~MsRunPeptideList()

pappso::masschroq::MsRunPeptideList::~MsRunPeptideList | ( |  | ) |

virtual

Destructor

Definition at line 45 of file msrunpeptidelist.cpp.

{
}

## 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.

{
MbrPeptideMeasurementsSp mbr_peptide_measurements =
std::make_shared<pappso::masschroq::MbrPeptideMeasurements>(peptide_sp);
m_mbrPeptideMeasurementsList.push_back(mbr_peptide_measurements);
mbr_peptide_measurements.get()->prepareMeasurements(
*(msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
msrun_group_p,
*(msp_msRunRetentionTime.get()),
quantification_method);
mbr_peptide_measurements.get()->pushBackXicCoordList(xic_coord_list);
}
pappso::masschroq::MsRunPeptideList::msp_msRunRetentionTime
std::shared_ptr< pappso::MsRunRetentionTime< QString > > msp_msRunRetentionTime
Definition msrunpeptidelist.h:166
pappso::masschroq::MsRunPeptideList::m_mbrPeptideMeasurementsList
std::vector< MbrPeptideMeasurementsSp > m_mbrPeptideMeasurementsList
Definition msrunpeptidelist.h:169
pappso::masschroq::MbrPeptideMeasurementsSp
std::shared_ptr< MbrPeptideMeasurements > MbrPeptideMeasurementsSp
Definition mbrpeptidemeasurements.h:44

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.

{
PeptideMeasurementsSp peptide_measurements =
std::make_shared<pappso::masschroq::PeptideMeasurements>(peptide_events_sp);
m_peptideMeasurementsList.push_back(peptide_measurements);
peptide_measurements.get()->prepareMeasurements(
*(msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
msrun_group_p,
quantification_method);
peptide_measurements.get()->pushBackXicCoordList(xic_coord_list);
}
pappso::masschroq::MsRunPeptideList::m_peptideMeasurementsList
std::vector< PeptideMeasurementsSp > m_peptideMeasurementsList
Definition msrunpeptidelist.h:164
pappso::masschroq::PeptideMeasurementsSp
std::shared_ptr< PeptideMeasurements > PeptideMeasurementsSp
Definition peptidemeasurements.h:50

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.

{
auto it = m_peptideObservationList.insert(
{peptide_sp.get(), std::make_shared<pappso::masschroq::PeptideObservation>(peptide_sp)});
pappso::masschroq::PrecursorSp precursor_sp =
msp_msRun.get()->getPrecursorSPtrByScanNumber(scan_number);
it.first->second.get()->addObservation({scan_number, charge, precursor_sp, false, p_label});
peptide_sp.get()->addMsRunXicCoordCharge({msp_msRun.get(),
precursor_sp.get()->getXicCoordSPtr(),
charge,
precursor_sp.get()->getIntensity()});
qDebug() << "m_peptideObservationList.size()=" << m_peptideObservationList.size();
}
pappso::masschroq::MsRunPeptideList::m_peptideObservationList
std::map< Peptide *, PeptideObservationSp > m_peptideObservationList
Definition msrunpeptidelist.h:162
pappso::masschroq::PrecursorSp
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.

{
auto it = m_peptideObservationList.insert(
{peptide_sp.get(), std::make_shared<pappso::masschroq::PeptideObservation>(peptide_sp)});
pappso::masschroq::PrecursorSp precursor_sp =
msp_msRun.get()->getPrecursorSPtrBySpectrumIndex(spectrum_index);
it.first->second.get()->addObservation({spectrum_index, charge, precursor_sp, true, p_label});
peptide_sp.get()->addMsRunXicCoordCharge({msp_msRun.get(),
precursor_sp.get()->getXicCoordSPtr(),
charge,
precursor_sp.get()->getIntensity()});
qDebug() << "m_peptideObservationList.size()=" << m_peptideObservationList.size();
}

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_method | parameters to use for alignment

Definition at line 243 of file msrunpeptidelist.cpp.

{
msp_msRunRetentionTime =
std::make_shared<pappso::MsRunRetentionTime<QString>>(msp_msRun->getRetentionTimeLine());
msp_msRunRetentionTime.get()->setMs2MedianFilter(
pappso::FilterMorphoMedian(alignment_method.get()->getMs2TendencyWindow()));
msp_msRunRetentionTime.get()->setMs2MeanFilter(
pappso::FilterMorphoMean(alignment_method.get()->getMs2SmoothingWindow()));
msp_msRunRetentionTime.get()->setMs1MeanFilter(
pappso::FilterMorphoMean(alignment_method.get()->getMs1SmoothingWindow()));
for(const auto &observation_pair : m_peptideObservationList)
{
QString peptide_id = observation_pair.first->getId();
for(std::uint8_t charge : observation_pair.second->getObservedChargeStates())
{
msp_msRunRetentionTime.get()->addPeptideAsSeamark(
QString("%1-%2").arg(peptide_id).arg(charge),
observation_pair.second.get()->getBestXicCoordSPtrForCharge(charge).get()->rtTarget,
1);
}
}
/*
for(auto &one_xic_measure : measures.get()->getMeasurementList())
{
if((one_xic_measure.m_peakQualityCategory ==
PeakQualityCategory::aa) ||
(one_xic_measure.m_peakQualityCategory == PeakQualityCategory::a))
{
msp_msRunRetentionTime.get()->addPeptideAsSeamark(
peptide_id,
one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().x,
one_xic_measure.m_tracePeakSp.get()->getMaxXicElement().y);
}
}
*/
msp_msRunRetentionTime.get()->computeSeamarks();
return msp_msRunRetentionTime;
}

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.

{
std::vector<pappso::XicCoordSPtr> xic_coord_list;
for(auto pair_peptide : m_peptideObservationList)
{
pappso::masschroq::PeptideObservationSp peptide_events_sp = pair_peptide.second;
addPeptideObservation2XicCoordList(
msrun_group_p, quantification_method, pair_peptide.second, xic_coord_list);
// peptide_events_sp.get()
}
return xic_coord_list;
}
pappso::masschroq::MsRunPeptideList::addPeptideObservation2XicCoordList
void addPeptideObservation2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideObservationSp &peptide_events_sp, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
Definition msrunpeptidelist.cpp:174
pappso::masschroq::PeptideObservationSp
std::shared_ptr< PeptideObservation > PeptideObservationSp
Definition peptidemeasurements.h:45

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.

{
for(auto &measure : m_peptideMeasurementsList)
{
measure.get()->flushXics();
}
for(auto &mbr_measure : m_mbrPeptideMeasurementsList)
{
mbr_measure.get()->flushXics();
}
}

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.

{
// collect only peptides that were selected for measurement in the first pass
for(const pappso::masschroq::PeptideMeasurementsSp &measures : m_peptideMeasurementsList)
{
try
{
pappso::masschroq::Peptide *peptide_p =
measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
peptide_p->setReferenceMsRunRetentionTimePtr(msrun_retention_time_reference_p);
peptide_p->addAlignedPeptideObservation(
*(measures.get()->getPeptideObservationSp().get()), *(msp_msRunRetentionTime.get()));
}
catch(const pappso::PappsoException &error)
{
throw pappso::PappsoException(
QObject::tr("error collecting MS2 retention time in msrun %1 :\n%2")
.arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId()->getXmlId())
.arg(error.qwhat()));
}
}
}
pappso::PappsoException::qwhat
virtual const QString & qwhat() const
Definition pappsoexception.h:66
pappso::masschroq::Peptide::setReferenceMsRunRetentionTimePtr
void setReferenceMsRunRetentionTimePtr(const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p)
sets the current msrun retention time reference
Definition peptide.cpp:252
pappso::masschroq::Peptide::addAlignedPeptideObservation
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.

{
for(const pappso::masschroq::PeptideMeasurementsSp &measures : m_peptideMeasurementsList)
{
try
{
pappso::masschroq::Peptide *peptide_p =
measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
peptide_p->setReferenceMsRunRetentionTimePtr(msrun_retention_time_reference_p);
for(auto &one_xic_measure : measures.get()->getMeasurementList())
{
peptide_p->addAlignedPeakMeasurement(one_xic_measure,
*(msp_msRunRetentionTime.get()));
}
}
catch(const pappso::PappsoException &error)
{
throw pappso::PappsoException(
QObject::tr("error collecting peak retention time in msrun %1 :\n%2")
.arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId()->getXmlId())
.arg(error.qwhat()));
}
}
}
pappso::masschroq::Peptide::addAlignedPeakMeasurement
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.

{
m_uiMonitor.appendText(QString("Detect and quantify peak"));
/*
for(auto &measure : m_peptideMeasurementsList)
{
measure->detectQuantifyPeaks(quantification_method);
}
*/
std::function<void(const pappso::masschroq::PeptideMeasurementsSp &)> mapdetectQuantifyPeaks =
[quantification_method](const pappso::masschroq::PeptideMeasurementsSp &measure) {
measure->detectQuantifyPeaks(quantification_method);
};
QFuture<void> res =
QtConcurrent::map<std::vector<pappso::masschroq::PeptideMeasurementsSp>::iterator>(
m_peptideMeasurementsList.begin(), m_peptideMeasurementsList.end(), mapdetectQuantifyPeaks);
res.waitForFinished();
m_uiMonitor.appendText(QString("Detect and quantify peak done"));
}
pappso::UiMonitorInterface::appendText
virtual void appendText(const QString &text)=0
append a text to a long report
pappso::Enums::PrecisionUnit::res
@ res
Definition types.h:100

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.

{
for(auto &measure : m_peptideMeasurementsList)
{
measure.get()->flushXics();
}
for(auto &mbr_measure : m_mbrPeptideMeasurementsList)
{
mbr_measure.get()->flushXics();
}
}

References m_mbrPeptideMeasurementsList, and m_peptideMeasurementsList.

## getMbrPeptideMeasurementsList()

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

Definition at line 507 of file msrunpeptidelist.cpp.

{
return m_mbrPeptideMeasurementsList;
}

References m_mbrPeptideMeasurementsList.

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

## getMsRunRetentionTimeConstPtr()

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

Definition at line 495 of file msrunpeptidelist.cpp.

{
return msp_msRunRetentionTime.get();
}

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.

{
return msp_msRunRetentionTime.get();
}

References msp_msRunRetentionTime.

## getMsRunSp()

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

Definition at line 222 of file msrunpeptidelist.cpp.

{
return msp_msRun;
}

References msp_msRun.

Referenced by pappso::masschroq::JsonInput::read_msrun_peptide_observations(), and pappso::masschroq::CborOutputStream::writeQrDataBlock().

## getPeptideMeasurementsList()

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

Definition at line 501 of file msrunpeptidelist.cpp.

{
return m_peptideMeasurementsList;
}

References m_peptideMeasurementsList.

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

## mbrDetectQuantifyPeaks()

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

private

Definition at line 458 of file msrunpeptidelist.cpp.

{
m_uiMonitor.appendText(QString("MBR Detect and quantify peak"));
/*
for(auto &measure : m_peptideMeasurementsList)
{
measure->detectQuantifyPeaks(quantification_method);
}
*/
std::function<void(const pappso::masschroq::MbrPeptideMeasurementsSp &)> mapdetectQuantifyPeaks =
[quantification_method](const pappso::masschroq::MbrPeptideMeasurementsSp &measure) {
measure->detectQuantifyPeaks(quantification_method);
};
QFuture<void> res =
QtConcurrent::map<std::vector<pappso::masschroq::MbrPeptideMeasurementsSp>::iterator>(
m_mbrPeptideMeasurementsList.begin(),
m_mbrPeptideMeasurementsList.end(),
mapdetectQuantifyPeaks);
res.waitForFinished();
m_uiMonitor.appendText(QString("Detect and quantify peak done"));
}

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.

{
m_peptideMeasurementsList.clear();
ui_monitor.appendText(
QString("Starting quantification for msrun %1")
.arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
qDebug() << m_peptideObservationList.size();
pappso::MsRunXicExtractorFactory::getInstance().setTmpDir(tmp_dir);
qDebug();
pappso::MsRunXicExtractorFactory::getInstance().setMsRunXicExtractorFactoryType(
pappso::MsRunXicExtractorFactoryType::diskbuffer);
qDebug();
ui_monitor.appendText(QString("Preparing extraction list"));
std::vector<pappso::XicCoordSPtr> xic_coord_list =
buildXicCoordList(msrun_group_p, quantification_method);
ui_monitor.appendText(QString("Preparing extraction list done"));
ui_monitor.appendText(QString("Building XIC extractor"));
pappso::MsRunXicExtractorInterfaceSp extractor_pwiz =
pappso::MsRunXicExtractorFactory::getInstance().buildMsRunXicExtractorSp(
msp_msRun.get()->getMsRunReaderSPtr());
qDebug();
extractor_pwiz->setXicExtractMethod(quantification_method.get()->getXicExtractMethod());
// qWarning() << quantification_method.get()->getXicExtractionRtRange();
extractor_pwiz.get()->setRetentionTimeAroundTarget(
quantification_method.get()->getXicExtractionRtRange());
qDebug();
pappso::FilterInterfaceCstSPtr csp_filter_suite = quantification_method.get()->getXicFilter();
qDebug();
extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
qDebug();
ui_monitor.appendText(QString("Building XIC extractor done"));
ui_monitor.appendText(QString("Extracting"));
extractor_pwiz.get()->extractXicCoordSPtrListParallelized(ui_monitor, xic_coord_list);
// qWarning() << "size of first xic=" << xic_coord_list.at(0).get()->xicSptr.get()->size();
qDebug();
detectQuantifyPeaks(ui_monitor, quantification_method);
ui_monitor.appendText(
QString("Quantification for msrun %1 done")
.arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
}
pappso::MsRunXicExtractorFactory::setTmpDir
void setTmpDir(const QString &dir_name)
set the temporary working directory
Definition msrunxicextractorfactory.cpp:59
pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorSp
MsRunXicExtractorInterfaceSp buildMsRunXicExtractorSp(MsRunReaderSPtr &msrun_reader) const
build a simple XIC extractor that directly uses Proeowizard library to read and extract XICs building...
Definition msrunxicextractorfactory.cpp:70
pappso::MsRunXicExtractorFactory::getInstance
static MsRunXicExtractorFactory & getInstance()
singleton to get the only instance of the factory
Definition msrunxicextractorfactory.cpp:45
pappso::MsRunXicExtractorFactory::setMsRunXicExtractorFactoryType
void setMsRunXicExtractorFactoryType(pappso::MsRunXicExtractorFactoryType type)
sets the xic extractor type
Definition msrunxicextractorfactory.cpp:64
pappso::masschroq::MsRunPeptideList::detectQuantifyPeaks
void detectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
Definition msrunpeptidelist.cpp:193
pappso::masschroq::MsRunPeptideList::buildXicCoordList
std::vector< pappso::XicCoordSPtr > buildXicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
Definition msrunpeptidelist.cpp:154
pappso::MsRunXicExtractorFactoryType::diskbuffer
@ diskbuffer
Definition msrunxicextractorfactory.h:55
pappso::FilterInterfaceCstSPtr
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
Definition filterinterface.h:47
pappso::MsRunXicExtractorInterfaceSp
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp
Definition msrunxicextractorinterface.h:42

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.

{
try
{
m_peptideMeasurementsList.clear();
ui_monitor.appendText(
QString("Starting quantification for msrun %1 (MBR)")
.arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
qDebug();
pappso::MsRunXicExtractorFactory::getInstance().setTmpDir(tmp_dir);
qDebug();
pappso::MsRunXicExtractorFactory::getInstance().setMsRunXicExtractorFactoryType(
pappso::MsRunXicExtractorFactoryType::diskbuffer);
qDebug();
ui_monitor.appendText(
QString("MBR Preparing extraction list (%1)").arg(peptide_mbr_list.size()));
std::vector<pappso::XicCoordSPtr> xic_coord_list;
for(auto &peptide_sp : peptide_mbr_list)
{
/*
pappso::masschroq::PeptideObservationSp peptide_events_sp = pair_peptide.second;
addPeptideObservation2XicCoordList(quantification_method,
pair_peptide.second,
xic_coord_list,
ni_minimum_abundance);
*/
addMbrPeptideMeasurementsSp2XicCoordList(
msrun_group_p, quantification_method, peptide_sp, xic_coord_list);
// peptide_events_sp.get()
}
ui_monitor.appendText(QString("MBR Preparing extraction list done (%1 %2)")
.arg(m_mbrPeptideMeasurementsList.size())
.arg(xic_coord_list.size()));
ui_monitor.appendText(QString("MBR Building XIC extractor"));
pappso::MsRunXicExtractorInterfaceSp extractor_pwiz =
pappso::MsRunXicExtractorFactory::getInstance().buildMsRunXicExtractorSp(
msp_msRun.get()->getMsRunReaderSPtr());
qDebug();
extractor_pwiz->setXicExtractMethod(quantification_method.get()->getXicExtractMethod());
qDebug();
extractor_pwiz.get()->setRetentionTimeAroundTarget(
quantification_method.get()->getXicExtractionRtRange());
qDebug();
pappso::FilterInterfaceCstSPtr csp_filter_suite = quantification_method.get()->getXicFilter();
qDebug();
extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
qDebug();
ui_monitor.appendText(QString("MBR Building XIC extractor done"));
ui_monitor.appendText(QString("MBR Extracting"));
extractor_pwiz.get()->extractXicCoordSPtrListParallelized(ui_monitor, xic_coord_list);
qDebug();
mbrDetectQuantifyPeaks(ui_monitor, quantification_method);
ui_monitor.appendText(
QString("MBR Quantification for msrun %1 done")
.arg(msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
}
catch(const pappso::PappsoException &error)
{
throw pappso::PappsoException(
QObject::tr("error in %1 :\n%2").arg(__FUNCTION__).arg(error.qwhat()));
}
}
pappso::masschroq::MsRunPeptideList::addMbrPeptideMeasurementsSp2XicCoordList
void addMbrPeptideMeasurementsSp2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideSp &peptide, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
Definition msrunpeptidelist.cpp:438
pappso::masschroq::MsRunPeptideList::mbrDetectQuantifyPeaks
void mbrDetectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
Definition msrunpeptidelist.cpp:458

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

Definition at line 169 of file msrunpeptidelist.h.

Referenced by addMbrPeptideMeasurementsSp2XicCoordList(), clearMeasurements(), flushChromatogramTraces(), getMbrPeptideMeasurementsList(), mbrDetectQuantifyPeaks(), and quantifyMatchBetweenRun().

## m_peptideMeasurementsList

std::vector<PeptideMeasurementsSp> pappso::masschroq::MsRunPeptideList::m_peptideMeasurementsList

private

Definition at line 164 of file msrunpeptidelist.h.

Referenced by addPeptideObservation2XicCoordList(), clearMeasurements(), collectPeptideMs2RetentionTime(), collectPeptidePeakRetentionTime(), detectQuantifyPeaks(), flushChromatogramTraces(), getPeptideMeasurementsList(), quantify(), and quantifyMatchBetweenRun().

## m_peptideObservationList

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

private

Definition at line 162 of file msrunpeptidelist.h.

Referenced by addPeptideScanNumberObservation(), addPeptideSpectrumIndexObservation(), buildMsRunRetentionTimeSpOnPeptideObservations(), buildXicCoordList(), and quantify().

## msp_msRun

MsRunSp pappso::masschroq::MsRunPeptideList::msp_msRun

private

Definition at line 160 of file msrunpeptidelist.h.

Referenced by MsRunPeptideList(), MsRunPeptideList(), addMbrPeptideMeasurementsSp2XicCoordList(), addPeptideObservation2XicCoordList(), addPeptideScanNumberObservation(), addPeptideSpectrumIndexObservation(), buildMsRunRetentionTimeSpOnPeptideObservations(), collectPeptideMs2RetentionTime(), collectPeptidePeakRetentionTime(), getMsRunSp(), quantify(), and quantifyMatchBetweenRun().

## msp_msRunRetentionTime

std::shared_ptr<pappso::MsRunRetentionTime<QString> > pappso::masschroq::MsRunPeptideList::msp_msRunRetentionTime = nullptr

private

Definition at line 166 of file msrunpeptidelist.h.

Referenced by addMbrPeptideMeasurementsSp2XicCoordList(), buildMsRunRetentionTimeSpOnPeptideObservations(), collectPeptideMs2RetentionTime(), collectPeptidePeakRetentionTime(), getMsRunRetentionTimeConstPtr(), and getMsRunRetentionTimePtr().

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

- pappsomspp/core/masschroq/msrunpeptidelist.h
- pappsomspp/core/masschroq/msrunpeptidelist.cpp