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

new ODS grouping sheet

parent a6e498e2
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,7 @@ SET(CPP_FILES
output/ods/comparbasesheet.cpp
output/ods/comparspecificspectrasheet.cpp
output/ods/comparspectrasheet.cpp
output/ods/groupingsheet.cpp
output/ods/infosheet.cpp
output/ods/odsexport.cpp
output/ods/peptidepossheet.cpp
......
......@@ -47,6 +47,7 @@ const GroupStore & IdentificationGroup::getGroupStore() const {
}
unsigned int IdentificationGroup::countPeptideMassSample(ValidationState state) const {
std::vector<std::size_t> count_peptide_mass_sample;
for (auto & p_protein_match : _protein_match_list) {
p_protein_match->countPeptideMassSample(count_peptide_mass_sample, state);
......@@ -200,3 +201,23 @@ void IdentificationGroup::startGrouping (const GroupingType & grouping_type) {
const QString IdentificationGroup::getTabName() const {
return _ms_run_list[0]->getFilename();
}
pappso::pappso_double IdentificationGroup::getPeptideMassFdr(ValidationState state) const {
//ValidationState state = ValidationState::valid;
pappso::pappso_double total_peptide=countPeptideMassSample(state);
pappso::pappso_double false_peptide=countDecoyPeptideMassSample(state);
return (false_peptide/total_peptide);
}
pappso::pappso_double IdentificationGroup::getProteinFdr(ValidationState state) const {
//ValidationState state = ValidationState::valid;
pappso::pappso_double total_prot=countProteinMatch(state);
pappso::pappso_double false_prot=countDecoyProteinMatch(state);
return (false_prot/total_prot);
}
......@@ -76,6 +76,14 @@ public:
/** @brief count peptide (peptide+mass+sample) included by decoy proteins
* */
unsigned int countDecoyPeptideMassSample(ValidationState state) const;
/** @brief get False Discovery Rate of proteins
*/
pappso::pappso_double getProteinFdr(ValidationState state = ValidationState::valid) const;
/** @brief get False Discovery Rate of peptide/mass (unique sequence+modifications)
*/
pappso::pappso_double getPeptideMassFdr(ValidationState state = ValidationState::valid) const;
/** @brief validate or invalidate peptides and proteins based automatic filters and manual checks
......
......@@ -37,6 +37,7 @@
#include "comparspecificspectrasheet.h"
#include "infosheet.h"
#include "samplesheet.h"
#include "groupingsheet.h"
#include <QSettings>
OdsExport::OdsExport(const Project * project):_p_project(project) {
......@@ -62,6 +63,9 @@ void OdsExport::write(CalcWriterInterface * p_writer) {
_even_style = p_writer->getTableCellStyleRef(style);
InfoSheet(this, p_writer, _p_project);
if (settings.value("export_ods/groups", "true").toBool()) {
GroupingSheet(this, p_writer, _p_project);
}
if (settings.value("export_ods/simple", "false").toBool()) {
SimpleSheet(p_writer, _p_project);
}
......
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