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

FDR computation OK

parent 4a50ada7
No related branches found
No related tags found
No related merge requests found
...@@ -138,14 +138,23 @@ void ProjectWindow::refreshGroup(IdentificationGroup * p_ident_group) { ...@@ -138,14 +138,23 @@ void ProjectWindow::refreshGroup(IdentificationGroup * p_ident_group) {
qDebug() << "ProjectWindow::refreshGroup end"; qDebug() << "ProjectWindow::refreshGroup end";
} }
void ProjectWindow::computeFdr() { void ProjectWindow::computeFdr(ValidationState state) {
pappso::pappso_double total_prot=0; pappso::pappso_double total_prot=0;
pappso::pappso_double false_prot=0; pappso::pappso_double false_prot=0;
for (IdentificationGroup * identification_group : _project_sp.get()->getIdentificationGroupList()) { for (IdentificationGroup * identification_group : _project_sp.get()->getIdentificationGroupList()) {
total_prot += identification_group->countProtein(ValidationState::grouped); total_prot += identification_group->countProtein(state);
false_prot += identification_group->countDecoyProtein(ValidationState::grouped); false_prot += identification_group->countDecoyProtein(state);
} }
ui->protein_fdr_label->setText(QString("%1 %").arg(false_prot/total_prot)); ui->protein_fdr_label->setText(QString("%1 %").arg(false_prot/total_prot));
pappso::pappso_double total_peptide=0;
pappso::pappso_double false_peptide=0;
for (IdentificationGroup * identification_group : _project_sp.get()->getIdentificationGroupList()) {
//total_peptide += identification_group->countPeptideMatch(state);
//false_peptide += identification_group->countDecoyPeptideMatch(state);
}
ui->peptide_fdr_label->setText(QString("%1 %").arg(false_peptide/total_peptide));
} }
void ProjectWindow::doFdrChanged() { void ProjectWindow::doFdrChanged() {
...@@ -158,7 +167,7 @@ void ProjectWindow::doFdrChanged() { ...@@ -158,7 +167,7 @@ void ProjectWindow::doFdrChanged() {
doIdentificationGroupEdited(identification_group); doIdentificationGroupEdited(identification_group);
} }
computeFdr(); computeFdr(ValidationState::grouped);
qDebug() << "ProjectWindow::doFdrChanged end "; qDebug() << "ProjectWindow::doFdrChanged end ";
} }
void ProjectWindow::doAutomaticFilterParametersChanged(AutomaticFilterParameters parameters) { void ProjectWindow::doAutomaticFilterParametersChanged(AutomaticFilterParameters parameters) {
...@@ -336,6 +345,6 @@ void ProjectWindow::setProjectSp(ProjectSp project_sp) { ...@@ -336,6 +345,6 @@ void ProjectWindow::setProjectSp(ProjectSp project_sp) {
//_protein_list_window->show(); //_protein_list_window->show();
ui->decoy_protein_regexp_line_edit->setText(_project_sp.get()->getProteinStore().getRegexpDecoy().pattern()); ui->decoy_protein_regexp_line_edit->setText(_project_sp.get()->getProteinStore().getRegexpDecoy().pattern());
computeFdr(); computeFdr(ValidationState::grouped);
this->setEnabled(true); this->setEnabled(true);
} }
...@@ -68,7 +68,7 @@ protected : ...@@ -68,7 +68,7 @@ protected :
void doViewPeptideDetail(PeptideMatch * peptide_match); void doViewPeptideDetail(PeptideMatch * peptide_match);
void doViewProteinDetail(ProteinMatch * protein_match); void doViewProteinDetail(ProteinMatch * protein_match);
void doIdentificationGroupEdited(IdentificationGroup * p_identification_group); void doIdentificationGroupEdited(IdentificationGroup * p_identification_group);
void computeFdr(); void computeFdr(ValidationState state);
private : private :
void connectNewProteinListWindow(); void connectNewProteinListWindow();
......
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