libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
32 #include "../../pappsoexception.h"
33 #include "../../peptide/peptidenaturalisotopelist.h"
43 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
49 this->setLayout(
new QHBoxLayout(
this));
51 this->layout()->setMargin(0);
53 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
81 painter.begin(device);
82 _custom_plot->toPainter(&painter, size.width(), size.height());
89 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
97 while(
auto item = this->layout()->takeAt(0))
99 delete item->widget();
101 qDebug() <<
"SpectrumWidget::setVisibleMassDelta new";
104 qDebug() <<
"SpectrumWidget::setVisibleMassDelta clear";
107 qDebug() <<
"SpectrumWidget::setVisibleMassDelta 2";
108 _custom_plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom);
111 qDebug() <<
"SpectrumWidget::setVisibleMassDelta 3";
116 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
121 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
123 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
126 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
143 qDebug() <<
"SpectrumWidget::setMsLevel begin " << ms_level;
161 qDebug() <<
"SpectrumWidget::setMs1Precision begin " << precision->toString();
168 qDebug() <<
"SpectrumWidget::setMs2Precision begin " << precision->toString();
187 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__
214 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
220 qDebug() <<
"SpectrumWidget::setPeptideSp begin";
222 qDebug() <<
"SpectrumWidget::setPeptideSp end";
228 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
232 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
238 qDebug() <<
"SpectrumWidget::rescale begin";
248 qDebug() <<
"SpectrumWidget::rescale end";
255 qDebug() <<
"SpectrumWidget::setQualifiedMassSpectrum begin "
261 qDebug() <<
"SpectrumWidget::setQualifiedMassSpectrum end";
268 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
277 qDebug() <<
"SpectrumWidget::plot begin _isotope_mass_list "
283 return a.get()->getMz() < b.get()->getMz();
290 qDebug() <<
"SpectrumWidget::plot precursor_peptide "
291 << precursor_peptide.get()->getMz();
292 MzRange precursor_mass(precursor_peptide.get()->getMz(),
295 monoisotope_peak.
y = 0;
301 if(peak.y > monoisotope_peak.
y)
303 qDebug() <<
"SpectrumWidget::plot "
305 "monoisotope_peak.intensity) ";
306 monoisotope_peak = peak;
310 if(monoisotope_peak.
y > 0)
312 qDebug() <<
"SpectrumWidget::plot addData ";
325 return a.getPeak().
y >
b.getPeak().y;
338 QString plusstr =
"+";
339 plusstr = plusstr.repeated(peak_ion_match.getCharge());
340 QCPItemText *text_label =
new QCPItemText(
_custom_plot);
341 text_label->setVisible(
true);
343 text_label->setPositionAlignment(Qt::AlignBottom |
345 text_label->position->setType(QCPItemPosition::ptPlotCoords);
346 text_label->position->setCoords(
347 peak_ion_match.getPeak().x,
348 peak_ion_match.getPeak()
350 text_label->setFont(QFont(font().family(), 8));
353 .arg(peak_ion_match.getPeptideFragmentIonSp()
355 ->getPeptideIonName())
356 .arg(peak_ion_match.getPeptideFragmentIonSp().get()->size())
360 text_label->setColor(
362 peak_ion_match.getPeptideIonType())));
369 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
380 qDebug() <<
"SpectrumWidget::peakChangeEvent begin " << p_peak_match;
388 qDebug() <<
"SpectrumWidget::peakChangeEvent _p_mouse_peak->x"
399 emit
ionChanged(std::make_shared<const PeakIonIsotopeMatch>(
406 qDebug() <<
"SpectrumWidget::peakChangeEvent no peak";
415 qDebug() <<
"SpectrumWidget::computeIsotopeMassList "
422 std::map<unsigned int, pappso::pappso_double> map_isotope_number =
425 for(
unsigned int i = 0; i < map_isotope_number.size(); i++)
428 unsigned int asked_rank = 0;
429 unsigned int given_rank = 0;
430 bool more_rank =
true;
437 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
bool contains(pappso_double) const
pappso_double getIntensityRatio() const
DataPointCstSPtr makeDataPointCstSPtr() const
std::shared_ptr< const DataPoint > DataPointCstSPtr
Class representing a fully specified mass spectrum.
const std::list< PeakIonIsotopeMatch > & getPeakIonIsotopeMatchList() const
void addMs1IsotopePattern(const std::vector< pappso::PeptideNaturalIsotopeAverageSp > &isotope_mass_list, pappso_double intensity)
uint getPrecursorCharge() const
Get the precursor charge.
const typedef PrecisionBase * PrecisionPtr
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)
std::shared_ptr< const Peptide > PeptideSp
std::shared_ptr< const PeptideNaturalIsotopeAverage > PeptideNaturalIsotopeAverageSp