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

more information in peptide window : precision value added

parent 1af092da
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@
</property>
</spacer>
</item>
<item>
<item>
<layout class="QVBoxLayout" name="sample_layout">
<item>
<widget class="QLabel" name="sample_title_label">
......@@ -83,7 +83,7 @@
<item>
<widget class="QLabel" name="sample_label">
<property name="text">
<string></string>
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
......@@ -127,7 +127,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QWidget" name="file_not_found">
<widget class="QWidget" name="file_not_found">
<layout class="QFormLayout" name="file_not_found_layout">
<item row="0" column="0">
<widget class="QLabel" name="mz_data_dir_label">
......@@ -144,7 +144,7 @@
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
......@@ -170,111 +170,153 @@
</layout>
</item>
<item>
<layout class="QFormLayout" name="peptide_form_info_layout">
<item row="0" column="0">
<widget class="QLabel" name="evalue_title_label">
<property name="text">
<string>Evalue</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="evalue_label">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="hyperscore_title_label">
<property name="text">
<string>hyperscore</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="hyperscore_label">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mh_title_label">
<property name="text">
<string>mh</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="mh_label">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="z_title_label">
<property name="text">
<string>charge</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="z_label">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mz_title_label">
<property name="text">
<string>mz</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="mz_label">
<property name="text">
<string></string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="expmz_title_label">
<property name="text">
<string>exp mz</string>
</property>
</widget>
<layout class="QVBoxLayout" name="peptide_right_layout">
<item>
<layout class="QFormLayout" name="peptide_form_info_layout">
<item row="0" column="0">
<widget class="QLabel" name="evalue_title_label">
<property name="text">
<string>Evalue</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="evalue_label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="hyperscore_title_label">
<property name="text">
<string>hyperscore</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="hyperscore_label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mh_title_label">
<property name="text">
<string>mh</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="mh_label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="z_title_label">
<property name="text">
<string>charge</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="z_label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mz_title_label">
<property name="text">
<string>mz</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="mz_label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="expmz_title_label">
<property name="text">
<string>exp mz</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="expmz_label">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="delta_title_label">
<property name="text">
<string>delta</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="delta_label">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="1">
<widget class="QLabel" name="expmz_label">
<property name="text">
<string></string>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="delta_title_label">
<property name="text">
<string>delta</string>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</widget>
</spacer>
</item>
<item row="6" column="1">
<widget class="QLabel" name="delta_label">
<property name="text">
<string></string>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>MS2 precision</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QComboBox" name="precision_unit_combobox">
<item>
<property name="text">
<string>dalton</string>
</property>
</item>
<item>
<property name="text">
<string>ppm</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="precision_spinbox">
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
......@@ -291,7 +333,7 @@
<x>0</x>
<y>0</y>
<width>826</width>
<height>25</height>
<height>23</height>
</rect>
</property>
</widget>
......@@ -338,9 +380,26 @@
</hint>
</hints>
</connection>
<connection>
<sender>precision_spinbox</sender>
<signal>valueChanged(double)</signal>
<receiver>PeptideDetailView</receiver>
<slot>doMsmsPrecisionValueChanged(double)</slot>
<hints>
<hint type="sourcelabel">
<x>767</x>
<y>350</y>
</hint>
<hint type="destinationlabel">
<x>870</x>
<y>368</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>chooseDefaultMzDataDir()</slot>
<slot>openInPeptideViewer()</slot>
<slot>doMsmsPrecisionValueChanged(double)</slot>
</slots>
</ui>
......@@ -67,6 +67,9 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent):
QString unit = settings.value("peptideview/precision_unit", "dalton").toString();
pappso::mz precision = settings.value("peptideview/precision_value", "0.2").toDouble();
ui->precision_unit_combobox->setCurrentIndex(ui->precision_unit_combobox->findText(unit));
ui->precision_spinbox->setValue(precision);
if (unit == "dalton") {
_p_precision = Precision::getDaltonInstance(precision);
} else {
......@@ -118,12 +121,12 @@ void PeptideWindow::updateDisplay() {
ui->scan_label->setText(QString("%1").arg(_p_peptide_match->getScan()));
ui->sample_label->setText(_p_peptide_match->getMsRunP()->getSampleName());
ui->modification_label->setText(_p_peptide_match->getPeptideXtpSp().get()->getModifString());
ui->hyperscore_label->setText(_p_peptide_match->getParam(PeptideMatchParam::tandem_hyperscore).toString());
ui->evalue_label->setText(QString::number(_p_peptide_match->getEvalue(), 'g', 4));
ui->mh_label->setText(QString::number(_p_peptide_match->getPeptideXtpSp().get()->getMz(1), 'f', 4));
ui->mz_label->setText(QString::number(_p_peptide_match->getPeptideXtpSp().get()->getMz(_p_peptide_match->getCharge()), 'f', 4));
ui->expmz_label->setText(QString::number(_p_peptide_match->getExperimentalMz(), 'f', 4));
ui->delta_label->setText(QString::number(_p_peptide_match->getDeltaMass(), 'g', 4));
ui->hyperscore_label->setText(_p_peptide_match->getParam(PeptideMatchParam::tandem_hyperscore).toString());
ui->evalue_label->setText(QString::number(_p_peptide_match->getEvalue(), 'g', 4));
ui->mh_label->setText(QString::number(_p_peptide_match->getPeptideXtpSp().get()->getMz(1), 'f', 4));
ui->mz_label->setText(QString::number(_p_peptide_match->getPeptideXtpSp().get()->getMz(_p_peptide_match->getCharge()), 'f', 4));
ui->expmz_label->setText(QString::number(_p_peptide_match->getExperimentalMz(), 'f', 4));
ui->delta_label->setText(QString::number(_p_peptide_match->getDeltaMass(), 'g', 4));
}
......@@ -223,3 +226,22 @@ void PeptideWindow::setPeptideMatch(PeptideMatch * p_peptide_match) {
updateDisplay();
qDebug() << "PeptideWindow::setPeptideMatch end";
}
void PeptideWindow::doMsmsPrecisionValueChanged(double precision_value) {
QSettings settings;
QString unit = ui->precision_unit_combobox->currentText();
pappso::mz precision = precision_value;
if (unit == "dalton") {
_p_precision = Precision::getDaltonInstance(precision);
} else {
_p_precision = Precision::getPpmInstance(precision);
}
ui->spectrumWidget->setPrecision(_p_precision);
settings.setValue("peptideview/precision_unit", unit);
settings.setValue("peptideview/precision_value", precision);
}
......@@ -76,6 +76,7 @@ signals:
protected slots:
void doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString error);
void doMsmsPrecisionValueChanged(double precision_value);
void chooseDefaultMzDataDir();
void openInPeptideViewer();
protected :
......
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