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

parameters added to peptide match, hyperscore column in ODS spectra

parent 932fea60
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,20 @@ void PeptideMatch::setRetentionTime(pappso::pappso_double rt) {
void PeptideMatch::setEvalue(pappso::pappso_double evalue) {
_evalue = evalue;
}
/** \brief set specific parameter value
*/
void PeptideMatch::setParam(PeptideMatchParam param, const QVariant& value) {
_params.insert(std::pair<PeptideMatchParam, QVariant>(param, value));
}
const QVariant PeptideMatch::getParam(PeptideMatchParam param) const {
try {
return _params.at(param);
}
catch (std::out_of_range) {
return QVariant();
}
}
std::size_t PeptideMatch::getHashPeptideMassSample() const {
return PeptideMatch::_hash_fn (QString("%1 %2").arg(_peptide_sp.get()->toAbsoluteString()).arg(_msrunid_sp->getXmlId()).toStdString());
......
......@@ -42,6 +42,15 @@ public :
void setEvalue(pappso::pappso_double evalue);
void setExperimentalMass(pappso::pappso_double exp_mass);
/** \brief set specific parameter value
*/
virtual void setParam(PeptideMatchParam param, const QVariant& value);
/** \brief get specific parameter value
*/
virtual const QVariant getParam(PeptideMatchParam param) const;
/** @brief set start position of this peptide inside the protein sequence
* @param start position in the protein amino acid sequence (starts at 0)
* */
......@@ -94,6 +103,7 @@ private :
unsigned int _start=0;
unsigned int _charge;
IdentificationDataSource* _p_identification_source = nullptr;
std::map<PeptideMatchParam, QVariant> _params;
/** @brief manually checked by user (true by default)
*/
......
......@@ -239,6 +239,7 @@ bool XpipSaxHandler::startElement_peptide(QXmlAttributes attributes) {
_p_peptide_match->setExperimentalMass(exp_mass);
_p_peptide_match->setStart(attributes.value("start").simplified().toUInt()-1);
_p_peptide_match->setCharge(attributes.value("charge").simplified().toUInt());
_p_peptide_match->setParam(PeptideMatchParam::tandem_hyperscore, QVariant( attributes.value("hypercorr").toDouble()));
IdentificationDataSource* p_identification_data_source = _p_project->getIdentificationDataSourceStore().getInstance(attributes.value("sample_file").simplified()).get();
_p_peptide_match->setIdentificationDataSource( p_identification_data_source);
......
......@@ -293,6 +293,8 @@ bool XtandemSaxHandler::startElement_domain(QXmlAttributes attributes) {
_p_peptide_match->setExperimentalMass(exp_mass);
_p_peptide_match->setStart(attributes.value("start").simplified().toUInt()-1);
_p_peptide_match->setCharge(_charge);
_p_peptide_match->setParam(PeptideMatchParam::tandem_hyperscore, QVariant( attributes.value("hyperscore").toDouble()));
_p_peptide_match->setIdentificationDataSource( _p_identification_data_source);
_p_peptide_match->setChecked(true);
......
......@@ -37,6 +37,13 @@ enum class IdentificationEngine {
peptider ///< peptider
};
/** \def PeptideMatchParam peptide match specific parameters
*
*/
enum class PeptideMatchParam {
tandem_hyperscore ///< X!Tandem hyperscore
};
/** \def IdentificationEngineParam identification engine parameters
*
*/
......
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