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

launch peptide viewer

parent 6ad853d2
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,11 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5
#sudo apt-get install libpappsomspp-dev
FIND_PACKAGE( Pappsomspp REQUIRED )
# SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
#FIND_PACKAGE( Pappsomspp REQUIRED )
SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
# SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
# SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt4.so")
SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
SET (PAPPSOMSPP_QT4_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt4.so")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)
......
......@@ -33,6 +33,9 @@
<property name="text">
<string>sequence</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
......@@ -82,6 +85,9 @@
<property name="text">
<string>TextLabel</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
......@@ -100,6 +106,9 @@
<property name="text">
<string>TextLabel</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
......@@ -122,10 +131,17 @@
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Open in peptide viewer</string>
</property>
</widget>
</item>
</layout>
</item>
<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">
......@@ -142,7 +158,7 @@
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
......@@ -175,7 +191,7 @@
<x>0</x>
<y>0</y>
<width>826</width>
<height>23</height>
<height>25</height>
</rect>
</property>
</widget>
......@@ -206,8 +222,25 @@
</hint>
</hints>
</connection>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>PeptideDetailView</receiver>
<slot>openInPeptideViewer()</slot>
<hints>
<hint type="sourcelabel">
<x>754</x>
<y>62</y>
</hint>
<hint type="destinationlabel">
<x>850</x>
<y>222</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>chooseDefaultMzDataDir()</slot>
<slot>openInPeptideViewer()</slot>
</slots>
</ui>
......@@ -30,6 +30,7 @@
#include <QFileDialog>
#include <QSettings>
#include <QDebug>
#include <QProcess>
void SpectrumSpLoaderThread::doLoadSpectrumSp (PeptideMatch * p_peptide_match) {
......@@ -156,6 +157,15 @@ void PeptideWindow::chooseDefaultMzDataDir() {
}
void PeptideWindow::openInPeptideViewer() {
QString program = "/home/olivier/eclipse/git/pappsoms-tools/cbuild/src/gui/pt-peptideviewer";
QStringList arguments;
arguments << _p_peptide_match->getPeptideXtpSp().get()->toString() << QString("%1").arg(_p_peptide_match->getCharge()) << _p_peptide_match->getMsRunP()->getFilename() << QString("%1").arg(_p_peptide_match->getScan());
qDebug() << "PeptideWindow::openInPeptideViewer " << program << " " << arguments.join(" ");
QProcess *myProcess = new QProcess(this);
myProcess->start(program, arguments);
}
void PeptideWindow::doSpectrumSpReady(SpectrumSp spectrum_sp, QString error) {
qDebug() << "PeptideWindow::doSpectrumSpReady begin";
......
......@@ -77,6 +77,7 @@ signals:
protected slots:
void doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString error);
void chooseDefaultMzDataDir();
void openInPeptideViewer();
protected :
void updateDisplay();
......
......@@ -272,11 +272,11 @@ pappso::SpectrumSp SpectrumStore::getSpectrumSpFromMsRunSp(MsRunSp msrun, unsign
QString mz_file = findMzFile(msrun.get()->getFilename());
if (mz_file.isEmpty()) {
qDebug() << "SpectrumStore::getSpectrumSpFromMsRunIdSp ERROR file not found " << msrun.get()->getFilename();
throw pappso::ExceptionNotFound(QObject::tr("mz data \"%1\" file not found").arg(msrun.get()->getFilename()));
throw pappso::ExceptionNotFound(QObject::tr("mz data \"%1\" file not found").arg(msrun.get()->getFilename()));
//return spectrum;
}
p_msdatafile = getPwizMSDataFile(mz_file);
msrun.get()->setFilename(mz_file);
p_msdatafile = getPwizMSDataFile(mz_file);
_map_msrun_msdatafile.insert(std::pair<MsRunSp, pwiz::msdata::MSDataFile *>(msrun, p_msdatafile));
}
else {
......
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