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

identification data source read and write fixed

parent ac3491eb
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,12 @@ IdentificationDataSource::IdentificationDataSource(const IdentificationDataSourc
_ms_run_sp = other._ms_run_sp;
_resource_name = other._resource_name;
_xml_id = other._xml_id;
_version = other._version;
_params = other._params;
_param_stats = other._param_stats;
_fastafile_list = other._fastafile_list;
//PeptideEvidenceStore _peptide_evidence_store;
}
IdentificationDataSource::~IdentificationDataSource()
......
......@@ -43,6 +43,8 @@ MsRun::MsRun(const MsRun& other) {
_xml_id = other._xml_id;
_location = other._location;
_name = other._name;
_mz_format=other._mz_format;
_param_stats = other._param_stats;
}
MsRun::~MsRun() {
......
......@@ -167,7 +167,9 @@ bool XtpXpipSaxHandler::endElement(const QString & namespaceURI, const QString &
else if (qName == "identification_group") {
is_ok = endElement_identification_group();
}
else if (qName == "identification_source") {
is_ok = endElement_identification_source();
}
// end of detection_moulon
// else if ((_tag_stack.size() > 1) &&
......@@ -307,17 +309,17 @@ bool XtpXpipSaxHandler::startElement_identification_source(QXmlAttributes attrib
qDebug() << "startElement_identification_source ";
IdentificationEngine engine = static_cast<IdentificationEngine>(attributes.value("engine").toUInt());
IdentificationDataSourceSp sp_ident_source = _p_project->getIdentificationDataSourceStore().getInstance(attributes.value("path").simplified(), engine);
sp_ident_source.get()->setXmlId(attributes.value("id").simplified());
_map_ident_sources.insert(std::pair<QString, IdentificationDataSourceSp>(sp_ident_source.get()->getXmlId(), sp_ident_source));
_sp_current_identification_source = _p_project->getIdentificationDataSourceStore().getInstance(attributes.value("path").simplified(), engine);
_sp_current_identification_source.get()->setXmlId(attributes.value("id").simplified());
_map_ident_sources.insert(std::pair<QString, IdentificationDataSourceSp>(_sp_current_identification_source.get()->getXmlId(), _sp_current_identification_source));
qDebug() << "startElement_identification_source setMsRunSp";
sp_ident_source->setMsRunSp(_map_msruns.at(attributes.value("msrun_id").simplified()));
_sp_current_identification_source->setMsRunSp(_map_msruns.at(attributes.value("msrun_id").simplified()));
qDebug() << "startElement_identification_source setIdentificationEngineVersion";
sp_ident_source->setIdentificationEngineVersion(attributes.value("version"));
_sp_current_identification_source->setIdentificationEngineVersion(attributes.value("version"));
for (const QString & fasta_id : attributes.value("fasta_ids").split(" ")) {
sp_ident_source.get()->addFastaFile(_map_fasta_files.at(fasta_id));
_sp_current_identification_source.get()->addFastaFile(_map_fasta_files.at(fasta_id));
}
//_current_identification_group_p->addMsRunSp(ms_run);
......@@ -482,6 +484,11 @@ bool XtpXpipSaxHandler::endElement_identification_group() {
_current_identification_group_p = nullptr;
return true;
}
bool XtpXpipSaxHandler::endElement_identification_source() {
qDebug() << "endElement_identification_source ";
_sp_current_identification_source = nullptr;
return true;
}
bool XtpXpipSaxHandler::endElement_peptide_evidence_list() {
qDebug() << "endElement_peptide_evidence_list ";
......
......@@ -94,6 +94,7 @@ private:
bool endElement_peptide_evidence();
bool endElement_peptide_evidence_list();
bool endElement_identification_group();
bool endElement_identification_source();
private:
WorkMonitorInterface * _p_monitor;
......
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