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

identification data source params written in xpip file

parent 4cdc04fc
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,15 @@ IdentificationDataSource::~IdentificationDataSource()
{
}
const std::map<IdentificationEngineStatistics, QVariant> & IdentificationDataSource::getIdentificationEngineStatisticsMap() const {
return _param_stats;
}
const std::map<IdentificationEngineParam, QVariant> & IdentificationDataSource::getIdentificationEngineParamMap() const {
return _params;
}
const PeptideEvidenceStore & IdentificationDataSource::getPeptideEvidenceStore() const {
return _peptide_evidence_store;
}
......
......@@ -114,6 +114,16 @@ public:
void addFastaFile (FastaFileSp file);
const std::vector<FastaFileSp> & getFastaFileList() const;
/** \brief get identification engine statistics map
*/
virtual const std::map<IdentificationEngineStatistics, QVariant> & getIdentificationEngineStatisticsMap() const;
/** \brief get identification engine param map
*/
virtual const std::map<IdentificationEngineParam, QVariant> & getIdentificationEngineParamMap() const;
protected :
QString _resource_name;
......
......@@ -194,6 +194,29 @@ void Xpip::writeIdentificationDataSourceList(const IdentificationDataSourceStore
_output_stream->writeAttribute("engine",QString("%1").arg(static_cast<std::int8_t>(ident_source_sp.get()->getIdentificationEngine())));
_output_stream->writeAttribute("version",ident_source_sp.get()->getIdentificationEngineVersion());
const std::map<IdentificationEngineParam, QVariant> params = ident_source_sp.get()->getIdentificationEngineParamMap();
if (params.size() > 0) {
_output_stream->writeStartElement("params");
for (const std::pair<IdentificationEngineParam, QVariant> stat_pair: params) {
_output_stream->writeStartElement("param");
_output_stream->writeAttribute("key",QString("%1").arg(static_cast<std::int8_t>(stat_pair.first)));
_output_stream->writeAttribute("value",stat_pair.second.toString());
_output_stream->writeEndElement();
}
_output_stream->writeEndElement();
}
const std::map<IdentificationEngineStatistics, QVariant> stats = ident_source_sp.get()->getIdentificationEngineStatisticsMap();
if (stats.size() > 0) {
_output_stream->writeStartElement("stats");
for (const std::pair<IdentificationEngineStatistics, QVariant> stat_pair: stats) {
_output_stream->writeStartElement("stat");
_output_stream->writeAttribute("key",QString("%1").arg(static_cast<std::int8_t>(stat_pair.first)));
_output_stream->writeAttribute("value",stat_pair.second.toString());
_output_stream->writeEndElement();
}
_output_stream->writeEndElement();
}
_output_stream->writeEndElement();
}
_output_stream->writeEndElement();
......
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