Commit a2c22c28 authored by Olivier Langella's avatar Olivier Langella
Browse files

compar_result write line headers : to test

parent d5ed0965
......@@ -77,7 +77,17 @@ void MonitorComparInterfaceOutput::writeQuantifyEnd() {
//write headers
_p_writer->writeLine();
//mzid peptide m/z z sequence mods proteins
_p_writer->writeEmptyCell();
_p_writer->writeCell("peptide");
_p_writer->writeCell("m/z");
_p_writer->writeCell("z");
_p_writer->writeCell("isotope number");
_p_writer->writeCell("isotope rank");
_p_writer->writeCell("isotope ratio");
_p_writer->writeCell("sequence");
_p_writer->writeCell("mods");
_p_writer->writeCell("proteins");
for (const Msrun * p_msrun : _msrun_list) {
_p_writer->writeCell(p_msrun->getXmlId());
}
......@@ -85,7 +95,8 @@ void MonitorComparInterfaceOutput::writeQuantifyEnd() {
//write content
for (const QuantiItemBase * qitem : _qitem_list) {
_p_writer->writeLine();
_p_writer->writeCell(qitem->getQuantiItemId());
_p_writer->writeCell(qitem->getMzId());
qitem->writeOdsComparHeaderLine(*_p_writer);
std::map<const QuantiItemBase *, std::map<const Msrun *, pappso::pappso_double>>::const_iterator it_qitem = _compar_table.find(qitem);
if (it_qitem != _compar_table.end()) {
for (const Msrun * p_msrun : _msrun_list) {
......
......@@ -70,6 +70,30 @@ void QuantiItemBase::writeCurrentSearchItem(MCQXmlStreamWriter* _output_stream)
void QuantiItemBase::writeOdsPeptideLine(CalcWriterInterface & writer) const {
}
void QuantiItemBase::writeOdsComparHeaderLine(CalcWriterInterface & writer) const {
//_p_writer->writeCell("peptide");
writer.writeEmptyCell();
//_p_writer->writeCell("m/z");
writer.writeCell(getMz());
//_p_writer->writeCell("z");
writer.writeEmptyCell();
//_p_writer->writeCell("isotope number");
writer.writeEmptyCell();
//_p_writer->writeCell("isotope rank");
writer.writeEmptyCell();
//isotope ratio
writer.writeEmptyCell();
//_p_writer->writeCell("sequence");
writer.writeEmptyCell();
//_p_writer->writeCell("mods");
writer.writeEmptyCell();
//_p_writer->writeCell("proteins");
writer.writeEmptyCell();
}
pappso::PeptideNaturalIsotopeAverageSp QuantiItemBase::getPeptideNaturalIsotopeAverageSp () const {
pappso::PeptideNaturalIsotopeAverageSp emptySp;
return emptySp;
......
......@@ -95,6 +95,7 @@ public:
//virtual void getPepHeaders(QStringList & tmp_list) const ;
//virtual mcq_double getMatchingRt(const Msrun * msrun, McqMatchingMode match_mode) const;
virtual void writeOdsPeptideLine(CalcWriterInterface & writer) const;
virtual void writeOdsComparHeaderLine(CalcWriterInterface & writer) const;
bool isTraceOn() const;
......
......@@ -114,6 +114,35 @@ void QuantiItemPeptide::writeOdsPeptideLine(CalcWriterInterface & writer) const
writer.writeCell(_p_peptide->getMods());
}
void QuantiItemPeptide::writeOdsComparHeaderLine(CalcWriterInterface & writer) const {
//_p_writer->writeCell("peptide");
writer.writeCell(_p_peptide->getXmlId());
//_p_writer->writeCell("m/z");
writer.writeCell(getMz());
//_p_writer->writeCell("z");
writer.writeCell(_z);
//_p_writer->writeCell("isotope number");
writer.writeEmptyCell();
//_p_writer->writeCell("isotope rank");
writer.writeEmptyCell();
writer.writeEmptyCell();
//_p_writer->writeCell("sequence");
writer.writeCell(_p_peptide->getPappsoPeptideSp().get()->getSequence());
//_p_writer->writeCell("mods");
writer.writeCell(_p_peptide->getMods());
//_p_writer->writeCell("proteins");
QStringList protein_list;
for (const Protein * p_protein : _p_peptide->getProteinList()) {
protein_list << p_protein->getXmlId();
}
writer.writeCell(protein_list.join(" "));
}
CalcWriterInterface * QuantiItemPeptide::newCalcWriterInterface(const Quantificator * quantificator, const Msrun* p_msrun, const QString & prefix) const {
QDir trace_dir(QString("%1/%2/%3").arg(quantificator->getTracesDirectory().absolutePath()).arg(this->getPeptide()->getXmlId()).arg(p_msrun->getXmlId()));
trace_dir.mkpath(trace_dir.absolutePath());
......
......@@ -64,6 +64,8 @@ public:
/** get a unique identifier of the extracted xic mz or mz/rt or peptide+z or peptide+z+isotopenumber**/
virtual const QString getMzId() const override;
virtual void writeOdsPeptideLine(CalcWriterInterface & writer) const override;
virtual void writeOdsComparHeaderLine(CalcWriterInterface & writer) const override;
virtual XicTraceBase* newXicTrace(Quantificator * quantificator, Msrun* p_msrun, const QString & prefix) const override;
......
......@@ -74,6 +74,33 @@ void QuantiItemPeptideNaturalIsotope::writeOdsPeptideLine(CalcWriterInterface &
}
void QuantiItemPeptideNaturalIsotope::writeOdsComparHeaderLine(CalcWriterInterface & writer) const {
//_p_writer->writeCell("peptide");
writer.writeCell(_p_peptide->getXmlId());
//_p_writer->writeCell("m/z");
writer.writeCell(getMz());
//_p_writer->writeCell("z");
writer.writeCell(_z);
//_p_writer->writeCell("isotope number");
writer.writeCell(_peptide_natural_isotope_average_sp.get()->getIsotopeNumber());
//_p_writer->writeCell("isotope rank");
writer.writeCell(_peptide_natural_isotope_average_sp.get()->getIsotopeRank());
writer.writeCell(_peptide_natural_isotope_average_sp.get()->getIntensityRatio());
//_p_writer->writeCell("sequence");
writer.writeCell(_p_peptide->getPappsoPeptideSp().get()->getSequence());
//_p_writer->writeCell("mods");
writer.writeCell(_p_peptide->getMods());
//_p_writer->writeCell("proteins");
QStringList protein_list;
for (const Protein * p_protein : _p_peptide->getProteinList()) {
protein_list << p_protein->getXmlId();
}
writer.writeCell(protein_list.join(" "));
}
pappso::PeptideNaturalIsotopeAverageSp QuantiItemPeptideNaturalIsotope::getPeptideNaturalIsotopeAverageSp () const {
return _peptide_natural_isotope_average_sp;
}
......
......@@ -37,6 +37,8 @@ public:
/** get a unique identifier of the extracted xic mz or mz/rt or peptide+z or peptide+z+isotopenumber**/
virtual const QString getMzId() const override;
virtual void writeOdsPeptideLine(CalcWriterInterface & writer) const override;
virtual void writeOdsComparHeaderLine(CalcWriterInterface & writer) const override;
virtual pappso::PeptideNaturalIsotopeAverageSp getPeptideNaturalIsotopeAverageSp () const override;
......
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