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

new hash sample scan key computed in constructor

parent abeb33e9
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,13 @@
#include "peptidematch.h"
std::hash<std::string> PeptideMatch::_hash_fn;
PeptideMatch::PeptideMatch(MsRun * msrunid_sp, unsigned int scan) {
_msrunid_sp = msrunid_sp;
_scan = scan;
_hash_sample_scan = PeptideMatch::_hash_fn (QString("%1 %2").arg(msrunid_sp->getXmlId()).arg(_scan).toStdString());
}
void PeptideMatch::updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters) {
......@@ -42,6 +46,10 @@ void PeptideMatch::setEvalue(pappso::pappso_double evalue) {
_evalue = evalue;
}
std::size_t PeptideMatch::getHashSampleScan() const {
return _hash_sample_scan;
}
pappso::pappso_double PeptideMatch::getEvalue() const {
return _evalue;
}
......@@ -76,7 +84,7 @@ ValidationState PeptideMatch::getValidationState() const {
return ValidationState::validAndChecked;
} else if (isValid()) {
return ValidationState::valid;
}
}
return ValidationState::notValid;
}
......
......@@ -35,6 +35,7 @@ class PeptideMatch
{
public :
PeptideMatch(MsRun * msrunid_sp, unsigned int scan);
std::size_t getHashSampleScan() const;
void setRetentionTime(pappso::pappso_double rt);
void setEvalue(pappso::pappso_double evalue);
......@@ -80,8 +81,10 @@ public :
ValidationState getValidationState() const;
private :
static std::hash<std::string> _hash_fn;
MsRun * _msrunid_sp;
unsigned int _scan;
size_t _hash_sample_scan;
pappso::GrpPeptideSp _sp_grp_peptide;
PeptideXtpSp _peptide_sp;
pappso::pappso_double _rt;
......
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