libpappsomspp
Library for mass spectrometry
|
#include <msrunretentiontime.h>
Classes | |
struct | PeptideMs2Point |
Public Member Functions | |
MsRunRetentionTime (MsRunReaderSPtr msrun_reader_sp) | |
MsRunRetentionTime (const MsRunRetentionTime< T > &other) | |
~MsRunRetentionTime () | |
pappso::MsRunReaderSPtr | getMsRunReaderSPtr () const |
const MsRunId & | getMsRunId () const |
void | setMs2MedianFilter (const FilterMorphoMedian &ms2MedianFilter) |
void | setMs2MeanFilter (const FilterMorphoMean &ms2MeanFilter) |
void | setMs1MeanFilter (const FilterMorphoMean &ms1MeanFilter) |
const FilterMorphoMedian & | getMs2MedianFilter () const |
const FilterMorphoMean & | getMs2MeanFilter () const |
const FilterMorphoMean & | getMs1MeanFilter () const |
Trace | getCommonDeltaRt (const std::vector< MsRunRetentionTimeSeamarkPoint< T >> &other_seamarks) const |
void | addPeptideAsSeamark (const T &peptide_id, std::size_t ms2_spectrum_index) |
collects all peptide evidences of a given MSrun seamarks has to be converted to peptide retention time using computePeptideRetentionTimes More... | |
void | addPeptideAsSeamark (const T &peptide_id, double retentionTime, double precursorIntensity) |
collects all peptide evidences of a given MSrun seamarks has to be converted to peptide retention time using computePeptideRetentionTimes More... | |
std::size_t | getNumberOfCorrectedValues () const |
Trace | align (const MsRunRetentionTime< T > &msrun_retention_time_reference) |
align the current msrunretentiontime object using the given reference More... | |
Trace | getCommonSeamarksDeltaRt (const MsRunRetentionTime< T > &msrun_retention_time_reference) const |
get common seamarks between msrunretentiontime objects and their deltart More... | |
const std::vector< MsRunRetentionTimeSeamarkPoint< T > > & | getSeamarks () const |
const std::vector< double > & | getAlignedRetentionTimeVector () const |
get aligned retention time vector More... | |
void | setAlignedRetentionTimeVector (const std::vector< double > &aligned_times) |
const std::vector< double > & | getMs1RetentionTimeVector () const |
get orginal retention time vector (not aligned) More... | |
bool | isAligned () const |
double | translateOriginal2AlignedRetentionTime (double original_retention_time) const |
double | translateAligned2OriginalRetentionTime (double aligned_retention_time) const |
void | computeSeamarks () |
convert PeptideMs2Point into Peptide seamarks this is required before computing alignment More... | |
Protected Member Functions | |
double | getFrontRetentionTimeReference () const |
double | getBackRetentionTimeReference () const |
const std::vector< MsRunRetentionTimeSeamarkPoint< T > > | getSeamarksReferences () const |
Private Types | |
enum class | ComputeRetentionTimeReference { maximum_intensity , weighted_intensity , last } |
Private Member Functions | |
void | getCommonDeltaRt (Trace &delta_rt, const std::vector< MsRunRetentionTimeSeamarkPoint< T >> &other_seamarks) const |
get a trace of common MS2 retention times (x values) by their deltart (y values) More... | |
void | correctNewTimeValues (Trace &ms1_aligned_points, double correction_parameter) |
void | linearRegressionMs2toMs1 (Trace &ms1_aligned_points, const Trace &common_points) |
Private Attributes | |
FilterMorphoMedian | m_ms2MedianFilter |
FilterMorphoMean | m_ms2MeanFilter |
FilterMorphoMean | m_ms1MeanFilter |
pappso::MsRunReaderSPtr | msp_msrunReader |
pappso::MsRunIdCstSPtr | mcsp_msrunId |
std::vector< double > | m_ms1RetentionTimeVector |
std::vector< double > | m_alignedRetentionTimeVector |
std::vector< MsRunRetentionTimeSeamarkPoint< T > > | m_seamarks |
std::size_t | m_valuesCorrected = 0 |
std::vector< PeptideMs2Point > | m_allMs2Points |
ComputeRetentionTimeReference | m_retentionTimeReferenceMethod |
Definition at line 42 of file msrunretentiontime.h.
|
strongprivate |
Enumerator | |
---|---|
maximum_intensity | |
weighted_intensity | |
last |
Definition at line 52 of file msrunretentiontime.h.
MsRunRetentionTime::MsRunRetentionTime | ( | MsRunReaderSPtr | msrun_reader_sp | ) |
Definition at line 37 of file msrunretentiontime.cpp.
References pappso::a, pappso::b, pappso::MsRunRetentionTime< T >::m_ms1RetentionTimeVector, pappso::MsRunRetentionTime< T >::mcsp_msrunId, and pappso::MsRunRetentionTime< T >::msp_msrunReader.
MsRunRetentionTime::MsRunRetentionTime | ( | const MsRunRetentionTime< T > & | other | ) |
Definition at line 51 of file msrunretentiontime.cpp.
References pappso::MsRunRetentionTime< T >::m_alignedRetentionTimeVector, pappso::MsRunRetentionTime< T >::m_allMs2Points, pappso::MsRunRetentionTime< T >::m_ms1RetentionTimeVector, pappso::MsRunRetentionTime< T >::m_retentionTimeReferenceMethod, pappso::MsRunRetentionTime< T >::m_seamarks, pappso::MsRunRetentionTime< T >::m_valuesCorrected, pappso::MsRunRetentionTime< T >::mcsp_msrunId, and pappso::MsRunRetentionTime< T >::msp_msrunReader.
MsRunRetentionTime::~MsRunRetentionTime |
Definition at line 70 of file msrunretentiontime.cpp.
void MsRunRetentionTime::addPeptideAsSeamark | ( | const T & | peptide_id, |
double | retentionTime, | ||
double | precursorIntensity | ||
) |
collects all peptide evidences of a given MSrun seamarks has to be converted to peptide retention time using computePeptideRetentionTimes
peptide_id | unique identifier (whichever type) of a peptide |
retentionTime | retention time of this peptide observation |
precursorIntensity | MS2 precursorIntensity of this peptide |
Definition at line 187 of file msrunretentiontime.cpp.
References pappso::MsRunRetentionTime< T >::PeptideMs2Point::entityHash, pappso::MsRunRetentionTime< T >::PeptideMs2Point::precursorIntensity, and pappso::MsRunRetentionTime< T >::PeptideMs2Point::retentionTime.
void MsRunRetentionTime::addPeptideAsSeamark | ( | const T & | peptide_id, |
std::size_t | ms2_spectrum_index | ||
) |
collects all peptide evidences of a given MSrun seamarks has to be converted to peptide retention time using computePeptideRetentionTimes
peptide_id | unique identifier (whichever type) of a peptide |
ms2_spectrum_index | associated MS2 spectrum index ot this peptide |
Definition at line 165 of file msrunretentiontime.cpp.
References pappso::MsRunRetentionTime< T >::PeptideMs2Point::entityHash, pappso::QualifiedMassSpectrum::getPrecursorIntensity(), pappso::QualifiedMassSpectrum::getRtInSeconds(), pappso::MsRunRetentionTime< T >::PeptideMs2Point::precursorIntensity, and pappso::MsRunRetentionTime< T >::PeptideMs2Point::retentionTime.
Trace MsRunRetentionTime::align | ( | const MsRunRetentionTime< T > & | msrun_retention_time_reference | ) |
align the current msrunretentiontime object using the given reference
msrun_retention_time_reference | the reference |
Definition at line 456 of file msrunretentiontime.cpp.
References pappso::Trace::filter(), pappso::MsRunRetentionTime< T >::getBackRetentionTimeReference(), pappso::MsRunRetentionTime< T >::getFrontRetentionTimeReference(), pappso::MsRunRetentionTime< T >::getSeamarks(), pappso::MsRunRetentionTime< T >::getSeamarksReferences(), pappso::MsRunRetentionTime< T >::isAligned(), pappso::Trace::sortX(), pappso::DataPoint::x, pappso::DataPoint::y, and pappso::Trace::yValues().
void MsRunRetentionTime::computeSeamarks |
convert PeptideMs2Point into Peptide seamarks this is required before computing alignment
Definition at line 201 of file msrunretentiontime.cpp.
|
private |
Definition at line 614 of file msrunretentiontime.cpp.
const std::vector< double > & MsRunRetentionTime::getAlignedRetentionTimeVector |
get aligned retention time vector
Definition at line 135 of file msrunretentiontime.cpp.
|
protected |
Definition at line 321 of file msrunretentiontime.cpp.
Referenced by pappso::MsRunRetentionTime< T >::align().
Trace MsRunRetentionTime::getCommonDeltaRt | ( | const std::vector< MsRunRetentionTimeSeamarkPoint< T >> & | other_seamarks | ) | const |
Definition at line 155 of file msrunretentiontime.cpp.
|
private |
get a trace of common MS2 retention times (x values) by their deltart (y values)
delta_rt | the trace result (common MS2 retention times vs counter part deltart) |
other_seamarks | seamarks of the counter part (reference) |
Definition at line 254 of file msrunretentiontime.cpp.
References pappso::Trace::sortX(), and pappso::Trace::unique().
Trace MsRunRetentionTime::getCommonSeamarksDeltaRt | ( | const MsRunRetentionTime< T > & | msrun_retention_time_reference | ) | const |
get common seamarks between msrunretentiontime objects and their deltart
msrun_retention_time_reference | the reference |
Definition at line 683 of file msrunretentiontime.cpp.
References pappso::MsRunRetentionTime< T >::getSeamarks(), pappso::MsRunRetentionTime< T >::getSeamarksReferences(), and pappso::MsRunRetentionTime< T >::isAligned().
|
protected |
Definition at line 311 of file msrunretentiontime.cpp.
Referenced by pappso::MsRunRetentionTime< T >::align().
const pappso::FilterMorphoMean & pappso::MsRunRetentionTime< T >::getMs1MeanFilter |
Definition at line 113 of file msrunretentiontime.cpp.
const std::vector< double > & MsRunRetentionTime::getMs1RetentionTimeVector |
get orginal retention time vector (not aligned)
Definition at line 148 of file msrunretentiontime.cpp.
const pappso::FilterMorphoMean & pappso::MsRunRetentionTime< T >::getMs2MeanFilter |
Definition at line 98 of file msrunretentiontime.cpp.
const pappso::FilterMorphoMedian & pappso::MsRunRetentionTime< T >::getMs2MedianFilter |
Definition at line 83 of file msrunretentiontime.cpp.
const MsRunId & MsRunRetentionTime::getMsRunId |
Definition at line 76 of file msrunretentiontime.cpp.
pappso::MsRunReaderSPtr pappso::MsRunRetentionTime< T >::getMsRunReaderSPtr |
Definition at line 635 of file msrunretentiontime.cpp.
std::size_t MsRunRetentionTime::getNumberOfCorrectedValues |
Definition at line 142 of file msrunretentiontime.cpp.
const std::vector< MsRunRetentionTimeSeamarkPoint< T > > & MsRunRetentionTime::getSeamarks |
Definition at line 127 of file msrunretentiontime.cpp.
Referenced by pappso::MsRunRetentionTime< T >::align(), and pappso::MsRunRetentionTime< T >::getCommonSeamarksDeltaRt().
|
protected |
Definition at line 436 of file msrunretentiontime.cpp.
Referenced by pappso::MsRunRetentionTime< T >::align(), and pappso::MsRunRetentionTime< T >::getCommonSeamarksDeltaRt().
bool MsRunRetentionTime::isAligned |
Definition at line 449 of file msrunretentiontime.cpp.
Referenced by pappso::MsRunRetentionTime< T >::align(), and pappso::MsRunRetentionTime< T >::getCommonSeamarksDeltaRt().
|
private |
Definition at line 561 of file msrunretentiontime.cpp.
References pappso::DataPoint::x, and pappso::DataPoint::y.
void pappso::MsRunRetentionTime< T >::setAlignedRetentionTimeVector | ( | const std::vector< double > & | aligned_times | ) |
Definition at line 642 of file msrunretentiontime.cpp.
void MsRunRetentionTime::setMs1MeanFilter | ( | const FilterMorphoMean & | ms1MeanFilter | ) |
Definition at line 120 of file msrunretentiontime.cpp.
void MsRunRetentionTime::setMs2MeanFilter | ( | const FilterMorphoMean & | ms2MeanFilter | ) |
Definition at line 106 of file msrunretentiontime.cpp.
void MsRunRetentionTime::setMs2MedianFilter | ( | const FilterMorphoMedian & | ms2MedianFilter | ) |
Definition at line 90 of file msrunretentiontime.cpp.
double MsRunRetentionTime::translateAligned2OriginalRetentionTime | ( | double | aligned_retention_time | ) | const |
Definition at line 385 of file msrunretentiontime.cpp.
double MsRunRetentionTime::translateOriginal2AlignedRetentionTime | ( | double | original_retention_time | ) | const |
Definition at line 333 of file msrunretentiontime.cpp.
|
private |
Definition at line 175 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 180 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 171 of file msrunretentiontime.h.
|
private |
Definition at line 174 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 170 of file msrunretentiontime.h.
|
private |
Definition at line 169 of file msrunretentiontime.h.
|
private |
Definition at line 182 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 177 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 178 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 173 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().
|
private |
Definition at line 172 of file msrunretentiontime.h.
Referenced by pappso::MsRunRetentionTime< T >::MsRunRetentionTime().