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

display separately fdr on psm and on peptides

parent 73d5c7c5
No related branches found
No related tags found
No related merge requests found
......@@ -442,6 +442,16 @@ IdentificationGroup::getTabName() const
return _ms_run_list[0]->getSampleName();
}
pappso::pappso_double
IdentificationGroup::getPsmFdr(ValidationState state) const
{
pappso::pappso_double total_peptide = countPeptideEvidence(state);
pappso::pappso_double false_peptide = countDecoyPeptideEvidence(state);
return (false_peptide / total_peptide);
}
pappso::pappso_double
IdentificationGroup::getPeptideMassFdr(ValidationState state) const
......
......@@ -125,6 +125,12 @@ class IdentificationGroup
pappso::pappso_double
getPeptideMassFdr(ValidationState state = ValidationState::valid) const;
/** @brief get False Discovery Rate of psm, peptide spectrum match (unique
* PeptideEvidence object)
*/
pappso::pappso_double
getPsmFdr(ValidationState state = ValidationState::valid) const;
/** @brief validate or invalidate peptides and proteins based automatic
* filters and manual checks
......
......@@ -191,7 +191,7 @@
<string>FDR</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="1">
<item row="1" column="1">
<widget class="QLabel" name="peptide_fdr_label">
<property name="toolTip">
<string/>
......@@ -201,21 +201,21 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>FDR on proteins</string>
</property>
</widget>
</item>
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>FDR on peptides</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QLabel" name="protein_fdr_label">
<property name="toolTip">
<string/>
......@@ -225,6 +225,20 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="psm_fdr_label">
<property name="text">
<string>0 %</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>FDR on psm</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
......@@ -272,19 +272,27 @@ ProjectWindow::computeFdr()
pappso::pappso_double false_prot = 0;
pappso::pappso_double total_peptide = 0;
pappso::pappso_double false_peptide = 0;
pappso::pappso_double total_psm = 0;
pappso::pappso_double false_psm = 0;
for(IdentificationGroup *identification_group :
_project_sp.get()->getIdentificationGroupList())
{
total_prot += identification_group->countProteinMatch(state);
false_prot += identification_group->countDecoyProteinMatch(state);
total_peptide += identification_group->countPeptideEvidence(state);
false_peptide +=
total_psm += identification_group->countPeptideEvidence(state);
false_psm +=
identification_group->countDecoyPeptideEvidence(state);
total_peptide += identification_group->countPeptideMassSample(state);
false_peptide +=
identification_group->countDecoyPeptideMassSample(state);
}
ui->protein_fdr_label->setText(QString("%1 %").arg(
QString::number((false_prot / total_prot) * 100.0, 'f', 2)));
ui->peptide_fdr_label->setText(QString("%1 %").arg(
QString::number((false_peptide / total_peptide) * 100.0, 'f', 2)));
ui->psm_fdr_label->setText(QString("%1 %").arg(
QString::number((false_psm / total_psm) * 100.0, 'f', 2)));
}
catch(pappso::PappsoException exception_pappso)
{
......
......@@ -75,6 +75,7 @@ GroupingSheet::writeIdentificationGroup(IdentificationGroup *p_ident)
p_ident->countPeptideMassSample(ValidationState::grouped));
_p_writer->writeCellPercentage(p_ident->getProteinFdr(ValidationState::valid));
_p_writer->writeCellPercentage(p_ident->getPeptideMassFdr(ValidationState::valid));
_p_writer->writeCellPercentage(p_ident->getPsmFdr(ValidationState::valid));
}
......@@ -106,11 +107,15 @@ GroupingSheet::writeHeaders()
"peptide sequence+modifications+sample name");
_p_writer->writeCell("peptide/mass/sample");
_p_writer->setCellAnnotation(
"FDR at the protein level (number of decoy valid proteins / totale number "
"FDR at the protein level (number of decoy valid proteins / total number "
"of valid proteins)");
_p_writer->writeCell("prot FDR");
_p_writer->setCellAnnotation(
"FDR at the peptide level (number of decoy valid peptides / totale number "
"FDR at the peptide level (number of decoy valid peptides / total number "
"of valid peptides)");
_p_writer->writeCell("pep FDR");
_p_writer->setCellAnnotation(
"FDR at the peptide spectrum match (peptide evidences for each association of a spectrum to a peptide, overall identification engines) level (number of decoy valid psms / total number "
"of valid peptides)");
_p_writer->writeCell("psm FDR");
}
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