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

fasta files references added to identification sources in xpip

parent e38a9899
No related branches found
No related tags found
No related merge requests found
......@@ -302,7 +302,7 @@ bool XtpXpipSaxHandler::startElement_identification_group(QXmlAttributes attribu
}
bool XtpXpipSaxHandler::startElement_identification_source(QXmlAttributes attributes) {
//<identification_source id="identa0" msrun_id="sampa0" path="/gorgone/pappso/formation/Janvier2014/TD/xml_tandem/20120906_balliau_extract_1_A01_urnb-1.xml" engine="1" version=""/>
//<identification_source id="identa0" msrun_id="sampa0" path="/espace/bio/tandem/20120906_balliau_extract_1_A01_urnb-1.xml" engine="1" version="2017.2.1.4" fasta_ids="fastaa0">
qDebug() << "startElement_identification_source ";
......@@ -315,6 +315,10 @@ bool XtpXpipSaxHandler::startElement_identification_source(QXmlAttributes attrib
sp_ident_source->setMsRunSp(_map_msruns.at(attributes.value("msrun_id").simplified()));
qDebug() << "startElement_identification_source setIdentificationEngineVersion";
sp_ident_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));
}
//_current_identification_group_p->addMsRunSp(ms_run);
qDebug() << "startElement_identification_source end" ;
......
......@@ -194,6 +194,12 @@ 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());
QStringList fasta_file_id;
for (FastaFileSp fasta_file :ident_source_sp.get()->getFastaFileList()) {
fasta_file_id << fasta_file.get()->getXmlId();
}
_output_stream->writeAttribute("fasta_ids",fasta_file_id.join(" "));
const std::map<IdentificationEngineParam, QVariant> params = ident_source_sp.get()->getIdentificationEngineParamMap();
if (params.size() > 0) {
_output_stream->writeStartElement("params");
......@@ -205,7 +211,7 @@ void Xpip::writeIdentificationDataSourceList(const IdentificationDataSourceStore
}
_output_stream->writeEndElement();
}
const std::map<IdentificationEngineStatistics, QVariant> stats = ident_source_sp.get()->getIdentificationEngineStatisticsMap();
if (stats.size() > 0) {
_output_stream->writeStartElement("stats");
......
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