libpappsomspp
Library for mass spectrometry
|
#include <spectralalignment.h>
Public Member Functions | |
SpectralAlignment (ScoreValues score_values, pappso::PrecisionPtr precision_ptr) | |
~SpectralAlignment () | |
void | align (PeptideSpectraCsp peptide_spectrum, ExperimentalSpectrumCsp experimental_spectrum) |
const matrix< SpectralAlignmentDataPoint > & | getMatrix () const |
std::vector< int > | getScoreRow (std::size_t row_indice) const |
int | getMaxScore () const |
boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 | getMaxPosIterator () const |
double | getPrecursorMzDelta () const |
QString | backTrack () const |
PeptideModel | buildPeptideModel () const |
ExperimentalSpectrumCsp | getExperimentalSpectrumCsp () const |
PeptideSpectraCsp | getPeptideSpectraCsp () const |
Private Member Functions | |
const ExperimentalSpectrumDataPoint & | getExperimentalSpectrumDataPoint (const boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 &itpos) const |
void | fillMassDelta (const PeptideSpectrum &peptide_spectrum, const ExperimentalSpectrum &experimental_spectrum) |
void | fillMatricesWithScores (const boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 &it_pos, const PeptideSpectrum &peptide_spectrum, const ExperimentalSpectrum &experimental_spectrum) |
SpectralAlignmentDataPoint | getBestRealignScore (const boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 &it_pos, std::size_t expeIndicesK, int reAlignScore, int alignScoreToAdd) |
Private Attributes | |
ExperimentalSpectrumCsp | mcsp_experimentalSpectrum |
PeptideSpectraCsp | mcsp_peptideSpectrum |
matrix< SpectralAlignmentDataPoint > | m_matrix |
pappso::PrecisionPtr | m_precisionPtr |
ScoreValues | m_scoreValues |
int | m_maxScore |
boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 | m_itPosMax |
double | m_precursorMassDelta |
bool | m_BETTER_END_RA = false |
Definition at line 64 of file spectralalignment.h.
pappso::specglob::SpectralAlignment::SpectralAlignment | ( | ScoreValues | score_values, |
pappso::PrecisionPtr | precision_ptr | ||
) |
Default constructor
Definition at line 47 of file spectralalignment.cpp.
References m_precisionPtr, and m_scoreValues.
pappso::specglob::SpectralAlignment::~SpectralAlignment | ( | ) |
void pappso::specglob::SpectralAlignment::align | ( | PeptideSpectraCsp | peptide_spectrum, |
ExperimentalSpectrumCsp | experimental_spectrum | ||
) |
Definition at line 71 of file spectralalignment.cpp.
References fillMassDelta(), fillMatricesWithScores(), pappso::specglob::ScoreValues::get(), m_itPosMax, m_matrix, m_maxScore, m_precursorMassDelta, mcsp_experimentalSpectrum, and mcsp_peptideSpectrum.
QString pappso::specglob::SpectralAlignment::backTrack | ( | ) | const |
Backtrack is here to get the HitModified Sequence during the backtrack of score calculation. It start from best score align case in matrix and use origin matrix to go back to the start of the alignment
row | : the row indices of the best score |
column | : the column indices of the best score |
precision | : the precision of measures |
Definition at line 399 of file spectralalignment.cpp.
References pappso::specglob::align, pappso::PrecisionBase::getNominal(), m_itPosMax, m_matrix, m_maxScore, m_precisionPtr, m_precursorMassDelta, mcsp_peptideSpectrum, pappso::specglob::nonAlign, and pappso::specglob::reAlign.
PeptideModel pappso::specglob::SpectralAlignment::buildPeptideModel | ( | ) | const |
Definition at line 552 of file spectralalignment.cpp.
References pappso::specglob::align, pappso::PrecisionBase::getNominal(), m_itPosMax, m_matrix, m_maxScore, m_precisionPtr, mcsp_experimentalSpectrum, mcsp_peptideSpectrum, pappso::specglob::nonAlign, pappso::specglob::reAlign, and pappso::specglob::PeptideModel::setBeginMassDelta().
|
private |
Definition at line 326 of file spectralalignment.cpp.
References m_matrix, and pappso::specglob::nonAlign.
Referenced by align().
|
private |
This method do the alignment of the 2 Spectra and fill matrices at actual coordinates i(row - theoretical) and j(column - experimental)
theoIndiceI | : The actual theoretical peak indices |
expeIndiceJ | : The actual experimental peak indices |
Definition at line 115 of file spectralalignment.cpp.
References pappso::specglob::align, pappso::specglob::SpectralAlignmentDataPoint::alignment_type, pappso::specglob::both, pappso::specglob::ScoreValues::get(), getBestRealignScore(), getExperimentalSpectrumDataPoint(), pappso::PrecisionBase::getNominal(), pappso::specglob::PeptideSpectrum::getPeptideSp(), m_BETTER_END_RA, m_matrix, m_precisionPtr, m_scoreValues, pappso::specglob::nonAlign, pappso::specglob::SpectralAlignmentDataPoint::origin_column_indices, pappso::specglob::ExperimentalSpectrum::reverseFindDiffMz(), pappso::specglob::SpectralAlignmentDataPoint::score, pappso::specglob::scoreAlignBoth, pappso::specglob::scoreAlignNative, pappso::specglob::scoreAlignSym, pappso::specglob::scoreNonAlign, pappso::specglob::scoreReAlignBoth, pappso::specglob::scoreReAlignBothNO, pappso::specglob::scoreReAlignNative, pappso::specglob::scoreReAlignNativeNO, pappso::specglob::scoreReAlignSym, pappso::specglob::scoreReAlignSymNO, pappso::specglob::symmetric, and pappso::specglob::ExperimentalSpectrumDataPoint::type.
Referenced by align().
|
private |
Method to get a realigned j value of where come from the realignment and get the associated realigned score
theoIndicesI | : The row where we are actually |
expeIndicesK | : The founded k indices |
expeIndicesJ | : The column where we are actually |
reAlignScore | : Score to add if it is needed to add offset to realign |
alignScoreToAdd | : Score to add if there is an alignment with peak k |
precision | : Precision of measures |
Definition at line 261 of file spectralalignment.cpp.
References pappso::specglob::align, pappso::specglob::SpectralAlignmentDataPoint::alignment_type, pappso::PrecisionBase::getNominal(), m_matrix, m_precisionPtr, pappso::specglob::SpectralAlignmentDataPoint::origin_column_indices, pappso::specglob::reAlign, and pappso::specglob::SpectralAlignmentDataPoint::score.
Referenced by fillMatricesWithScores().
ExperimentalSpectrumCsp pappso::specglob::SpectralAlignment::getExperimentalSpectrumCsp | ( | ) | const |
Definition at line 60 of file spectralalignment.cpp.
References mcsp_experimentalSpectrum.
|
private |
Definition at line 384 of file spectralalignment.cpp.
References mcsp_experimentalSpectrum.
Referenced by fillMatricesWithScores().
const matrix< SpectralAlignmentDataPoint > & pappso::specglob::SpectralAlignment::getMatrix | ( | ) | const |
Definition at line 352 of file spectralalignment.cpp.
References m_matrix.
boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 pappso::specglob::SpectralAlignment::getMaxPosIterator | ( | ) | const |
Definition at line 378 of file spectralalignment.cpp.
References m_itPosMax.
int pappso::specglob::SpectralAlignment::getMaxScore | ( | ) | const |
Definition at line 372 of file spectralalignment.cpp.
References m_maxScore.
PeptideSpectraCsp pappso::specglob::SpectralAlignment::getPeptideSpectraCsp | ( | ) | const |
Definition at line 66 of file spectralalignment.cpp.
References mcsp_peptideSpectrum.
double pappso::specglob::SpectralAlignment::getPrecursorMzDelta | ( | ) | const |
Definition at line 392 of file spectralalignment.cpp.
References m_precursorMassDelta.
std::vector< int > pappso::specglob::SpectralAlignment::getScoreRow | ( | std::size_t | row_indice | ) | const |
Definition at line 358 of file spectralalignment.cpp.
References m_matrix.
|
private |
modifies the score on the last amino acid alignment (RA score rather than NA Not documented anyMore in the interface
Definition at line 179 of file spectralalignment.h.
Referenced by fillMatricesWithScores().
|
private |
Definition at line 168 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), and getMaxPosIterator().
|
private |
Definition at line 163 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), fillMassDelta(), fillMatricesWithScores(), getBestRealignScore(), getMatrix(), and getScoreRow().
|
private |
Definition at line 166 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), and getMaxScore().
|
private |
Definition at line 164 of file spectralalignment.h.
Referenced by SpectralAlignment(), backTrack(), buildPeptideModel(), fillMatricesWithScores(), and getBestRealignScore().
|
private |
Definition at line 170 of file spectralalignment.h.
Referenced by align(), backTrack(), and getPrecursorMzDelta().
|
private |
Definition at line 165 of file spectralalignment.h.
Referenced by SpectralAlignment(), and fillMatricesWithScores().
|
private |
Definition at line 161 of file spectralalignment.h.
Referenced by align(), buildPeptideModel(), getExperimentalSpectrumCsp(), and getExperimentalSpectrumDataPoint().
|
private |
Definition at line 162 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), and getPeptideSpectraCsp().