Skip to content
Snippets Groups Projects
Commit 975b96b2 authored by Langella Olivier's avatar Langella Olivier
Browse files

display theoretical MS2 ion fragment ratio

parent 0ea96f01
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@
#include <QProcess>
#include <QSvgGenerator>
#include <QMessageBox>
#include <QSpacerItem>
void SpectrumSpLoaderThread::doLoadSpectrumSp (PeptideEvidence * p_peptide_evidence) {
......@@ -83,8 +84,12 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent):
ui->file_not_found->setVisible(false);
_mz_label = new QLabel("");
ui->statusbar->addWidget(_mz_label);
QWidget * p_spacer = new QWidget();
p_spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
ui->statusbar->addWidget(p_spacer);
_peak_label = new QLabel("");
ui->statusbar->addWidget(_peak_label);
_ion_label = new QLabel("");
......@@ -93,7 +98,6 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent):
ui->spectrum_widget->setMaximumIsotopeNumber(3);
ui->spectrum_widget->setMaximumIsotopeRank(6);
qRegisterMetaType<pappso::SpectrumSp>("pappso::SpectrumSp");
#if QT_VERSION >= 0x050000
// Qt5 code
connect (_p_project_window, &ProjectWindow::identificationGroupGrouped, this,&PeptideWindow::doIdentificationGroupGrouped);
......@@ -125,7 +129,9 @@ PeptideWindow::~PeptideWindow()
void PeptideWindow::setIon(pappso::PeakIonIsotopeMatch ion) {
QString plusstr = "+";
plusstr = plusstr.repeated(ion.getCharge());
_ion_label->setText(QString("%1%2%3 (+%4)").arg(ion.getPeptideFragmentIonSp().get()->getPeptideIonName()).arg(ion.getPeptideFragmentIonSp().get()->size()).arg(plusstr).arg(ion.getPeptideNaturalIsotopeAverageSp().get()->getIsotopeNumber()));
_ion_label->setText(QString("%1%2%3 (+%4) - th. isotope ratio %5%").arg(ion.getPeptideFragmentIonSp().get()->getPeptideIonName()).arg(ion.getPeptideFragmentIonSp().get()->size()).arg(plusstr).arg(ion.getPeptideNaturalIsotopeAverageSp().get()->getIsotopeNumber()).arg((int)(ion.getPeptideNaturalIsotopeAverageSp().get()->getIntensityRatio()*100)));
}
void PeptideWindow::setPeak(const pappso::Peak * p_peak_match) {
......
......@@ -113,6 +113,7 @@ void XicBox::setXic(std::vector< pappso::XicSp> xic_sp_list) {
if (_isotope_mass_list[i].get()->getIsotopeRank() > 1) {
isotope_name = QString("+%1 [%2]").arg(_isotope_mass_list[i].get()->getIsotopeNumber()).arg(_isotope_mass_list[i].get()->getIsotopeRank());
}
isotope_name.append(QString(" (%1%)").arg((int) (_isotope_mass_list[i].get()->getIntensityRatio()*100)));
ui->xic_widget->setName(xic_sp_list[i].get(), isotope_name);
if (_isotope_mass_list[i].get()->getIsotopeNumber() == 0) {
......
......@@ -15,6 +15,50 @@
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>XIC range</string>
</property>
</widget>
</item>
<item>
<widget class="pappso::PrecisionWidget" name="xic_precision" native="true"/>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
......@@ -26,7 +70,7 @@
<x>0</x>
<y>0</y>
<width>780</width>
<height>530</height>
<height>504</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout"/>
......@@ -47,6 +91,14 @@
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<customwidgets>
<customwidget>
<class>pappso::PrecisionWidget</class>
<extends>QWidget</extends>
<header>pappsomspp/widget/precisionwidget/precisionwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -42,6 +42,7 @@ int main(int argc, char *argv[])
qRegisterMetaType<std::vector<pappso::XicSp>>("std::vector<pappso::XicSp>");
qRegisterMetaType<pappso::PeptideSp>("pappso::PeptideSp");
qRegisterMetaType<XicExtractMethod>("XicExtractMethod");
qRegisterMetaType<pappso::SpectrumSp>("pappso::SpectrumSp");
qRegisterMetaType<std::vector<pappso::PeptideNaturalIsotopeAverageSp>>("std::vector<pappso::PeptideNaturalIsotopeAverageSp>");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment