diff --git a/src/core/project.cpp b/src/core/project.cpp index 255d23ee248307b1dc6ec2cc43306ab68c6ad86f..4cdc329c1af94e35beae0f78ece2305f84721597 100644 --- a/src/core/project.cpp +++ b/src/core/project.cpp @@ -39,24 +39,12 @@ Project::~Project() } } +void Project::updateAutomaticFilters() { +} ProjectSp Project::makeProjectSp() const { return std::make_shared<Project>(*this); } -void Project::setFilterPeptideEvalue( pappso::pappso_double evalue) { - _filter_minimum_peptide_evalue = evalue; -} - -void Project::setFilterProteinEvalue( pappso::pappso_double evalue) { - _filter_minimum_protein_evalue = evalue; -} -void Project::setFilterMinimumPeptidePerMatch(unsigned int number) { - _filter_minimum_peptide_per_match = number; -} -void Project::setFilterCrossSamplePeptideNumber(bool cross) { - _filter_is_cross_sample_peptide_number = cross; -} - IdentificationGroup* Project::newIdentificationGroup() { _p_current_identification_group = new IdentificationGroup(this); _identification_goup_list.push_back(_p_current_identification_group); diff --git a/src/core/project.h b/src/core/project.h index 8f60fcf8b67b12d6aad895c09ed4358abf17a441..b97e74130c9fd981aca292a8c2e8938753649b62 100644 --- a/src/core/project.h +++ b/src/core/project.h @@ -25,7 +25,7 @@ #include<memory> #include "identificationgroup.h" -#include <pappsomspp/types.h> +#include "automaticfilterparameters.h" class Project; typedef std::shared_ptr<Project> ProjectSp; @@ -33,8 +33,9 @@ typedef std::shared_ptr<Project> ProjectSp; class PeptideMatch; class ProteinMatch; -class Project +class Project : public QObject { + Q_OBJECT public: Project(); ~Project(); @@ -49,20 +50,22 @@ public: /** @brief is it valid regarding threshold and project rules */ bool isValid(ProteinMatch* p_protein_match) const; + + /** @brief validate or invalidate peptides and proteins based automatic filters and manual checks + * */ + void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters); - void setFilterPeptideEvalue( pappso::pappso_double evalue); - void setFilterProteinEvalue( pappso::pappso_double evalue); - void setFilterMinimumPeptidePerMatch(unsigned int number); - void setFilterCrossSamplePeptideNumber(bool cross); + signals: + /** @brief signal when automatic filters are applied and project is ready + * */ + void projectReady(); + private : std::vector<IdentificationGroup *> _identification_goup_list; IdentificationGroup* _p_current_identification_group = nullptr; - - pappso::pappso_double _filter_minimum_peptide_evalue=1; - pappso::pappso_double _filter_minimum_protein_evalue=1; - unsigned int _filter_minimum_peptide_per_match=1; - bool _filter_is_cross_sample_peptide_number=false; + + AutomaticFilterParameters _automatic_filter_parameters; }; #endif // PROJECT_H