Commit 953b3cac authored by Langella Olivier's avatar Langella Olivier
Browse files

WIP: no matching mode

parent d777bbc9
......@@ -94,92 +94,110 @@ void
MonitorComparInterfaceOutput::writeQuantifyEnd()
{
qDebug() << "MonitorComparInterfaceOutput::writeQuantifyEnd begin";
// sort quanti items :
sort(_qitem_list.begin(),
_qitem_list.end(),
[](const QuantiItemBase *l1, const QuantiItemBase *l2) {
return (l1->getMzId() < l2->getMzId());
});
// sort samples :
sort(_msrun_list.begin(),
_msrun_list.end(),
[](const Msrun *l1, const Msrun *l2) {
return (l1->getMsRunIdCstSPtr()->getXmlId() <
l2->getMsRunIdCstSPtr()->getXmlId());
});
// write headers
_p_writer->writeLine();
// mzid peptide m/z z sequence mods proteins
_p_writer->writeEmptyCell();
_p_writer->setCellAnnotation("peptide id");
_p_writer->writeCell("peptide");
_p_writer->writeCell("m/z");
_p_writer->setCellAnnotation(
"retention time in seconds, adjusted by MassChroQ");
_p_writer->writeCell("rt reference (seconds)");
_p_writer->setCellAnnotation("peptide charge");
_p_writer->writeCell("z");
_p_writer->setCellAnnotation("natural isotope number");
_p_writer->writeCell("isotope number");
_p_writer->setCellAnnotation("natural isotope rank");
_p_writer->writeCell("isotope rank");
_p_writer->setCellAnnotation("natural isotope theoretical ratio");
_p_writer->writeCell("isotope ratio");
_p_writer->setCellAnnotation(
"peptide sequence (containing OBO PSIMOD modifications)");
_p_writer->writeCell("sequence");
_p_writer->setCellAnnotation("isotope label (tag)");
_p_writer->writeCell("isotope");
_p_writer->setCellAnnotation("peptide modifications (free text)");
_p_writer->writeCell("mods");
_p_writer->setCellAnnotation("protein ids");
_p_writer->writeCell("proteins");
for(const Msrun *p_msrun : _msrun_list)
try
{
_p_writer->writeCell(p_msrun->getMsRunIdCstSPtr()->getXmlId());
}
// sort quanti items :
sort(_qitem_list.begin(),
_qitem_list.end(),
[](const QuantiItemBase *l1, const QuantiItemBase *l2) {
return (l1->getMzId() < l2->getMzId());
});
// sort samples :
sort(_msrun_list.begin(),
_msrun_list.end(),
[](const Msrun *l1, const Msrun *l2) {
return (l1->getMsRunIdCstSPtr()->getXmlId() <
l2->getMsRunIdCstSPtr()->getXmlId());
});
QString start_position;
// write content
for(const QuantiItemBase *qitem : _qitem_list)
{
// write headers
_p_writer->writeLine();
_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())
// mzid peptide m/z z sequence mods proteins
_p_writer->writeEmptyCell();
_p_writer->setCellAnnotation("peptide id");
_p_writer->writeCell("peptide");
_p_writer->writeCell("m/z");
_p_writer->setCellAnnotation(
"retention time in seconds, adjusted by MassChroQ");
_p_writer->writeCell("rt reference (seconds)");
_p_writer->setCellAnnotation("peptide charge");
_p_writer->writeCell("z");
_p_writer->setCellAnnotation("natural isotope number");
_p_writer->writeCell("isotope number");
_p_writer->setCellAnnotation("natural isotope rank");
_p_writer->writeCell("isotope rank");
_p_writer->setCellAnnotation("natural isotope theoretical ratio");
_p_writer->writeCell("isotope ratio");
_p_writer->setCellAnnotation(
"peptide sequence (containing OBO PSIMOD modifications)");
_p_writer->writeCell("sequence");
_p_writer->setCellAnnotation("isotope label (tag)");
_p_writer->writeCell("isotope");
_p_writer->setCellAnnotation("peptide modifications (free text)");
_p_writer->writeCell("mods");
_p_writer->setCellAnnotation("protein ids");
_p_writer->writeCell("proteins");
for(const Msrun *p_msrun : _msrun_list)
{
_p_writer->writeCell(p_msrun->getMsRunIdCstSPtr()->getXmlId());
}
QString start_position;
// write content
for(const QuantiItemBase *qitem : _qitem_list)
{
for(const Msrun *p_msrun : _msrun_list)
_p_writer->writeLine();
_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())
{
std::map<const Msrun *, pappso::pappso_double>::const_iterator
it_msrun = it_qitem->second.find(p_msrun);
if(it_msrun == it_qitem->second.end())
{
_p_writer->writeEmptyCell();
}
else
for(const Msrun *p_msrun : _msrun_list)
{
_p_writer->writeCell(it_msrun->second);
}
if(start_position.isEmpty())
{
start_position = _p_writer->getOdsCellCoordinate();
std::map<const Msrun *, pappso::pappso_double>::const_iterator
it_msrun = it_qitem->second.find(p_msrun);
if(it_msrun == it_qitem->second.end())
{
_p_writer->writeEmptyCell();
}
else
{
_p_writer->writeCell(it_msrun->second);
}
if(start_position.isEmpty())
{
start_position = _p_writer->getOdsCellCoordinate();
}
}
}
}
}
OdsColorScale color_scale(start_position, _p_writer->getOdsCellCoordinate());
_p_writer->addColorScale(color_scale);
_compar_table.clear();
_msrun_list.clear();
_qitem_list.clear();
OdsColorScale color_scale(start_position,
_p_writer->getOdsCellCoordinate());
_p_writer->addColorScale(color_scale);
_compar_table.clear();
_msrun_list.clear();
_qitem_list.clear();
}
catch(OdsException &ods_error)
{
throw mcqError(
QObject::tr("error in MonitorComparInterfaceOutput::writeQuantifyEnd "
"group %1:\n%2")
.arg(_current_group_id)
.arg(ods_error.qwhat()));
}
catch(std::exception &error)
{
throw mcqError(
QObject::tr("error in MonitorComparInterfaceOutput::writeQuantifyEnd "
"group %1 :\n%2")
.arg(_current_group_id)
.arg(error.what()));
}
qDebug() << "MonitorComparInterfaceOutput::writeQuantifyEnd end";
}
......
......@@ -152,12 +152,6 @@ MapQuanti::operator()(QuantiItemBase *p_currentSearchItem)
"Error in MapQuanti::operator() pappso::PappsoException:\n %1")
.arg(errorp.qwhat()));
}
catch(mcqError &errorException)
{
mcqerr() << " MapQuanti::operator " << errorException.qwhat();
throw mcqError(QObject::tr("Error in MapQuanti::operator() :\n %1")
.arg(errorException.qwhat()));
}
catch(std::exception &e)
{
......
# cd buildwin64
# cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../win64/work.cmake ..
# cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=../win64/work.cmake ..
#set(ODSSTREAM_QT5_FOUND 1)
#set(ODSSTREAM_INCLUDE_DIR "/home/olivier/eclipse/git/libodsstream/src")
......
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