Skip to content
Snippets Groups Projects
Commit 99c148fd authored by Renne Thomas's avatar Renne Thomas
Browse files

Use same object for Protein checked in PTM and Protein windows

parent f8582d20
No related branches found
No related tags found
1 merge request!33Multiples Corrections and features implementations
......@@ -198,6 +198,10 @@ PtmIslandListWindow::setColumnMenuList()
}
}
void PtmIslandListWindow::edited()
{
_project_window->doIdentificationGroupEdited(_p_identification_group);
}
void
PtmIslandListWindow::doNotCheckedHide(bool hide)
......
......@@ -79,7 +79,8 @@ class PtmIslandListWindow : public QMainWindow
void setPtmIslandListColumnDisplay(PtmIslandListColumn column, bool toggled);
bool getPtmIslandListColumnDisplay(PtmIslandListColumn column) const;
void setColumnMenuList();
void edited();
public slots:
void
doIdentificationPtmGroupGrouped(IdentificationGroup *p_identification_group);
......
......@@ -83,10 +83,7 @@ PtmIslandProxyModel::filterAcceptsRow(int source_row,
_p_ptm_island_table_model->getPtmGroupingExperiment()
->getPtmIslandList()
.at(source_row);
ProteinMatch *protein_match =
_p_ptm_island_table_model->getIdentificationGroup()
->getProteinMatchList()
.at(source_row);
ProteinMatch *protein_match = sp_ptm_island->getProteinMatch();
// qDebug() << "Prote
// qDebug() << "ProteinTableProxyModel::filterAcceptsRow protein_match "
// << source_row;
......@@ -222,6 +219,7 @@ PtmIslandProxyModel::onTableClicked(const QModelIndex &index)
{
p_protein_match->setChecked(true);
}
_p_ptm_island_list_window->edited();
}
else if((col == (std::int8_t)PtmIslandListColumn::accession) ||
(col == (std::int8_t)PtmIslandListColumn::description))
......
......@@ -234,9 +234,7 @@ PtmIslandTableModel::data(const QModelIndex &index, int role) const
if(col == (std::int8_t)
PtmIslandListColumn::checked) // add a checkbox to cell(1,0)
{
if(_p_identification_group->getProteinMatchList()
.at(row)
->isChecked())
if(getPtmGroupingExperiment()->getPtmIslandList().at(row)->getProteinMatch()->isChecked())
{
return Qt::Checked;
}
......
......@@ -263,47 +263,49 @@ MassChroQml::writeQuantificationTraces()
void
MassChroQml::writeQuantify()
{
for(MsRunAlignmentGroupSp group_sp : m_params.alignment_groups)
for(MsRunAlignmentGroupSp group_sp : m_params.alignment_groups)
{
//<quantify id="q1" withingroup="G1" quantification_method_id="my_qzivy">
_output_stream->writeStartElement("quantify");
_output_stream->writeAttribute("id", "q1");
_output_stream->writeAttribute("withingroup", group_sp->getMsRunAlignmentGroupName());
_output_stream->writeAttribute("quantification_method_id", "quant1");
//<peptides_in_peptide_list mode="real_or_mean" />
//</quantify>
//<quantify id="q2" withingroup="G2" quantification_method_id="my_moulon">
//<peptides_in_peptide_list mode="post_matching"
// isotope_label_refs="iso1 iso2" />
_output_stream->writeStartElement("peptides_in_peptide_list");
_output_stream->writeAttribute("mode", "post_matching");
_output_stream->writeAttribute("ni_min_abundance", "0.8");
//<quantify id="q1" withingroup="G1" quantification_method_id="my_qzivy">
_output_stream->writeStartElement("quantify");
_output_stream->writeAttribute("id", "q1");
LabelingMethod *p_labeling_method =
_sp_project.get()->getLabelingMethodSp().get();
if(p_labeling_method != nullptr)
{
QStringList isotope_label_ref;
for(const Label *p_label : p_labeling_method->getLabelList())
_output_stream->writeAttribute("withingroup",
group_sp->getMsRunAlignmentGroupName());
_output_stream->writeAttribute("quantification_method_id", "quant1");
//<peptides_in_peptide_list mode="real_or_mean" />
//</quantify>
//<quantify id="q2" withingroup="G2" quantification_method_id="my_moulon">
//<peptides_in_peptide_list mode="post_matching"
// isotope_label_refs="iso1 iso2" />
_output_stream->writeStartElement("peptides_in_peptide_list");
_output_stream->writeAttribute("mode", "post_matching");
_output_stream->writeAttribute("ni_min_abundance", "0.8");
LabelingMethod *p_labeling_method =
_sp_project.get()->getLabelingMethodSp().get();
if(p_labeling_method != nullptr)
{
isotope_label_ref << p_label->getXmlId();
QStringList isotope_label_ref;
for(const Label *p_label : p_labeling_method->getLabelList())
{
isotope_label_ref << p_label->getXmlId();
}
_output_stream->writeAttribute("isotope_label_refs",
isotope_label_ref.join(" "));
}
_output_stream->writeAttribute("isotope_label_refs",
isotope_label_ref.join(" "));
}
_output_stream->writeEndElement();
_output_stream->writeEndElement();
_output_stream->writeComment(
"<mz_list>732.317 449.754 552.234 464.251 "
"381.577 569.771 575.256</mz_list>");
_output_stream->writeComment(
"<mzrt_list>\n <mzrt mz=\"732.317\" rt=\"230.712\" />\n <mzrt "
"mz=\"575.256\" rt=\"254.788\" />\n </mzrt_list>");
_output_stream->writeComment(
"<mz_list>732.317 449.754 552.234 464.251 "
"381.577 569.771 575.256</mz_list>");
_output_stream->writeComment(
"<mzrt_list>\n <mzrt mz=\"732.317\" rt=\"230.712\" />\n "
"<mzrt "
"mz=\"575.256\" rt=\"254.788\" />\n </mzrt_list>");
//</quantify>
_output_stream->writeEndElement();
//</quantify>
_output_stream->writeEndElement();
}
}
......
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