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

spectrum view is OK

parent dac37351
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
IdentificationDataSource::MapIdentificationDataSources IdentificationDataSource::_map_identification_data_sources = []
{
MapIdentificationDataSources ret;
MapIdentificationDataSources ret;
return ret;
}();
......@@ -67,10 +67,10 @@ IdentificationDataSource * IdentificationDataSource::getInstance(const QString &
//QString sample_name = location_file.baseName();
if (ext.toLower() == "xml") {
//X!Tandem result file
IdentificationXtandemFile * p_xtfile = new IdentificationXtandemFile(location_file);
_map_identification_data_sources.insert(std::pair< QString, IdentificationDataSource* >(location, p_xtfile));
_map_identification_data_sources.insert(std::pair< QString, IdentificationDataSource* >(location_file.absoluteFilePath(), p_xtfile));
return p_xtfile;
IdentificationXtandemFile * p_xtfile = new IdentificationXtandemFile(location_file);
_map_identification_data_sources.insert(std::pair< QString, IdentificationDataSource* >(location, p_xtfile));
_map_identification_data_sources.insert(std::pair< QString, IdentificationDataSource* >(location_file.absoluteFilePath(), p_xtfile));
return p_xtfile;
}
}
throw pappso::PappsoException(QObject::tr("Identification resource %1 not recognized").arg(location));
......@@ -80,6 +80,10 @@ const QString & IdentificationDataSource::getResourceName () const {
return _resource_name;
}
const QString IdentificationDataSource::getSampleName () const {
QFileInfo file(_ms_run_sp.get()->getFilename());
return file.baseName();
}
void IdentificationDataSource::setMsRunSp (pappso::MsRunIdSp ms_run_sp) {
_ms_run_sp = ms_run_sp;
......
......@@ -42,6 +42,7 @@ public:
bool operator==(const IdentificationDataSource& other) const;
const QString & getResourceName () const;
const QString getSampleName () const;
void setMsRunSp (pappso::MsRunIdSp ms_run_sp);
pappso::MsRunIdSp getMsRunSp () const;
/** @brief get the spectrum with scan number
......
......@@ -99,11 +99,12 @@ void PeptideWindow::setPeptideMatch(PeptideMatch * p_peptide_match) {
SpectrumSp spectrum = _p_peptide_match->getIdentificationDataSource()->getSpectrumSp(_p_peptide_match->getScan());
pappso::QualifiedSpectrum spectrum_copy;
spectrum_copy.setPrecursorCharge(_p_peptide_match->getCharge());
spectrum_copy.setOriginalSpectrumSp(spectrum);
ui->spectrumWidget->setQualifiedSpectrum(spectrum_copy);
pappso::PeptideSp peptide = p_peptide_match->getPeptideXtpSp();
ui->spectrumWidget->setPrecision(_p_precision);
ui->spectrumWidget->setPeptideSp(peptide);
ui->spectrumWidget->setQualifiedSpectrum(spectrum_copy);
updateDisplay();
}
......@@ -145,7 +145,7 @@ QVariant PeptideTableModel::data(const QModelIndex &index, int role ) const {
return QVariant();
}
if (col == 2) {
return _p_protein_match->getPeptideMatchList().at(row)->getIdentificationDataSource()->getResourceName();
return _p_protein_match->getPeptideMatchList().at(row)->getIdentificationDataSource()->getSampleName();
}
if (col == 3) {
return QVariant ((quint32) _p_protein_match->getPeptideMatchList().at(row)->getScan());
......
......@@ -29,7 +29,7 @@
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QFormLayout" name="formLayout_2">
<layout class="QFormLayout" name="formLayout_1">
<item row="0" column="0">
<widget class="QPushButton" name="viewProteinListButton">
<property name="toolTip">
......@@ -128,7 +128,7 @@
<attribute name="title">
<string>FDR</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout2">
<item row="0" column="0">
<layout class="QFormLayout" name="formLayout_2"/>
</item>
......
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