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

look for sequence LI in protein list

parent 4467be1a
No related branches found
Tags xtpcpp_0.2.17-1
No related merge requests found
......@@ -96,7 +96,12 @@
</item>
<item>
<property name="text">
<string>sequence</string>
<string extracomment="look for protein sequence containing this amino acid sequence.">sequence</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="look for protein sequence containing these amino acids, but considering that L and I is the same.">sequence LI</string>
</property>
</item>
</widget>
......
......@@ -47,7 +47,9 @@ ProteinListQactionColumn::ProteinListQactionColumn(ProteinListWindow *parent,
#if QT_VERSION >= 0x050000
// Qt5 code
connect(this, &ProteinListQactionColumn::toggled, this,
connect(this,
&ProteinListQactionColumn::toggled,
this,
&ProteinListQactionColumn::doToggled);
#else
// Qt4 code
......@@ -116,26 +118,41 @@ ProteinListWindow::ProteinListWindow(ProjectWindow *parent)
#if QT_VERSION >= 0x050000
// Qt5 code
connect(_project_window, &ProjectWindow::identificationGroupGrouped, this,
connect(_project_window,
&ProjectWindow::identificationGroupGrouped,
this,
&ProteinListWindow::doIdentificationGroupGrouped);
connect(this, &ProteinListWindow::proteinDataChanged, _protein_table_model_p,
connect(this,
&ProteinListWindow::proteinDataChanged,
_protein_table_model_p,
&ProteinTableModel::onProteinDataChanged);
connect(ui->tableView, &QTableView::clicked, _p_proxy_model,
connect(ui->tableView,
&QTableView::clicked,
_p_proxy_model,
&ProteinTableProxyModel::onTableClicked);
connect(ui->centralwidget, &QWidget::customContextMenuRequested, this,
connect(ui->centralwidget,
&QWidget::customContextMenuRequested,
this,
&ProteinListWindow::showContextMenu);
connect(_protein_table_model_p, &ProteinTableModel::layoutChanged, this,
connect(_protein_table_model_p,
&ProteinTableModel::layoutChanged,
this,
&ProteinListWindow::updateStatusBar);
#else
// Qt4 code
connect(_project_window,
SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this,
SIGNAL(identificationGroupGrouped(IdentificationGroup *)),
this,
SLOT(doIdentificationGroupGrouped(IdentificationGroup *)));
connect(this, SIGNAL(proteinDataChanged()), _protein_table_model_p,
connect(this,
SIGNAL(proteinDataChanged()),
_protein_table_model_p,
SLOT(onProteinDataChanged()));
connect(ui->tableView, SIGNAL(clicked(const QModelIndex &)), _p_proxy_model,
connect(ui->tableView,
SIGNAL(clicked(const QModelIndex &)),
_p_proxy_model,
SLOT(onTableClicked(const QModelIndex &)));
// connect(ui->tableView, SIGNAL(doubleClicked(const QModelIndex &)),
// _p_proxy_model, SLOT(onTableDoubleClicked(const QModelIndex &)));
......@@ -145,11 +162,15 @@ ProteinListWindow::ProteinListWindow(ProjectWindow *parent)
// connect( this, SIGNAL( focusReceived(bool) ),this,
// SLOT(doFocusReceived(bool)) );
connect(ui->centralwidget, SIGNAL(customContextMenuRequested(const QPoint &)),
this, SLOT(showContextMenu(const QPoint &)));
connect(ui->centralwidget,
SIGNAL(customContextMenuRequested(const QPoint &)),
this,
SLOT(showContextMenu(const QPoint &)));
// connect(_p_proxy_model, SIGNAL(layoutChanged()),
// this, SLOT(doProxyLayoutChanged()));
connect(_protein_table_model_p, SIGNAL(layoutChanged()), this,
connect(_protein_table_model_p,
SIGNAL(layoutChanged()),
this,
SLOT(updateStatusBar()));
#endif
}
......
......@@ -197,6 +197,18 @@ ProteinTableProxyModel::filterAcceptsRow(int source_row,
return false;
}
}
else if(_search_on == "sequence LI")
{
QString peptide_search_string =
QString(_protein_search_string).replace("L", "I");
QString protein_sequence_li =
QString(protein_match->getProteinXtpSp().get()->getSequence())
.replace("L", "I");
if(!protein_sequence_li.contains(peptide_search_string))
{
return false;
}
}
else if(_search_on == "peptide")
{
QString peptide_search_string =
......@@ -366,7 +378,8 @@ ProteinTableProxyModel::data(const QModelIndex &index, int role) const
}
QVariant
ProteinTableProxyModel::headerData(int section, Qt::Orientation orientation,
ProteinTableProxyModel::headerData(int section,
Qt::Orientation orientation,
int role) const
{
int col = mapToSource(index(0, section)).column();
......
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