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

new number of distinct peptides within whole grouping experiment

parent d04a7f87
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,17 @@ const GroupStore & IdentificationGroup::getGroupStore() const { ...@@ -48,6 +48,17 @@ const GroupStore & IdentificationGroup::getGroupStore() const {
return _group_store; return _group_store;
} }
unsigned int IdentificationGroup::countPeptideMass(ValidationState state) const {
std::vector<pappso::GrpPeptide *> count_peptide_mass;
for (auto & p_protein_match : _protein_match_list) {
p_protein_match->countPeptideMass(count_peptide_mass, state);
}
std::sort(count_peptide_mass.begin(), count_peptide_mass.end());
auto last = std::unique(count_peptide_mass.begin(),count_peptide_mass.end());
return std::distance(count_peptide_mass.begin(),last);
}
unsigned int IdentificationGroup::countPeptideMassSample(ValidationState state) const { unsigned int IdentificationGroup::countPeptideMassSample(ValidationState state) const {
std::vector<std::size_t> count_peptide_mass_sample; std::vector<std::size_t> count_peptide_mass_sample;
......
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
void addProteinMatch(ProteinMatch * protein_match); void addProteinMatch(ProteinMatch * protein_match);
std::vector<ProteinMatch *> & getProteinMatchList(); std::vector<ProteinMatch *> & getProteinMatchList();
void addIdentificationDataSourceP(IdentificationDataSource * p_identification_source); void addIdentificationDataSourceP(IdentificationDataSource * p_identification_source);
const PtmGroupingExperiment * getPtmGroupingExperiment() const; const PtmGroupingExperiment * getPtmGroupingExperiment() const;
/** @brief count groups /** @brief count groups
...@@ -64,32 +64,36 @@ public: ...@@ -64,32 +64,36 @@ public:
/** @brief count proteins /** @brief count proteins
* */ * */
unsigned int countProteinMatch(ValidationState state) const; unsigned int countProteinMatch(ValidationState state) const;
/** @brief count decoy proteins /** @brief count decoy proteins
* */ * */
unsigned int countDecoyProteinMatch(ValidationState state) const; unsigned int countDecoyProteinMatch(ValidationState state) const;
/** @brief count peptide match (peptide spectrum match + protein match) /** @brief count peptide match (peptide spectrum match + protein match)
* */ * */
unsigned int countPeptideMatch(ValidationState state) const; unsigned int countPeptideMatch(ValidationState state) const;
/** @brief count decoy peptide match /** @brief count decoy peptide match
* */ * */
unsigned int countDecoyPeptideMatch(ValidationState state) const; unsigned int countDecoyPeptideMatch(ValidationState state) const;
/** @brief count distinct peptides overall samples(peptide+mass) including peptides from decoy proteins
* */
unsigned int countPeptideMass(ValidationState state) const;
/** @brief count peptide (peptide+mass+sample) including peptides from decoy proteins /** @brief count peptide (peptide+mass+sample) including peptides from decoy proteins
* */ * */
unsigned int countPeptideMassSample(ValidationState state) const; unsigned int countPeptideMassSample(ValidationState state) const;
/** @brief count peptide (peptide+mass+sample) only on decoy proteins /** @brief count peptide (peptide+mass+sample) only on decoy proteins
* */ * */
unsigned int countDecoyPeptideMassSample(ValidationState state) const; unsigned int countDecoyPeptideMassSample(ValidationState state) const;
/** @brief get False Discovery Rate of proteins /** @brief get False Discovery Rate of proteins
*/ */
pappso::pappso_double getProteinFdr(ValidationState state = ValidationState::valid) const; pappso::pappso_double getProteinFdr(ValidationState state = ValidationState::valid) const;
/** @brief get False Discovery Rate of peptide/mass (unique sequence+modifications) /** @brief get False Discovery Rate of peptide/mass (unique sequence+modifications)
*/ */
pappso::pappso_double getPeptideMassFdr(ValidationState state = ValidationState::valid) const; pappso::pappso_double getPeptideMassFdr(ValidationState state = ValidationState::valid) const;
...@@ -114,7 +118,7 @@ public: ...@@ -114,7 +118,7 @@ public:
void collectMhDelta(std::vector< pappso::pappso_double> & delta_list, pappso::PrecisionUnit unit, ValidationState state) const; void collectMhDelta(std::vector< pappso::pappso_double> & delta_list, pappso::PrecisionUnit unit, ValidationState state) const;
private : private :
void addMsRunSp(MsRunSp ms_run_sp); void addMsRunSp(MsRunSp ms_run_sp);
private : private :
GroupingExperiment * _p_grp_experiment= nullptr; GroupingExperiment * _p_grp_experiment= nullptr;
......
...@@ -179,6 +179,14 @@ const pappso::GrpProteinSp & ProteinMatch::getGrpProteinSp() const { ...@@ -179,6 +179,14 @@ const pappso::GrpProteinSp & ProteinMatch::getGrpProteinSp() const {
} }
void ProteinMatch::countPeptideMass(std::vector<pappso::GrpPeptide *> & count_peptide_mass, ValidationState state) const {
for (auto & p_peptide_match : _peptide_match_list) {
if (p_peptide_match->getValidationState() >= state) {
count_peptide_mass.push_back(p_peptide_match->getGrpPeptideSp().get());
}
}
}
void ProteinMatch::countPeptideMassSample(std::vector<size_t> & count_peptide_mass_sample, ValidationState state) const { void ProteinMatch::countPeptideMassSample(std::vector<size_t> & count_peptide_mass_sample, ValidationState state) const {
for (auto & p_peptide_match : _peptide_match_list) { for (auto & p_peptide_match : _peptide_match_list) {
if (p_peptide_match->getValidationState() >= state) { if (p_peptide_match->getValidationState() >= state) {
......
...@@ -98,6 +98,10 @@ public: ...@@ -98,6 +98,10 @@ public:
*/ */
unsigned int countSampleScan(ValidationState state, const MsRun * p_msrun_id=nullptr) const; unsigned int countSampleScan(ValidationState state, const MsRun * p_msrun_id=nullptr) const;
/** @brief count peptide (peptide+mass)
*/
void countPeptideMass(std::vector<pappso::GrpPeptide *> & count_peptide_mass, ValidationState state) const;
/** @brief count peptide (peptide+mass+sample) /** @brief count peptide (peptide+mass+sample)
*/ */
void countPeptideMassSample(std::vector<size_t> & count_peptide_mass_sample, ValidationState state) const; void countPeptideMassSample(std::vector<size_t> & count_peptide_mass_sample, ValidationState state) const;
......
...@@ -88,13 +88,27 @@ ...@@ -88,13 +88,27 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="6" column="0">
<widget class="QPushButton" name="view_ptm_island_button"> <widget class="QPushButton" name="view_ptm_island_button">
<property name="text"> <property name="text">
<string>View PTM islands</string> <string>View PTM islands</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0">
<widget class="QLabel" name="grouped_peptide_label">
<property name="text">
<string>number of grouped distinct peptides</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="grouped_peptide_display">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
......
...@@ -73,6 +73,7 @@ void IdentificationGroupWidget::doIdentificationGroupGrouped(IdentificationGroup ...@@ -73,6 +73,7 @@ void IdentificationGroupWidget::doIdentificationGroupGrouped(IdentificationGroup
ui->group_number_display->setText(QString("%1").arg(_p_identification_group->countGroup())); ui->group_number_display->setText(QString("%1").arg(_p_identification_group->countGroup()));
ui->subgroup_number_display->setText(QString("%1").arg(_p_identification_group->countSubGroup())); ui->subgroup_number_display->setText(QString("%1").arg(_p_identification_group->countSubGroup()));
ui->protein_number_display->setText(QString("%1").arg(_p_identification_group->countProteinMatch(ValidationState::grouped))); ui->protein_number_display->setText(QString("%1").arg(_p_identification_group->countProteinMatch(ValidationState::grouped)));
ui->grouped_peptide_display->setText(QString("%1").arg(_p_identification_group->countPeptideMass(ValidationState::grouped)));
_p_identification_group->countPeptideMatch(ValidationState::grouped); _p_identification_group->countPeptideMatch(ValidationState::grouped);
} }
} }
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