libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
32 #include "../../pappsoexception.h"
33 #include "../../peptide/peptidenaturalisotopelist.h"
49 this->setLayout(
new QHBoxLayout(
this));
51 this->layout()->setMargin(0);
81 painter.begin(device);
82 _custom_plot->toPainter(&painter, size.width(), size.height());
97 while(
auto item = this->layout()->takeAt(0))
99 delete item->widget();
108 _custom_plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom);
143 qDebug() <<
"ms_level=" << ms_level;
161 qDebug() <<
"precision->toString()=" << precision->
toString();
168 qDebug() <<
"precision->toString()=" << precision->
toString();
276 qDebug() <<
"_isotope_mass_list.size()="
282 return a.get()->getMz() < b.get()->getMz();
289 qDebug() <<
"precursor_peptide.get()->getMz()="
290 << precursor_peptide.get()->getMz();
291 MzRange precursor_mass(precursor_peptide.get()->getMz(),
294 monoisotope_peak.
y = 0;
300 if(peak.y > monoisotope_peak.
y)
302 qDebug() <<
"SpectrumWidget::plot "
304 "monoisotope_peak.intensity) ";
305 monoisotope_peak = peak;
309 if(monoisotope_peak.
y > 0)
311 qDebug() <<
"addMs1IsotopePattern";
337 QString plusstr =
"+";
338 plusstr = plusstr.repeated(peak_ion_match.getCharge());
339 QCPItemText *text_label =
new QCPItemText(
_custom_plot);
340 text_label->setVisible(
true);
342 text_label->setPositionAlignment(Qt::AlignBottom |
344 text_label->position->setType(QCPItemPosition::ptPlotCoords);
345 text_label->position->setCoords(
346 peak_ion_match.getPeak().x,
347 peak_ion_match.getPeak()
349 text_label->setFont(QFont(font().family(), 8));
352 .arg(peak_ion_match.getPeptideFragmentIonSp()
354 ->getPeptideIonName())
355 .arg(peak_ion_match.getPeptideFragmentIonSp().get()->size())
359 text_label->setColor(
361 peak_ion_match.getPeptideIonType())));
379 qDebug() <<
"p_peak_match=" << p_peak_match;
397 emit
ionChanged(std::make_shared<const PeakIonIsotopeMatch>(
404 qDebug() <<
"no peak";
419 std::map<unsigned int, pappso::pappso_double> map_isotope_number =
422 for(
unsigned int i = 0; i < map_isotope_number.size(); i++)
425 unsigned int asked_rank = 0;
426 unsigned int given_rank = 0;
427 bool more_rank =
true;
434 if(given_rank < asked_rank)
uint getMsLevel() const
Get the mass spectrum level.
double pappso_double
A type definition for doubles.
void setSpectrumP(const MassSpectrum *spectrum)
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
const std::map< unsigned int, pappso_double > getIntensityRatioPerIsotopeNumber() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
bool contains(pappso_double) const
const DataPoint & getPeak() const
pappso_double getIntensityRatio() const
DataPointCstSPtr makeDataPointCstSPtr() const
std::shared_ptr< const DataPoint > DataPointCstSPtr
Class representing a fully specified mass spectrum.
uint getPrecursorCharge(bool *ok=nullptr) const
Get the precursor charge.
const std::list< PeakIonIsotopeMatch > & getPeakIonIsotopeMatchList() const
void addMs1IsotopePattern(const std::vector< pappso::PeptideNaturalIsotopeAverageSp > &isotope_mass_list, pappso_double intensity)
unsigned int getIsotopeRank() const
PeptideNaturalIsotopeAverageSp makePeptideNaturalIsotopeAverageSp() const
static const QColor getPeptideIonColor(PeptideIon ion_type)
MassSpectrumCstSPtr getMassSpectrumCstSPtr() const
Get the MassSpectrumCstSPtr.
void addPeakIonIsotopeMatch(const PeakIonIsotopeMatch &peak_ion_match)
static std::list< PeptideIon > getCIDionList()
void addMassDelta(const PeakIonIsotopeMatch &peak_ion_match)
virtual QString toString() const =0
std::shared_ptr< const Peptide > PeptideSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp