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

protein match validation OK

parent cafd9651
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,10 @@ void ProteinMatch::updateAutomaticFilters(const AutomaticFilterParameters & auto
}
}
if (number_of_valid_peptides > 0) {
if (number_of_valid_peptides == 0) {
_proxy_valid = false;
} else {
if (number_of_valid_peptides < automatic_filter_parameters.getFilterMinimumPeptidePerMatch()) {
}
......
......@@ -54,15 +54,15 @@ void ProteinTableModel::setIdentificationGroup(IdentificationGroup * p_identific
int ProteinTableModel::rowCount(const QModelIndex &parent ) const {
qDebug() << "ProteinTableModel::rowCount begin ";
//qDebug() << "ProteinTableModel::rowCount begin ";
if (_p_identification_group != nullptr) {
qDebug() << "ProteinTableModel::rowCount(const QModelIndex &parent ) " << _p_identification_group->getProteinMatchList().size();
//qDebug() << "ProteinTableModel::rowCount(const QModelIndex &parent ) " << _p_identification_group->getProteinMatchList().size();
return (int) _p_identification_group->getProteinMatchList().size();
}
return 0;
}
int ProteinTableModel::columnCount(const QModelIndex &parent ) const {
qDebug() << "ProteinTableModel::columnCount begin ";
//qDebug() << "ProteinTableModel::columnCount begin ";
if (_p_identification_group != nullptr) {
return _columns.size();
}
......
......@@ -35,9 +35,9 @@ ProteinTableProxyModel::ProteinTableProxyModel(ProteinListWindow * p_protein_lis
bool ProteinTableProxyModel::filterAcceptsRow(int source_row,
const QModelIndex &source_parent) const {
try {
qDebug() << "ProteinTableProxyModel::filterAcceptsRow begin " << source_row;
//qDebug() << "ProteinTableProxyModel::filterAcceptsRow begin " << source_row;
ProteinMatch * protein_match = _protein_table_model_p->getIdentificationGroup()->getProteinMatchList().at(source_row);
qDebug() << "ProteinTableProxyModel::filterAcceptsRow protein_match " << source_row;
//qDebug() << "ProteinTableProxyModel::filterAcceptsRow protein_match " << source_row;
if (!_protein_search_string.isEmpty()) {
if (!protein_match->getProteinXtpSp().get()->getDescription().contains(_protein_search_string)) {
......@@ -45,27 +45,27 @@ bool ProteinTableProxyModel::filterAcceptsRow(int source_row,
}
}
qDebug() << "ProteinTableProxyModel::filterAcceptsRow valid ";
//qDebug() << "ProteinTableProxyModel::filterAcceptsRow valid ";
if (_hide_not_valid) {
if (! protein_match->isValid()) {
return false;
}
}
qDebug() << "ProteinTableProxyModel::filterAcceptsRow checked ";
//qDebug() << "ProteinTableProxyModel::filterAcceptsRow checked ";
if (_hide_not_checked) {
if (! protein_match->isChecked()) {
return false;
}
}
qDebug() << "ProteinTableProxyModel::filterAcceptsRow grouped ";
//qDebug() << "ProteinTableProxyModel::filterAcceptsRow grouped ";
pappso::GrpProtein * p_grp_prot = protein_match->getGrpProteinSp().get();
if (_hide_not_grouped) {
if (p_grp_prot == nullptr) {
return false;
}
qDebug() << "ProteinTableProxyModel::filterAcceptsRow grouped 2";
//qDebug() << "ProteinTableProxyModel::filterAcceptsRow grouped 2";
if (p_grp_prot->getGroupingId().isEmpty()) {
return false;
}
......
......@@ -59,9 +59,15 @@
</item>
<item>
<widget class="QCheckBox" name="validCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>valid</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......
......@@ -63,6 +63,7 @@ void ProteinWindow::doIdentificationGroupGrouped(IdentificationGroup * p_identif
void ProteinWindow::updateDisplay() {
try {
ui->validCheckBox->setCheckState(Qt::Unchecked);
if (_p_protein_match->isValid()) ui->validCheckBox->setCheckState(Qt::Checked);
ui->descriptionLabel->setText(_p_protein_match->getProteinXtpSp().get()->getAccession());
//ui->sequenceLabel->setText(_p_protein_match->getProteinXtpSp().get()->getSequence());
......
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