From 2d0b5e34f41905569f0f8d268e2c16c9bdd8bc2e Mon Sep 17 00:00:00 2001 From: Olivier Langella <olivier.langella@u-psud.fr> Date: Fri, 29 May 2020 11:02:21 +0200 Subject: [PATCH] first fix for issue #23 --- .../identificationdatasource.h | 2 +- src/utils/identificationdatasourcestore.cpp | 16 ++++++++++------ src/utils/identificationdatasourcestore.h | 5 +---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/core/identification_sources/identificationdatasource.h b/src/core/identification_sources/identificationdatasource.h index 1fe886ec..21d65ed4 100644 --- a/src/core/identification_sources/identificationdatasource.h +++ b/src/core/identification_sources/identificationdatasource.h @@ -42,7 +42,7 @@ class IdentificationDataSource public: IdentificationDataSource(const QString resource_name); IdentificationDataSource(const IdentificationDataSource &other); - ~IdentificationDataSource(); + virtual ~IdentificationDataSource(); PeptideEvidenceStore &getPeptideEvidenceStore(); const PeptideEvidenceStore &getPeptideEvidenceStore() const; diff --git a/src/utils/identificationdatasourcestore.cpp b/src/utils/identificationdatasourcestore.cpp index 7ba69ddc..c539aaf5 100644 --- a/src/utils/identificationdatasourcestore.cpp +++ b/src/utils/identificationdatasourcestore.cpp @@ -50,6 +50,7 @@ IdentificationDataSourceSp IdentificationDataSourceStore::getInstance(const QString &location, IdentificationEngine engine) { + //TODO file format read needs a fix qDebug() << "IdentificationDataSourceStore::getInstance begin " << location; std::map<QString, IdentificationDataSourceSp>::iterator it = _map_identification_data_sources.find(location); @@ -75,11 +76,13 @@ IdentificationDataSourceStore::getInstance(const QString &location, else if(ext.toLower() == "pep") { // pep xml file - p_identfile = std::make_shared<IdentificationPwizFile>(location_file); + // p_identfile = + // std::make_shared<IdentificationPwizFile>(location_file); } else { - //p_identfile = std::make_shared<IdentificationPwizFile>(location_file); + // p_identfile = + // std::make_shared<IdentificationPwizFile>(location_file); } if(p_identfile == nullptr) { @@ -123,7 +126,7 @@ IdentificationDataSourceStore::getInstance(const QString &location) QString ext = location_file.completeSuffix(); // QString sample_name = location_file.baseName(); IdentificationDataSourceSp p_identfile = nullptr; - if(ext.toLower() == "xml") + if((ext.toLower() == "xml") || (ext.toLower() == ".d.xml")) { // X!Tandem result file p_identfile = @@ -144,8 +147,8 @@ IdentificationDataSourceStore::getInstance(const QString &location) else if(ext.toLower() == "pepxml") { // pep xml file - p_identfile = - std::make_shared<IdentificationPepXmlFile>(location_file); + // p_identfile = + // std::make_shared<IdentificationPepXmlFile>(location_file); } else if(ext.toLower() == "dat") { @@ -155,7 +158,8 @@ IdentificationDataSourceStore::getInstance(const QString &location) } else { - p_identfile = std::make_shared<IdentificationPwizFile>(location_file); + // p_identfile = + // std::make_shared<IdentificationPwizFile>(location_file); } if(p_identfile == nullptr) { diff --git a/src/utils/identificationdatasourcestore.h b/src/utils/identificationdatasourcestore.h index b59e667a..a6091e91 100644 --- a/src/utils/identificationdatasourcestore.h +++ b/src/utils/identificationdatasourcestore.h @@ -30,8 +30,7 @@ *implementation ******************************************************************************/ -#ifndef IDENTIFICATIONDATASOURCESTORE_H -#define IDENTIFICATIONDATASOURCESTORE_H +#pragma once #include <map> #include <set> @@ -54,5 +53,3 @@ class IdentificationDataSourceStore std::map<QString, IdentificationDataSourceSp> _map_identification_data_sources; }; - -#endif // IDENTIFICATIONDATASOURCESTORE_H -- GitLab