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

log10 evalue on protein

parent ecfe578b
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,10 @@ unsigned int ProteinMatch::countPeptideMassCharge(ValidationState state, const M
}
pappso::pappso_double ProteinMatch::getEvalue(const MsRun * sp_msrun_id) const {
return (std::pow ((double) 10.0,getLogEvalue(sp_msrun_id)));
}
pappso::pappso_double ProteinMatch::getLogEvalue(const MsRun * sp_msrun_id) const {
std::map<QString, pappso::pappso_double> map_sequence_evalue;
for (auto & p_peptide_match : _peptide_match_list) {
if (p_peptide_match->isValidAndChecked()) {
......@@ -296,8 +300,8 @@ pappso::pappso_double ProteinMatch::getEvalue(const MsRun * sp_msrun_id) const {
pappso::pappso_double evalue_prot = 1;
for (auto && peptide_pair: map_sequence_evalue) {
//evalue_prot += std::log10(peptide_pair.second);
evalue_prot *= peptide_pair.second;
evalue_prot += std::log10(peptide_pair.second);
//evalue_prot *= peptide_pair.second;
}
//return (std::pow ((double) 10.0,evalue_prot));
......
......@@ -44,6 +44,10 @@ public:
~ProteinMatch();
const ProteinXtpSp & getProteinXtpSp() const;
/** @brief compute protein log10(Evalue) within samples
* */
pappso::pappso_double getLogEvalue(const MsRun * sp_msrun_id = nullptr) const;
/** @brief compute protein Evalue within samples
* */
......
......@@ -80,7 +80,7 @@ void ProteinWindow::updateDisplay() {
ui->sequenceTextEdit->setText(_p_protein_match->getHtmlSequence());
ui->coverage_label->setText(QString("%1 %").arg(_p_protein_match->getCoverage()*100));
ui->mw_label->setText(QString("%1 kDa").arg(_p_protein_match->getProteinXtpSp().get()->getMass()/1000));
ui->evalue_label->setText(QString("%1 (log10: %2)").arg(_p_protein_match->getEvalue()).arg(std::log10(_p_protein_match->getEvalue())));
ui->evalue_label->setText(QString("%1 (log10: %2)").arg(_p_protein_match->getEvalue()).arg(_p_protein_match->getLogEvalue()));
}
catch (pappso::PappsoException exception_pappso) {
QMessageBox::warning(this,
......
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