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

first fix for issue #23

parent d45a245f
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ class IdentificationDataSource ...@@ -42,7 +42,7 @@ class IdentificationDataSource
public: public:
IdentificationDataSource(const QString resource_name); IdentificationDataSource(const QString resource_name);
IdentificationDataSource(const IdentificationDataSource &other); IdentificationDataSource(const IdentificationDataSource &other);
~IdentificationDataSource(); virtual ~IdentificationDataSource();
PeptideEvidenceStore &getPeptideEvidenceStore(); PeptideEvidenceStore &getPeptideEvidenceStore();
const PeptideEvidenceStore &getPeptideEvidenceStore() const; const PeptideEvidenceStore &getPeptideEvidenceStore() const;
......
...@@ -50,6 +50,7 @@ IdentificationDataSourceSp ...@@ -50,6 +50,7 @@ IdentificationDataSourceSp
IdentificationDataSourceStore::getInstance(const QString &location, IdentificationDataSourceStore::getInstance(const QString &location,
IdentificationEngine engine) IdentificationEngine engine)
{ {
//TODO file format read needs a fix
qDebug() << "IdentificationDataSourceStore::getInstance begin " << location; qDebug() << "IdentificationDataSourceStore::getInstance begin " << location;
std::map<QString, IdentificationDataSourceSp>::iterator it = std::map<QString, IdentificationDataSourceSp>::iterator it =
_map_identification_data_sources.find(location); _map_identification_data_sources.find(location);
...@@ -75,11 +76,13 @@ IdentificationDataSourceStore::getInstance(const QString &location, ...@@ -75,11 +76,13 @@ IdentificationDataSourceStore::getInstance(const QString &location,
else if(ext.toLower() == "pep") else if(ext.toLower() == "pep")
{ {
// pep xml file // pep xml file
p_identfile = std::make_shared<IdentificationPwizFile>(location_file); // p_identfile =
// std::make_shared<IdentificationPwizFile>(location_file);
} }
else else
{ {
//p_identfile = std::make_shared<IdentificationPwizFile>(location_file); // p_identfile =
// std::make_shared<IdentificationPwizFile>(location_file);
} }
if(p_identfile == nullptr) if(p_identfile == nullptr)
{ {
...@@ -123,7 +126,7 @@ IdentificationDataSourceStore::getInstance(const QString &location) ...@@ -123,7 +126,7 @@ IdentificationDataSourceStore::getInstance(const QString &location)
QString ext = location_file.completeSuffix(); QString ext = location_file.completeSuffix();
// QString sample_name = location_file.baseName(); // QString sample_name = location_file.baseName();
IdentificationDataSourceSp p_identfile = nullptr; IdentificationDataSourceSp p_identfile = nullptr;
if(ext.toLower() == "xml") if((ext.toLower() == "xml") || (ext.toLower() == ".d.xml"))
{ {
// X!Tandem result file // X!Tandem result file
p_identfile = p_identfile =
...@@ -144,8 +147,8 @@ IdentificationDataSourceStore::getInstance(const QString &location) ...@@ -144,8 +147,8 @@ IdentificationDataSourceStore::getInstance(const QString &location)
else if(ext.toLower() == "pepxml") else if(ext.toLower() == "pepxml")
{ {
// pep xml file // pep xml file
p_identfile = // p_identfile =
std::make_shared<IdentificationPepXmlFile>(location_file); // std::make_shared<IdentificationPepXmlFile>(location_file);
} }
else if(ext.toLower() == "dat") else if(ext.toLower() == "dat")
{ {
...@@ -155,7 +158,8 @@ IdentificationDataSourceStore::getInstance(const QString &location) ...@@ -155,7 +158,8 @@ IdentificationDataSourceStore::getInstance(const QString &location)
} }
else else
{ {
p_identfile = std::make_shared<IdentificationPwizFile>(location_file); // p_identfile =
// std::make_shared<IdentificationPwizFile>(location_file);
} }
if(p_identfile == nullptr) if(p_identfile == nullptr)
{ {
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
*implementation *implementation
******************************************************************************/ ******************************************************************************/
#ifndef IDENTIFICATIONDATASOURCESTORE_H #pragma once
#define IDENTIFICATIONDATASOURCESTORE_H
#include <map> #include <map>
#include <set> #include <set>
...@@ -54,5 +53,3 @@ class IdentificationDataSourceStore ...@@ -54,5 +53,3 @@ class IdentificationDataSourceStore
std::map<QString, IdentificationDataSourceSp> std::map<QString, IdentificationDataSourceSp>
_map_identification_data_sources; _map_identification_data_sources;
}; };
#endif // IDENTIFICATIONDATASOURCESTORE_H
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