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) |
build the alignment matrix between a peptide sequence and an experimental spectrum | |
PeptideModel | rtrim (PrecisionPtr precision_ptr) |
trim the current peptide to get a minimal alignment score | |
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 | ||
) |
build the alignment matrix between a peptide sequence and an experimental spectrum
peptide_spectrum | the peptide sequence |
experimental_spectrum | the 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 442 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 595 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().
Referenced by rtrim().
|
private |
Definition at line 369 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 158 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 304 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 427 of file spectralalignment.cpp.
References mcsp_experimentalSpectrum.
Referenced by fillMatricesWithScores().
const matrix< SpectralAlignmentDataPoint > & pappso::specglob::SpectralAlignment::getMatrix | ( | ) | const |
Definition at line 395 of file spectralalignment.cpp.
References m_matrix.
boost::numeric::ublas::matrix< SpectralAlignmentDataPoint >::iterator2 pappso::specglob::SpectralAlignment::getMaxPosIterator | ( | ) | const |
Definition at line 421 of file spectralalignment.cpp.
References m_itPosMax.
int pappso::specglob::SpectralAlignment::getMaxScore | ( | ) | const |
Definition at line 415 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 435 of file spectralalignment.cpp.
References m_precursorMassDelta.
std::vector< int > pappso::specglob::SpectralAlignment::getScoreRow | ( | std::size_t | row_indice | ) | const |
Definition at line 401 of file spectralalignment.cpp.
References m_matrix.
PeptideModel pappso::specglob::SpectralAlignment::rtrim | ( | PrecisionPtr | precision_ptr | ) |
trim the current peptide to get a minimal alignment score
Definition at line 114 of file spectralalignment.cpp.
References pappso::specglob::align, buildPeptideModel(), pappso::specglob::PeptideModel::eliminateComplementaryDelta(), pappso::specglob::PeptideModel::ltrimOnRemoval(), m_maxScore, mcsp_experimentalSpectrum, and mcsp_peptideSpectrum.
|
private |
modifies the score on the last amino acid alignment (RA score rather than NA Not documented anyMore in the interface
Definition at line 189 of file spectralalignment.h.
Referenced by fillMatricesWithScores().
|
private |
Definition at line 178 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), and getMaxPosIterator().
|
private |
Definition at line 173 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), fillMassDelta(), fillMatricesWithScores(), getBestRealignScore(), getMatrix(), and getScoreRow().
|
private |
Definition at line 176 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), getMaxScore(), and rtrim().
|
private |
Definition at line 174 of file spectralalignment.h.
Referenced by SpectralAlignment(), backTrack(), buildPeptideModel(), fillMatricesWithScores(), and getBestRealignScore().
|
private |
Definition at line 180 of file spectralalignment.h.
Referenced by align(), backTrack(), and getPrecursorMzDelta().
|
private |
Definition at line 175 of file spectralalignment.h.
Referenced by SpectralAlignment(), and fillMatricesWithScores().
|
private |
Definition at line 171 of file spectralalignment.h.
Referenced by align(), buildPeptideModel(), getExperimentalSpectrumCsp(), getExperimentalSpectrumDataPoint(), and rtrim().
|
private |
Definition at line 172 of file spectralalignment.h.
Referenced by align(), backTrack(), buildPeptideModel(), getPeptideSpectraCsp(), and rtrim().