Commit 9778ac21 authored by Olivier Langella's avatar Olivier Langella
Browse files

allow ods or tsv to trace peptides

parent 0c90418d
......@@ -1370,15 +1370,20 @@ MasschroqmlParser::startElement_peptide_traces(const QXmlAttributes & attributes
return false;
}
QString format = attributes.value("format");
if (format.isEmpty() ||
format != "tsv")
if (format.isEmpty()) {
format = "ods";
}
if (format != "tsv" && format != "ods")
{
_errorStr
= QObject::tr("the value '%1' of the format attribute in peptide_traces tag is not suported.\n Supported formats are : 'tsv'(default).").arg(format);
= QObject::tr("the value '%1' of the format attribute in peptide_traces tag is not suported.\n Supported formats are : 'ods'(default) and 'tsv'.").arg(format);
return false;
}
_p_my_chroq->setTracesDirectory(QDir(output_dir), McqTsvFormat::ods);
if (format == "ods") {
_p_my_chroq->setTracesDirectory(QDir(output_dir), McqTsvFormat::ods);
} else {
_p_my_chroq->setTracesDirectory(QDir(output_dir), McqTsvFormat::tsv);
}
QStringList list_peptide_ids = peptides.split(" ", QString::SkipEmptyParts);
foreach (const QString &peptide_id, list_peptide_ids) {
const Peptide* peptide = _p_my_chroq->getPeptide(peptide_id);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment