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

contaminant regexp connected, using QSettings to store regexp

parent 7193ac8a
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,7 @@ void ProjectWindow::refresh() {
}
void ProjectWindow::doAutomaticFilterParametersChanged(AutomaticFilterParameters parameters) {
qDebug() << "ProjectWindow::doAutomaticFilterParametersChanged begin ";
//_project_sp.get()->getProteinStore().setRegexpDecoyPattern(ui->contaminant_protein_regexp_line_edit->text());
_project_sp.get()->getProteinStore().setRegexpContaminantPattern(ui->contaminant_protein_regexp_line_edit->text());
_project_sp.get()->updateAutomaticFilters(parameters);
//re group
......
......@@ -29,13 +29,17 @@
#include "proteinstore.h"
#include <QDebug>
#include <QSettings>
ProteinStore::ProteinStore()
{
_regexp_contaminant.setPattern("^conta\\|");
QSettings settings;
_regexp_decoy.setPattern(".*\\|reversed$");
_regexp_contaminant.setPattern(settings.value("automatic_filter/contaminant_regexp","^conta\\|").toString());
_regexp_decoy.setPattern(settings.value("automatic_filter/decoy_regexp",".*\\|reversed$").toString());
}
ProteinStore::~ProteinStore()
......@@ -51,6 +55,8 @@ void ProteinStore::setRegexpContaminantPattern(const QString & pattern) {
for (std::pair<const QString, ProteinXtpSp> & acc_protein :_map_accession_protein_list) {
setProteinInformations(acc_protein.second);
}
QSettings settings;
settings.setValue("automatic_filter/contaminant_regexp", pattern);
}
QRegExp ProteinStore::getRegexpDecoy() const {
return (_regexp_decoy);
......@@ -61,6 +67,9 @@ void ProteinStore::setRegexpDecoyPattern(const QString & pattern) {
for (std::pair<const QString, ProteinXtpSp> & acc_protein :_map_accession_protein_list) {
setProteinInformations(acc_protein.second);
}
QSettings settings;
settings.setValue("automatic_filter/decoy_regexp", pattern);
}
ProteinXtpSp & ProteinStore::getInstance(ProteinXtpSp & peptide_in) {
......
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