Loading...
Searching...
No Matches
selfspectrum.cpp
Go to the documentation of this file.
/**
* \file pappsomspp/processing/specself/selfspectrum.cpp
* \date 23/03/2024
* \author Olivier Langella
* \brief spectrum self operations
*/
/*******************************************************************************
* Copyright (c) 2024 Olivier Langella
*<Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of PAPPSOms++.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#include "selfspectrum.h"
#include <QDebug>
namespace pappso
{
namespace specself
{
SelfSpectrum::SelfSpectrum(const pappso::AaStringCodeMassMatching &codec_mass_matching,
const Trace &trace)
{
m_trace = trace;
m_matrix.resize(m_trace.size(), m_trace.size());
qDebug() << m_trace.size();
for(auto itmi = ++m_matrix.begin1(); itmi != m_matrix.end1(); ++itmi)
{
qDebug() << itmi.index1();
for(auto itmj = ++itmi.begin(); itmj != itmi.end(); itmj++)
{
// itmj.fillSelfDataPoint(m_trace[itmj.index1()],
// m_trace[itmj.index2()]);
(*itmj).fillSelfSpectrumDataPoint(
codec_mass_matching, m_trace[itmj.index1()], m_trace[itmj.index2()]);
}
}
qDebug();
}
SelfSpectrum::~SelfSpectrum()
{
}
const SelfSpectrumMatrix &
SelfSpectrum::getMatrix() const
{
return m_matrix;
}
const Trace &
SelfSpectrum::getTrace() const
{
return m_trace;
}
void
SelfSpectrum::setPrecursorMass(const pappso::AaStringCodeMassMatching &codec_mass_matching,
double precursor_mass)
{
for(auto itmi = ++m_matrix.begin1(); itmi != m_matrix.end1(); ++itmi)
{
for(auto itmj = ++itmi.begin(); itmj != itmi.end(); itmj++)
{
// itmj.fillSelfDataPoint(m_trace[itmj.index1()],
// m_trace[itmj.index2()]);
(*itmj).fillAntiSpectrumDataPoint(
precursor_mass, codec_mass_matching, m_trace[itmj.index1()], m_trace[itmj.index2()]);
}
}
}
void
SelfSpectrum::setVariableModification(const pappso::AaStringCodeMassMatching &codec_mass_matching,
const Aa &aa,
int quantifier)
{
for(auto itmi = ++m_matrix.begin1(); itmi != m_matrix.end1(); ++itmi)
{
for(auto itmj = ++itmi.begin(); itmj != itmi.end(); itmj++)
{
// itmj.fillSelfDataPoint(m_trace[itmj.index1()],
// m_trace[itmj.index2()]);
(*itmj).setVariableModification(codec_mass_matching, aa, quantifier);
}
}
}
} // namespace specself
} // namespace pappso
pappso::AaStringCodeMassMatching
convert a list of mass to amino acid string codes
Definition aastringcodemassmatching.h:41
pappso::Aa
Definition aa.h:45
pappso::Trace
A simple container of DataPoint instances.
Definition trace.h:152
pappso::specself::SelfSpectrum::getMatrix
const SelfSpectrumMatrix & getMatrix() const
Definition selfspectrum.cpp:64
pappso::specself::SelfSpectrum::setVariableModification
void setVariableModification(const pappso::AaStringCodeMassMatching &codec_mass_matching, const Aa &aa, int quantifier)
Definition selfspectrum.cpp:96
pappso::specself::SelfSpectrum::~SelfSpectrum
virtual ~SelfSpectrum()
Definition selfspectrum.cpp:59
pappso::specself::SelfSpectrum::m_matrix
SelfSpectrumMatrix m_matrix
Definition selfspectrum.h:72
pappso::specself::SelfSpectrum::SelfSpectrum
SelfSpectrum(const pappso::AaStringCodeMassMatching &codec_mass_matching, const Trace &trace)
Definition selfspectrum.cpp:37
pappso::specself::SelfSpectrum::m_trace
Trace m_trace
Definition selfspectrum.h:71
pappso::specself::SelfSpectrum::setPrecursorMass
void setPrecursorMass(const pappso::AaStringCodeMassMatching &codec_mass_matching, double precursor_mass)
Definition selfspectrum.cpp:78
pappso::specself::SelfSpectrum::getTrace
const Trace & getTrace() const
Definition selfspectrum.cpp:71
pappso::specself
Definition selfspectrum.cpp:35
pappso::specself::SelfSpectrumMatrix
boost::numeric::ublas::matrix< SelfSpectrumDataPoint > SelfSpectrumMatrix
Definition selfspectrum.h:40
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
selfspectrum.h