32#include <QtConcurrent> 
   54  std::size_t spectrum_index,
 
   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});
 
 
   75  std::size_t scan_number,
 
   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});
 
 
   94                                              const QString &tmp_dir,
 
  100    QString(
"Starting quantification for msrun %1")
 
  101      .arg(
msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
 
  111  ui_monitor.
appendText(QString(
"Preparing extraction list"));
 
  112  std::vector<pappso::XicCoordSPtr> xic_coord_list =
 
  115  ui_monitor.
appendText(QString(
"Preparing extraction list done"));
 
  117  ui_monitor.
appendText(QString(
"Building XIC extractor"));
 
  127  extractor_pwiz.get()->setRetentionTimeAroundTarget(
 
  134  extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
 
  138  ui_monitor.
appendText(QString(
"Building XIC extractor done"));
 
  140  extractor_pwiz.get()->extractXicCoordSPtrListParallelized(ui_monitor, xic_coord_list);
 
  149    QString(
"Quantification for msrun %1 done")
 
  150      .arg(
msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
 
 
  154std::vector<pappso::XicCoordSPtr>
 
  159  std::vector<pappso::XicCoordSPtr> xic_coord_list;
 
  166        msrun_group_p, quantification_method, pair_peptide.second, xic_coord_list);
 
  171  return xic_coord_list;
 
 
  179  std::vector<pappso::XicCoordSPtr> &xic_coord_list)
 
  182    std::make_shared<pappso::masschroq::PeptideMeasurements>(peptide_events_sp);
 
  187    *(
msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
 
  189    quantification_method);
 
 
  198  m_uiMonitor.
appendText(QString(
"Detect and quantify peak"));
 
  208      measure->detectQuantifyPeaks(quantification_method);
 
  213    QtConcurrent::map<std::vector<pappso::masschroq::PeptideMeasurementsSp>::iterator>(
 
  215  res.waitForFinished();
 
  218  m_uiMonitor.
appendText(QString(
"Detect and quantify peak done"));
 
 
  234      measure.get()->flushXics();
 
  239      mbr_measure.get()->flushXics();
 
 
  243std::shared_ptr<pappso::MsRunRetentionTime<QString>> &
 
  248    std::make_shared<pappso::MsRunRetentionTime<QString>>(
msp_msRun->getRetentionTimeLine());
 
  260      QString peptide_id = observation_pair.first->getId();
 
  262      for(std::uint8_t charge : observation_pair.second->getObservedChargeStates())
 
  266            QString(
"%1-%2").arg(peptide_id).arg(charge),
 
  267            observation_pair.second.get()->getBestXicCoordSPtrForCharge(charge).get()->rtTarget,
 
 
  301            measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
 
  303          for(
auto &one_xic_measure : measures.get()->getMeasurementList())
 
  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()));
 
 
  331            measures.get()->getPeptideObservationSp().get()->getPeptideSp().get();
 
  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()));
 
 
  350  const std::vector<pappso::masschroq::PeptideSp> &peptide_mbr_list,
 
  351  const QString &tmp_dir,
 
  359        QString(
"Starting quantification for msrun %1 (MBR)")
 
  360          .arg(
msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
 
  371        QString(
"MBR Preparing extraction list (%1)").arg(peptide_mbr_list.size()));
 
  374      std::vector<pappso::XicCoordSPtr> xic_coord_list;
 
  376      for(
auto &peptide_sp : peptide_mbr_list)
 
  387            msrun_group_p, quantification_method, peptide_sp, xic_coord_list);
 
  392      ui_monitor.
appendText(QString(
"MBR Preparing extraction list done (%1 %2)")
 
  394                             .arg(xic_coord_list.size()));
 
  396      ui_monitor.
appendText(QString(
"MBR Building XIC extractor"));
 
  406      extractor_pwiz.get()->setRetentionTimeAroundTarget(
 
  413      extractor_pwiz.get()->setPostExtractionTraceFilterCstSPtr(csp_filter_suite);
 
  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);
 
  427        QString(
"MBR Quantification for msrun %1 done")
 
  428          .arg(
msp_msRun.get()->getMsRunReaderSPtr()->getMsRunId().get()->getFileName()));
 
  433        QObject::tr(
"error in %1 :\n%2").arg(__FUNCTION__).arg(error.
qwhat()));
 
 
  443  std::vector<pappso::XicCoordSPtr> &xic_coord_list)
 
  446    std::make_shared<pappso::masschroq::MbrPeptideMeasurements>(peptide_sp);
 
  451    *(
msp_msRun.get()->getMsRunReaderSPtr().get()->getMsRunId().get()),
 
  454    quantification_method);
 
 
  464  m_uiMonitor.
appendText(QString(
"MBR Detect and quantify peak"));
 
  474      measure->detectQuantifyPeaks(quantification_method);
 
  479    QtConcurrent::map<std::vector<pappso::masschroq::MbrPeptideMeasurementsSp>::iterator>(
 
  482      mapdetectQuantifyPeaks);
 
  483  res.waitForFinished();
 
  486  m_uiMonitor.
appendText(QString(
"Detect and quantify peak done"));
 
 
  501const std::vector<pappso::masschroq::PeptideMeasurementsSp> &
 
  507const std::vector<pappso::masschroq::MbrPeptideMeasurementsSp> &
 
  519      measure.get()->flushXics();
 
  524      mbr_measure.get()->flushXics();
 
 
mean filter apply mean of y values inside the window : this results in a kind of smoothing
 
virtual const QString & qwhat() const
 
virtual void appendText(const QString &text)=0
append a text to a long report
 
std::uint8_t getMs2SmoothingWindow() const
 
std::uint8_t getMs1SmoothingWindow() const
 
std::uint8_t getMs2TendencyWindow() const
 
void prepareMeasurements(const pappso::MsRunId &targeted_msrun, const MsRunGroup *msrun_group_p, const pappso::MsRunRetentionTime< QString > &msrun_retention_time, const QuantificationMethodSp &quantification_method)
 
std::vector< PeptideMeasurementsSp > m_peptideMeasurementsList
 
void addMbrPeptideMeasurementsSp2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideSp &peptide, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
 
void quantify(const MsRunGroup *msrun_group_p, const QString &tmp_dir, pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
 
void detectQuantifyPeaks(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)
 
std::map< Peptide *, PeptideObservationSp > m_peptideObservationList
 
const std::vector< MbrPeptideMeasurementsSp > & getMbrPeptideMeasurementsList() const
 
const MsRunSp & getMsRunSp() const
 
std::shared_ptr< pappso::MsRunRetentionTime< QString > > msp_msRunRetentionTime
 
std::vector< MbrPeptideMeasurementsSp > m_mbrPeptideMeasurementsList
 
MsRunPeptideList(MsRunSp msrun)
 
std::vector< pappso::XicCoordSPtr > buildXicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
 
virtual ~MsRunPeptideList()
 
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 ti...
 
void addPeptideScanNumberObservation(PeptideSp peptide_sp, PeptideLabel *p_label, std::size_t spectrum_index, std::uint8_t charge)
 
std::shared_ptr< pappso::MsRunRetentionTime< QString > > & buildMsRunRetentionTimeSpOnPeptideObservations(const AlignmentMethodSp &alignment_method)
build a retention time vector with seamarks using MS2 best intensities
 
void flushChromatogramTraces()
 
void addPeptideObservation2XicCoordList(const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method, const PeptideObservationSp &peptide_events_sp, std::vector< pappso::XicCoordSPtr > &xic_coord_list)
 
pappso::MsRunRetentionTime< QString > * getMsRunRetentionTimePtr() const
 
void addPeptideSpectrumIndexObservation(PeptideSp peptide_sp, PeptideLabel *p_label, std::size_t spectrum_index, std::uint8_t charge)
 
void mbrDetectQuantifyPeaks(pappso::UiMonitorInterface &m_uiMonitor, const QuantificationMethodSp &quantification_method)
 
void clearMeasurements()
clear all measurements MBR or not Clearing measurements also removes every chromatogram
 
const std::vector< PeptideMeasurementsSp > & getPeptideMeasurementsList() const
 
const pappso::MsRunRetentionTime< QString > * getMsRunRetentionTimeConstPtr() const
 
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 re...
 
virtual void pushBackXicCoordList(std::vector< pappso::XicCoordSPtr > &xic_coord_list) const final
 
void prepareMeasurements(const pappso::MsRunId &targeted_msrun, const MsRunGroup *msrun_group_p, const QuantificationMethodSp &quantification_method)
 
void addMsRunXicCoordCharge(const MsRunXicCoordCharge &msrun_xic_coord)
 
void setReferenceMsRunRetentionTimePtr(const pappso::MsRunRetentionTime< QString > *msrun_retention_time_reference_p)
sets the current msrun retention time reference
 
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...
 
void addAlignedPeakMeasurement(const PeptideMeasurements::Measurement &one_xic_measure, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
accumulate retention time information for MS1 peak measurement
 
const pappso::XicCoordSPtr & getXicCoordSPtr() const
 
double getIntensity() const
 
Enums::XicExtractMethod getXicExtractMethod() const
 
double getXicExtractionRtRange() const
 
const pappso::FilterNameInterfaceSPtr getXicFilter() const
 
std::shared_ptr< QuantificationMethod > QuantificationMethodSp
 
std::shared_ptr< PeptideMeasurements > PeptideMeasurementsSp
 
std::shared_ptr< AlignmentMethod > AlignmentMethodSp
 
std::shared_ptr< MbrPeptideMeasurements > MbrPeptideMeasurementsSp
 
std::shared_ptr< Peptide > PeptideSp
 
std::shared_ptr< Precursor > PrecursorSp
 
std::shared_ptr< PeptideObservation > PeptideObservationSp
 
std::shared_ptr< MsRun > MsRunSp
 
std::shared_ptr< const FilterInterface > FilterInterfaceCstSPtr
 
std::shared_ptr< MsRunXicExtractorInterface > MsRunXicExtractorInterfaceSp