Loading...
Searching...
No Matches
massspectrumwidget.cpp
Go to the documentation of this file.
/**
* \file pappsomspp/widget/spectrumwidget/massspectrumwidget.cpp
* \date 22/12/2017
* \author Olivier Langella
* \brief plot a sectrum and annotate with peptide
*/
/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* 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/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#include "massspectrumwidget.h"
#include "pappsomspp/core/utils.h"
#include "pappsomspp/core/pappsoexception.h"
#include "pappsomspp/core/peptide/peptidenaturalisotopelist.h"
#include <QDebug>
#include <QWidget>
using namespace pappso;
MassSpectrumWidget::MassSpectrumWidget(QWidget *parent) : GraphicDeviceWidget(parent)
{
qDebug();
_ms_level = 1;
_ion_list = PeptideFragmentIonListBase::getCIDionList();
_custom_plot = nullptr;
this->setLayout(new QHBoxLayout(this));
this->layout()->setContentsMargins(0, 0, 0, 0);
setVisibleMassDelta(false);
qDebug();
}
MassSpectrumWidget::~MassSpectrumWidget()
{
}
bool
MassSpectrumWidget::savePdf(const QString &fileName, int width, int height)
{
if(_custom_plot != nullptr)
{
return _custom_plot->savePdf(fileName, width, height);
}
else
{
return false;
}
}
void
MassSpectrumWidget::toQPaintDevice(QPaintDevice *device, const QSize &size)
{
if(_custom_plot != nullptr)
{
QCPPainter painter;
painter.begin(device);
_custom_plot->toPainter(&painter, size.width(), size.height());
painter.end();
}
}
void
MassSpectrumWidget::setVisibleMassDelta(bool visible)
{
qDebug();
if(_custom_plot != nullptr)
{
if(visible == _is_visible_mass_delta)
return;
delete _custom_plot;
}
_is_visible_mass_delta = visible;
while(auto item = this->layout()->takeAt(0))
{
delete item->widget();
}
qDebug();
_custom_plot = new QCPSpectrum(this, visible);
this->layout()->addWidget(_custom_plot);
qDebug();
_custom_plot->xAxis->setLabel("m/z");
_custom_plot->yAxis->setLabel("intensity");
qDebug();
_custom_plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom);
_custom_plot->axisRect()->setRangeDrag(Qt::Horizontal);
_custom_plot->axisRect()->setRangeZoom(Qt::Horizontal);
qDebug();
// legend->setVisible(false);
// legend->setFont(QFont("Helvetica",9));
// set locale to english, so we get english decimal separator:
// setLocale(QLocale(QLocale::English, QLocale::UnitedKingdom));
qDebug();
}
void
MassSpectrumWidget::clearData()
{
qDebug();
_custom_plot->clearData();
qDebug();
_custom_plot->clearItems();
_custom_plot->setSpectrumP(_spectrum_sp.get());
qDebug();
}
void
MassSpectrumWidget::setPeptideCharge(unsigned int parent_ion_charge)
{
_peptide_charge = parent_ion_charge;
}
void
MassSpectrumWidget::setIonList(const std::list<Enums::PeptideIon> &ion_list)
{
_ion_list = ion_list;
}
void
MassSpectrumWidget::setMsLevel(unsigned int ms_level)
{
qDebug() << "ms_level=" << ms_level;
_ms_level = ms_level;
if(_ms_level == 1)
{
setVisibleMassDelta(false);
}
else
{
setVisibleMassDelta(true);
}
//_precision._precision = precision._precision;
}
void
MassSpectrumWidget::setMs1Precision(PrecisionPtr precision)
{
qDebug() << "precision->toString()=" << precision->toString();
_p_ms1_precision = precision;
//_precision._precision = precision._precision;
}
void
MassSpectrumWidget::setMs2Precision(PrecisionPtr precision)
{
qDebug() << "precision->toString()=" << precision->toString();
_p_ms2_precision = precision;
//_precision._precision = precision._precision;
}
void
MassSpectrumWidget::setMaximumIsotopeNumber(unsigned int max_isotope_number)
{
_max_isotope_number = max_isotope_number;
}
void
MassSpectrumWidget::setMaximumIsotopeRank(unsigned int max_isotope_rank)
{
_max_isotope_rank = max_isotope_rank;
}
void
MassSpectrumWidget::peptideAnnotate()
{
qDebug() << " _max_isotope_number=" << _max_isotope_number;
clearData();
_peak_ion_isotope_match_list.clear();
if((_spectrum_sp == nullptr) || (_peptide_sp == nullptr))
{
}
else
{
if(_ms_level > 1)
{
qDebug();
PeptideIsotopeSpectrumMatch psm_match(*(_spectrum_sp.get()),
_peptide_sp,
_peptide_charge,
_p_ms2_precision,
_ion_list,
_max_isotope_number,
_max_isotope_rank);
_peak_ion_isotope_match_list = psm_match.getPeakIonIsotopeMatchList();
qDebug() << "_peak_ion_isotope_match_list.size()=" << _peak_ion_isotope_match_list.size();
}
else
{
}
computeIsotopeMassList();
}
qDebug();
}
void
MassSpectrumWidget::setPeptideSp(const PeptideSp &peptide_sp)
{
qDebug();
_peptide_sp = peptide_sp;
// clearData();
qDebug();
}
void
MassSpectrumWidget::setMassSpectrumCstSPtr(const MassSpectrumCstSPtr &spectrum)
{
qDebug();
_spectrum_sp = spectrum;
clearData();
qDebug();
}
void
MassSpectrumWidget::rescale()
{
qDebug();
_custom_plot->rescale();
/*
if (_p_delta_axis_rect != nullptr) {
_p_delta_axis_rect->axis(QCPAxis::AxisType::atLeft)->rescale();
}
*/
_custom_plot->replot();
qDebug();
}
void
MassSpectrumWidget::setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum)
{
qDebug() << "spectrum.getPrecursorCharge()=" << spectrum.getPrecursorCharge();
setMsLevel(spectrum.getMsLevel());
setMassSpectrumCstSPtr(spectrum.getMassSpectrumCstSPtr());
qDebug();
}
void
MassSpectrumWidget::plot()
{
qDebug() << "_ms_level=" << _ms_level;
peptideAnnotate();
if(_ms_level == 1)
{
qDebug();
if(_spectrum_sp != nullptr)
{
qDebug();
if(_isotope_mass_list.size() > 0)
{
qDebug() << "_isotope_mass_list.size()=" << _isotope_mass_list.size();
std::sort(_isotope_mass_list.begin(),
_isotope_mass_list.end(),
[](const PeptideNaturalIsotopeAverageSp &a,
const PeptideNaturalIsotopeAverageSp &b) {
return a.get()->getMz() < b.get()->getMz();
});
if(_isotope_mass_list.size() > 0)
{
PeptideNaturalIsotopeAverageSp precursor_peptide = _isotope_mass_list.at(0);
qDebug() << "precursor_peptide.get()->getMz()="
<< precursor_peptide.get()->getMz();
MzRange precursor_mass(precursor_peptide.get()->getMz(), _p_ms1_precision);
DataPoint monoisotope_peak;
monoisotope_peak.y = 0;
for(const DataPoint &peak : *(_spectrum_sp.get()))
{
if(precursor_mass.contains(peak.x))
{
if(peak.y > monoisotope_peak.y)
{
qDebug() << "SpectrumWidget::plot "
"(peak.intensity > "
"monoisotope_peak.intensity) ";
monoisotope_peak = peak;
}
}
}
if(monoisotope_peak.y > 0)
{
qDebug() << "addMs1IsotopePattern";
_custom_plot->addMs1IsotopePattern(_isotope_mass_list, monoisotope_peak.y);
}
}
}
}
}
else
{
qDebug() << "_peak_ion_isotope_match_list.size()=" << _peak_ion_isotope_match_list.size();
_peak_ion_isotope_match_list.sort(
[](const PeakIonIsotopeMatch &a, const PeakIonIsotopeMatch &b) {
return a.getPeak().y > b.getPeak().y;
});
unsigned int i = 0;
for(const PeakIonIsotopeMatch &peak_ion_match : _peak_ion_isotope_match_list)
{
_custom_plot->addPeakIonIsotopeMatch(peak_ion_match);
_custom_plot->addMassDelta(peak_ion_match);
//_p_delta_graph->addData(peak_ion_match.getPeak().x,
// peak_ion_match.getPeak().y);
if(i < _tag_nmost_intense)
{
QCPItemText *text_label = new QCPItemText(_custom_plot);
text_label->setVisible(true);
//_custom_plot->addItem(text_label);
text_label->setPositionAlignment(Qt::AlignBottom | Qt::AlignHCenter);
text_label->position->setType(QCPItemPosition::ptPlotCoords);
text_label->position->setCoords(
peak_ion_match.getPeak().x,
peak_ion_match.getPeak().y); // place position at center/top of axis rect
text_label->setFont(QFont(font().family(), 8));
text_label->setText(
peak_ion_match.getPeptideFragmentIonSp().get()->getCompletePeptideIonName(
peak_ion_match.getCharge()));
// text_label->setPen(QPen(PeptideFragmentIon::getPeptideIonColor(peak_ion_match.getPeptideIonType()),
// 1)); // show black border around text
text_label->setColor(
QColor(PeptideFragmentIon::getPeptideIonColor(peak_ion_match.getPeptideIonType())));
}
i++;
}
}
_custom_plot->replot();
qDebug();
}
void
MassSpectrumWidget::mzChangeEvent(pappso_double mz) const
{
emit mzChanged(mz);
}
void
MassSpectrumWidget::peakChangeEvent(const DataPoint *p_peak_match)
{
qDebug() << "p_peak_match=" << p_peak_match;
if(_p_mouse_peak != p_peak_match)
{
_p_mouse_peak = p_peak_match;
DataPointCstSPtr peak_shp;
// emit peakChanged(peak_shp);
if(_p_mouse_peak != nullptr)
{
qDebug() << "_p_mouse_peak->x=" << _p_mouse_peak->x;
peak_shp = _p_mouse_peak->makeDataPointCstSPtr();
emit peakChanged(peak_shp);
// try to find matched ion (if it exists)
bool found = false;
for(const PeakIonIsotopeMatch &peak_ion_match : _peak_ion_isotope_match_list)
{
if(peak_ion_match.getPeak().x == _p_mouse_peak->x)
{
// found
emit ionChanged(std::make_shared<const PeakIonIsotopeMatch>(
PeakIonIsotopeMatch(peak_ion_match)));
found = true;
}
}
if(!found)
{
emit ionChanged(std::shared_ptr<const PeakIonIsotopeMatch>());
}
}
else
{
qDebug() << "no peak";
emit peakChanged(peak_shp);
}
}
}
void
MassSpectrumWidget::computeIsotopeMassList()
{
qDebug() << "_p_ms1_precision->toString()=" << _p_ms1_precision->toString();
_isotope_mass_list.resize(0);
// compute isotope masses :
if(_peptide_sp != nullptr)
{
pappso::PeptideNaturalIsotopeList isotope_list(_peptide_sp);
std::map<unsigned int, pappso::pappso_double> map_isotope_number =
isotope_list.getIntensityRatioPerIsotopeNumber();
for(unsigned int i = 0; i < map_isotope_number.size(); i++)
{
unsigned int asked_rank = 0;
unsigned int given_rank = 0;
bool more_rank = true;
while(more_rank)
{
asked_rank++;
pappso::PeptideNaturalIsotopeAverage isotopeAverageMono(
isotope_list, asked_rank, i, _peptide_charge, _p_ms1_precision);
given_rank = isotopeAverageMono.getIsotopeRank();
if(given_rank < asked_rank)
{
more_rank = false;
}
else if(isotopeAverageMono.getIntensityRatio() == 0)
{
more_rank = false;
}
else
{
// isotopeAverageMono.makePeptideNaturalIsotopeAverageSp();
_isotope_mass_list.push_back(
isotopeAverageMono.makePeptideNaturalIsotopeAverageSp());
}
}
}
}
qDebug() << "_isotope_mass_list.size()=" << _isotope_mass_list.size();
}
void
pappso::MassSpectrumWidget::highlightPrecursorPeaks()
{
if(_ms_level > 1)
{
pappso_double precursor_mz_1 = _peptide_sp->getMz(1);
_custom_plot->highlightPrecursorPeaks(precursor_mz_1, 1, _p_ms2_precision);
pappso_double precursor_mz_charge = _peptide_sp->getMz(_peptide_charge);
_custom_plot->highlightPrecursorPeaks(precursor_mz_charge, _peptide_charge, _p_ms2_precision);
}
}
QJsonObject
pappso::MassSpectrumWidget::getJsonPsmIsotope() const
{
QJsonObject psm_json;
try
{
if(_peptide_sp.get() != nullptr)
{
psm_json.insert("proforma", _peptide_sp.get()->toProForma());
}
if(_spectrum_sp.get() != nullptr)
{
struct data_plot
{
pappso::DataPoint point;
double mz_th;
int charge;
int size;
int isotope_number;
int isotope_rank;
};
std::map<pappso::Enums::PeptideIon, std::vector<data_plot>> ion_map;
QJsonObject spectrum_json;
spectrum_json.insert("mz", pappso::Utils::toJson(_spectrum_sp.get()->xValues()));
spectrum_json.insert("intensity", pappso::Utils::toJson(_spectrum_sp.get()->yValues()));
for(const pappso::PeakIonIsotopeMatch &peakion_match : _peak_ion_isotope_match_list)
{
data_plot one_ion_match;
one_ion_match.charge = (int)peakion_match.getCharge();
one_ion_match.isotope_number =
(int)peakion_match.getPeptideNaturalIsotopeAverageSp().get()->getIsotopeNumber();
one_ion_match.isotope_rank =
(int)peakion_match.getPeptideNaturalIsotopeAverageSp().get()->getIsotopeRank();
one_ion_match.mz_th =
peakion_match.getPeptideNaturalIsotopeAverageSp().get()->getMz();
one_ion_match.point = peakion_match.getPeak();
one_ion_match.size = (int)peakion_match.getPeptideFragmentIonSp().get()->size();
auto it = ion_map.insert({peakion_match.getPeptideIonType(), {}});
it.first->second.push_back(one_ion_match);
}
QJsonObject psm_ion_json;
for(auto &cle_valeur : ion_map)
{
std::vector<data_plot> &current_vector = cle_valeur.second;
std::sort(
current_vector.begin(),
current_vector.end(),
[](const data_plot &a, const data_plot &b) { return a.point.x < b.point.x; });
QJsonArray current_ion_json_arr;
for(const data_plot &one_point : current_vector)
{
QJsonObject current_ion;
current_ion.insert("mz", one_point.point.x);
current_ion.insert("mzth", one_point.mz_th);
current_ion.insert("intensity", one_point.point.y);
current_ion.insert("size", one_point.size);
current_ion.insert("charge", one_point.charge);
current_ion.insert("isotope", one_point.isotope_number);
current_ion.insert("rank", one_point.isotope_rank);
current_ion_json_arr.push_back(current_ion);
}
psm_ion_json.insert(pappso::Utils::toString(cle_valeur.first), current_ion_json_arr);
}
psm_json.insert("ion-series", psm_ion_json);
psm_json.insert("spectra", spectrum_json);
}
}
catch(const pappso::PappsoException &error)
{
throw pappso::PappsoException(
QObject::tr("Unable to build JSON PSM object:\n%1").arg(error.qwhat()));
}
return psm_json;
}
GraphicDeviceWidget::GraphicDeviceWidget
GraphicDeviceWidget(QWidget *parent)
Definition graphicdevicewidget.cpp:35
pappso::MassSpectrumWidget::toQPaintDevice
void toQPaintDevice(QPaintDevice *device, const QSize &size) override
Definition massspectrumwidget.cpp:75
pappso::MassSpectrumWidget::_max_isotope_number
unsigned int _max_isotope_number
Definition massspectrumwidget.h:97
pappso::MassSpectrumWidget::setIonList
void setIonList(const std::list< Enums::PeptideIon > &ion_list)
Definition massspectrumwidget.cpp:135
pappso::MassSpectrumWidget::savePdf
bool savePdf(const QString &fileName, int width=0, int height=0)
Definition massspectrumwidget.cpp:60
pappso::MassSpectrumWidget::_isotope_mass_list
std::vector< pappso::PeptideNaturalIsotopeAverageSp > _isotope_mass_list
list of isotope precursors
Definition massspectrumwidget.h:111
pappso::MassSpectrumWidget::setQualifiedMassSpectrum
void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum)
Definition massspectrumwidget.cpp:254
pappso::MassSpectrumWidget::_p_mouse_peak
const DataPoint * _p_mouse_peak
Definition massspectrumwidget.h:116
pappso::MassSpectrumWidget::peakChanged
void peakChanged(pappso::DataPointCstSPtr peak_match) const
pappso::MassSpectrumWidget::setMs1Precision
void setMs1Precision(PrecisionPtr precision)
Definition massspectrumwidget.cpp:159
pappso::MassSpectrumWidget::setMassSpectrumCstSPtr
void setMassSpectrumCstSPtr(const MassSpectrumCstSPtr &spectrum)
Definition massspectrumwidget.cpp:228
pappso::MassSpectrumWidget::_peptide_sp
PeptideSp _peptide_sp
Definition massspectrumwidget.h:104
pappso::MassSpectrumWidget::setMs2Precision
void setMs2Precision(PrecisionPtr precision)
Definition massspectrumwidget.cpp:166
pappso::MassSpectrumWidget::_peak_ion_isotope_match_list
std::list< PeakIonIsotopeMatch > _peak_ion_isotope_match_list
Definition massspectrumwidget.h:107
pappso::MassSpectrumWidget::getJsonPsmIsotope
QJsonObject getJsonPsmIsotope() const
Definition massspectrumwidget.cpp:463
pappso::MassSpectrumWidget::setPeptideCharge
void setPeptideCharge(unsigned int parent_ion_charge)
Definition massspectrumwidget.cpp:130
pappso::MassSpectrumWidget::_peptide_charge
unsigned int _peptide_charge
Definition massspectrumwidget.h:102
pappso::MassSpectrumWidget::_max_isotope_rank
unsigned int _max_isotope_rank
Definition massspectrumwidget.h:98
pappso::MassSpectrumWidget::plot
void plot()
Definition massspectrumwidget.cpp:265
pappso::MassSpectrumWidget::setMaximumIsotopeRank
void setMaximumIsotopeRank(unsigned int max_isotope_rank)
Definition massspectrumwidget.cpp:180
pappso::MassSpectrumWidget::_is_visible_mass_delta
bool _is_visible_mass_delta
Definition massspectrumwidget.h:114
pappso::MassSpectrumWidget::_spectrum_sp
MassSpectrumCstSPtr _spectrum_sp
Definition massspectrumwidget.h:99
pappso::MassSpectrumWidget::_ion_list
std::list< Enums::PeptideIon > _ion_list
Definition massspectrumwidget.h:105
pappso::MassSpectrumWidget::_p_ms1_precision
PrecisionPtr _p_ms1_precision
Definition massspectrumwidget.h:100
pappso::MassSpectrumWidget::mzChanged
void mzChanged(double mz) const
pappso::MassSpectrumWidget::_p_ms2_precision
PrecisionPtr _p_ms2_precision
Definition massspectrumwidget.h:101
pappso::MassSpectrumWidget::_ms_level
unsigned int _ms_level
Definition massspectrumwidget.h:103
pappso::MassSpectrumWidget::setMsLevel
void setMsLevel(unsigned int ms_level)
Definition massspectrumwidget.cpp:141
pappso::MassSpectrumWidget::computeIsotopeMassList
void computeIsotopeMassList()
Definition massspectrumwidget.cpp:405
pappso::MassSpectrumWidget::QCPSpectrum
friend class QCPSpectrum
Definition massspectrumwidget.h:85
pappso::MassSpectrumWidget::MassSpectrumWidget
MassSpectrumWidget(QWidget *parent=0)
Definition massspectrumwidget.cpp:41
pappso::MassSpectrumWidget::~MassSpectrumWidget
~MassSpectrumWidget()
Definition massspectrumwidget.cpp:55
pappso::MassSpectrumWidget::setPeptideSp
void setPeptideSp(const PeptideSp &peptide_sp)
Definition massspectrumwidget.cpp:218
pappso::MassSpectrumWidget::mzChangeEvent
void mzChangeEvent(pappso_double mz) const
Definition massspectrumwidget.cpp:360
pappso::MassSpectrumWidget::ionChanged
void ionChanged(pappso::PeakIonIsotopeMatchCstSPtr ion) const
pappso::MassSpectrumWidget::setVisibleMassDelta
void setVisibleMassDelta(bool visible)
Definition massspectrumwidget.cpp:87
pappso::MassSpectrumWidget::peptideAnnotate
void peptideAnnotate()
Definition massspectrumwidget.cpp:185
pappso::MassSpectrumWidget::clearData
void clearData()
Definition massspectrumwidget.cpp:119
pappso::MassSpectrumWidget::peakChangeEvent
void peakChangeEvent(const DataPoint *p_peak_match)
Definition massspectrumwidget.cpp:366
pappso::MassSpectrumWidget::highlightPrecursorPeaks
void highlightPrecursorPeaks()
Definition massspectrumwidget.cpp:449
pappso::MassSpectrumWidget::rescale
void rescale()
Definition massspectrumwidget.cpp:238
pappso::MassSpectrumWidget::setMaximumIsotopeNumber
void setMaximumIsotopeNumber(unsigned int max_isotope_number)
Definition massspectrumwidget.cpp:174
pappso::MassSpectrumWidget::_custom_plot
QCPSpectrum * _custom_plot
Definition massspectrumwidget.h:113
pappso::MassSpectrumWidget::_tag_nmost_intense
unsigned int _tag_nmost_intense
Definition massspectrumwidget.h:96
pappso::MzRange
Definition mzrange.h:46
pappso::MzRange::contains
bool contains(pappso_double) const
Definition mzrange.cpp:115
pappso::PappsoException
Definition pappsoexception.h:41
pappso::PappsoException::qwhat
virtual const QString & qwhat() const
Definition pappsoexception.h:66
pappso::PeakIonIsotopeMatch
Definition peakionisotopematch.h:47
pappso::PeptideFragmentIonListBase::getCIDionList
static std::list< Enums::PeptideIon > getCIDionList()
Definition peptidefragmentionlistbase.cpp:41
pappso::PeptideFragmentIon::getPeptideIonColor
static const QColor getPeptideIonColor(Enums::PeptideIon ion_type)
Definition peptidefragmention.cpp:186
pappso::PeptideIsotopeSpectrumMatch
Definition peptideisotopespectrummatch.h:40
pappso::PeptideIsotopeSpectrumMatch::getPeakIonIsotopeMatchList
const std::list< PeakIonIsotopeMatch > & getPeakIonIsotopeMatchList() const
Definition peptideisotopespectrummatch.cpp:223
pappso::PeptideNaturalIsotopeAverage
Definition peptidenaturalisotopeaverage.h:43
pappso::PeptideNaturalIsotopeAverage::getIsotopeRank
unsigned int getIsotopeRank() const
Definition peptidenaturalisotopeaverage.cpp:216
pappso::PeptideNaturalIsotopeAverage::getIntensityRatio
pappso_double getIntensityRatio() const
Definition peptidenaturalisotopeaverage.cpp:198
pappso::PeptideNaturalIsotopeAverage::getMz
pappso_double getMz() const
Definition peptidenaturalisotopeaverage.cpp:192
pappso::PeptideNaturalIsotopeAverage::makePeptideNaturalIsotopeAverageSp
PeptideNaturalIsotopeAverageSp makePeptideNaturalIsotopeAverageSp() const
Definition peptidenaturalisotopeaverage.cpp:166
pappso::PeptideNaturalIsotopeList
Definition peptidenaturalisotopelist.h:49
pappso::PeptideNaturalIsotopeList::getIntensityRatioPerIsotopeNumber
const std::map< unsigned int, pappso_double > getIntensityRatioPerIsotopeNumber() const
Definition peptidenaturalisotopelist.cpp:276
pappso::PrecisionBase::toString
virtual QString toString() const =0
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition qualifiedmassspectrum.h:99
pappso::QualifiedMassSpectrum::getMsLevel
uint getMsLevel() const
Get the mass spectrum level.
Definition qualifiedmassspectrum.cpp:189
pappso::QualifiedMassSpectrum::getMassSpectrumCstSPtr
MassSpectrumCstSPtr getMassSpectrumCstSPtr() const
Get the MassSpectrumCstSPtr.
Definition qualifiedmassspectrum.cpp:138
pappso::QualifiedMassSpectrum::getPrecursorCharge
uint getPrecursorCharge(bool *ok=nullptr) const
get precursor charge
Definition qualifiedmassspectrum.cpp:336
pappso::Utils::toString
static QString toString(specglob::SpectralAlignmentType type)
Convenience function to return a string describing the specglob alingment type.
Definition utils.cpp:544
pappso::Utils::toJson
static QJsonArray toJson(const std::vector< double > &myVec)
convert vector of double into json array
Definition utils.cpp:774
massspectrumwidget.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::PeptideIonNter::a
@ a
Definition peptide.h:77
pappso::PeptideIonNter::b
@ b
Definition peptide.h:74
pappso::PeptideSp
std::shared_ptr< const Peptide > PeptideSp
Definition aamodification.h:48
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:60
pappso::PeptideNaturalIsotopeAverageSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp
Definition peptidenaturalisotopeaverage.h:40
pappso::MassSpectrumCstSPtr
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
Definition massspectrum.h:54
pappso::PrecisionPtr
const PrecisionBase * PrecisionPtr
Definition precision.h:122
pappso::DataPointCstSPtr
std::shared_ptr< const DataPoint > DataPointCstSPtr
Definition datapoint.h:18
pappsoexception.h
peptidenaturalisotopelist.h
pappso::DataPoint
Definition datapoint.h:22
pappso::DataPoint::y
pappso_double y
Definition datapoint.h:25
utils.h