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

WIP: new peptide evidence object, huge work to do

parent acb5d436
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ SET(CPP_FILES
core/tandem_run/tandemcondorprocess.cpp
core/tandem_run/tandemparameters.cpp
core/msrun.cpp
core/peptideevidence.cpp
core/peptidematch.cpp
core/peptidextp.cpp
core/project.cpp
......@@ -106,7 +107,7 @@ SET(CPP_FILES
utils/identificationdatasourcestore.cpp
utils/groupstore.cpp
utils/msrunstore.cpp
utils/peptidematchstore.cpp
utils/peptideevidencestore.cpp
utils/peptidestore.cpp
utils/proteinstore.cpp
utils/readspectrum.cpp
......
......@@ -44,8 +44,8 @@ IdentificationDataSource::~IdentificationDataSource()
}
PeptideMatchStore & IdentificationDataSource::getPeptideMatchStore() {
return _peptide_match_store;
PeptideEvidenceStore & IdentificationDataSource::getPeptideEvidenceStore() {
return _peptide_evidence_store;
}
void IdentificationDataSource::setXmlId(const QString xmlid) {
......
......@@ -29,7 +29,7 @@
#include <QVariant>
#include "../msrun.h"
#include "../../utils/fastafilestore.h"
#include "../../utils/peptidematchstore.h"
#include "../../utils/peptideevidencestore.h"
class Project;
......@@ -46,7 +46,7 @@ public:
~IdentificationDataSource();
bool operator==(const IdentificationDataSource& other) const;
PeptideMatchStore & getPeptideMatchStore();
PeptideEvidenceStore & getPeptideEvidenceStore();
void setXmlId(const QString xmlid);
const QString & getXmlId() const;
......@@ -122,7 +122,7 @@ private :
std::map<IdentificationEngineStatistics, QVariant> _param_stats;
std::vector<FastaFileSp> _fastafile_list;
PeptideMatchStore _peptide_match_store;
PeptideEvidenceStore _peptide_evidence_store;
};
#endif // IDENTIFICATIONDATASOURCE_H
/**
* \file utils/peptideevidence.cpp
* \date 18/11/2017
* \author Olivier Langella
* \brief peptide evidence : a peptide sequence + spectrum + identification engine evaluation (psm)
*/
/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of XTPcpp.
*
* XTPcpp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* XTPcpp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and implementation
******************************************************************************/
#include "peptideevidence.h"
#include <pappsomspp/pappsoexception.h>
std::hash<std::string> PeptideEvidence::_hash_fn;
PeptideEvidence::PeptideEvidence(MsRun * msrunid_sp, unsigned int scan) {
_msrunid_sp = msrunid_sp;
_scan = scan;
_hash_sample_scan = PeptideEvidence::_hash_fn (QString("%1 %2").arg(msrunid_sp->getXmlId()).arg(_scan).toStdString());
}
PeptideEvidence::PeptideEvidence(const PeptideEvidence & other): PeptideEvidence(other._msrunid_sp, other._scan) {
_hash_sample_scan = other._hash_sample_scan;
_sp_grp_peptide = other._sp_grp_peptide;
_peptide_sp = other._peptide_sp;
_rt = other._rt;
_evalue = other._evalue;
_exp_mass = other._exp_mass;
_start=other._start;
_charge= other._charge;
_p_identification_source = other._p_identification_source;
_params = other._params;
_checked = other._checked;
_proxy_valid = other._proxy_valid;
}
PeptideEvidenceSp PeptideEvidence::makePeptideEvidenceSp() const {
return std::make_shared<PeptideEvidence>(*this);
}
void PeptideEvidence::updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters) {
_proxy_valid = false;
if (_evalue <= automatic_filter_parameters.getFilterPeptideEvalue()) {
_proxy_valid = true;
}
}
void PeptideEvidence::setRetentionTime(pappso::pappso_double rt) {
_rt = rt;
}
void PeptideEvidence::setEvalue(pappso::pappso_double evalue) {
_evalue = evalue;
}
/** \brief set specific parameter value
*/
void PeptideEvidence::setParam(PeptideMatchParam param, const QVariant& value) {
_params.insert(std::pair<PeptideMatchParam, QVariant>(param, value));
}
const QVariant PeptideEvidence::getParam(PeptideMatchParam param) const {
try {
return _params.at(param);
}
catch (std::out_of_range) {
return QVariant();
}
}
const std::map<PeptideMatchParam, QVariant> & PeptideEvidence::getParamList() const {
return _params;
}
std::size_t PeptideEvidence::getHashPeptideMassSample() const {
return PeptideEvidence::_hash_fn (QString("%1 %2").arg(_peptide_sp.get()->toAbsoluteString()).arg(_msrunid_sp->getXmlId()).toStdString());
}
std::size_t PeptideEvidence::getHashSampleScan() const {
return _hash_sample_scan;
}
pappso::pappso_double PeptideEvidence::getEvalue() const {
return _evalue;
}
pappso::pappso_double PeptideEvidence::getExperimentalMass() const {
return _exp_mass;
}
pappso::pappso_double PeptideEvidence::getExperimentalMz() const {
pappso::mz mz = _exp_mass;
for (unsigned int i=0; i < _charge; i++) {
mz+=pappso::MHPLUS;
}
mz = mz/_charge;
return mz;
}
void PeptideEvidence::setExperimentalMass(pappso::pappso_double exp_mass) {
_exp_mass =exp_mass;
}
void PeptideEvidence::setStart(unsigned int start) {
_start =start;
}
pappso::mz PeptideEvidence::getDeltaMass() const {
return (_peptide_sp.get()->getMz(1) - (_exp_mass+pappso::MHPLUS));
}
unsigned int PeptideEvidence::getStart() const {
return _start;
}
unsigned int PeptideEvidence::getStop() const {
return _start+_peptide_sp.get()->size();
}
bool PeptideEvidence::containsPosition(unsigned int position) const {
if (position < _start) {
return false;
}
if (position < getStop()) {
return true;
}
return false;
}
void PeptideEvidence::setCharge(unsigned int charge) {
_charge =charge;
}
void PeptideEvidence::setPeptideXtpSp (PeptideXtpSp peptide) {
_peptide_sp = peptide;
}
void PeptideEvidence::setChecked(bool arg1) {
_checked = arg1;
}
ValidationState PeptideEvidence::getValidationState() const {
if (isGrouped()) {
return ValidationState::grouped;
} else if (isValidAndChecked()) {
return ValidationState::validAndChecked;
} else if (isValid()) {
return ValidationState::valid;
}
return ValidationState::notValid;
}
bool PeptideEvidence::isValid() const {
return _proxy_valid;
}
bool PeptideEvidence::isChecked() const {
return _checked;
}
bool PeptideEvidence::isValidAndChecked() const {
return _proxy_valid && _checked;
}
bool PeptideEvidence::isGrouped() const {
if (_sp_grp_peptide.get() == nullptr) {
return false;
}
if (_sp_grp_peptide.get()->getGroupNumber() ==0) {
return false;
}
return true;
}
void PeptideEvidence::setIdentificationDataSource(IdentificationDataSource* identification_source) {
_p_identification_source = identification_source;
}
IdentificationDataSource* PeptideEvidence::getIdentificationDataSource () const {
return _p_identification_source;
}
unsigned int PeptideEvidence::getScan() const {
return _scan;
}
pappso::pappso_double PeptideEvidence::getRetentionTime() const {
return _rt;
}
unsigned int PeptideEvidence::getCharge() const {
return _charge;
}
const PeptideXtpSp & PeptideEvidence::getPeptideXtpSp() const {
//if (_sp_grp_peptide.get() == nullptr) {
// throw pappso::PappsoException(QObject::tr("Peptide is null in %1 %2").arg(_msrunid_sp->getXmlId()).arg(this->getScan()));
//}
return _peptide_sp;
}
const MsRun * PeptideEvidence::getMsRunP() const {
return _msrunid_sp;
}
void PeptideEvidence::setGrpPeptideSp(const pappso::GrpPeptideSp & sp_grp_peptide) {
_sp_grp_peptide =sp_grp_peptide;
}
const pappso::GrpPeptideSp & PeptideEvidence::getGrpPeptideSp() const {
return _sp_grp_peptide;
}
/**
* \file utils/peptideevidence.h
* \date 18/11/2017
* \author Olivier Langella
* \brief peptide evidence : a peptide sequence + spectrum + identification engine evaluation (psm)
*/
/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of XTPcpp.
*
* XTPcpp is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* XTPcpp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and implementation
******************************************************************************/
#ifndef PEPTIDEEVIDENCE_H
#define PEPTIDEEVIDENCE_H
#include <pappsomspp/types.h>
#include "peptidextp.h"
#include "identification_sources/identificationdatasource.h"
#include "automaticfilterparameters.h"
#include "msrun.h"
#include "../grouping/groupingexperiment.h"
class PeptideEvidence;
/** \brief shared pointer on a Peptide object
*/
typedef std::shared_ptr<PeptideEvidence> PeptideEvidenceSp;
class PeptideEvidence
{
public :
PeptideEvidence(MsRun * msrunid_sp, unsigned int scan);
PeptideEvidence(const PeptideEvidence & other);
std::size_t getHashSampleScan() const;
std::size_t getHashPeptideMassSample() const;
PeptideEvidenceSp makePeptideEvidenceSp() const;
void setRetentionTime(pappso::pappso_double rt);
void setEvalue(pappso::pappso_double evalue);
/** @brief get experimental mass of this peptide
* @return the computed mass given the precursor measured mass and the deduced peptide charge
*/
pappso::pappso_double getExperimentalMass() const;
/** @brief get experimental mz of this peptide
* @return the real mass measured (precuror mass) by the spectrometer
*/
pappso::pappso_double getExperimentalMz() const;
/** @brief set experimental mass of this peptide
* @arg exp_mass the computed mass given the precursor measured mass and the deduced peptide charge
*/
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;
const std::map<PeptideMatchParam, QVariant> & getParamList() const;
/** @brief set start position of this peptide inside the protein sequence
* @param start position in the protein amino acid sequence (starts at 0)
* */
void setStart(unsigned int start);
/** @brief get start position of this peptide inside the protein sequence
* @return start position in the protein amino acid sequence (starts at 0)
* */
unsigned int getStart() const;
/** @brief get stop position of this peptide inside the protein sequence
* @return stop position in the protein amino acid sequence (starts at 0)
* */
unsigned int getStop() const;
void setCharge(unsigned int charge);
void setPeptideXtpSp (PeptideXtpSp peptide);
void setIdentificationDataSource(IdentificationDataSource* identification_source);
void setChecked(bool arg1);
bool isChecked() const;
bool isValid() const;
bool isValidAndChecked() const;
bool isGrouped() const;
const MsRun * getMsRunP() const;
IdentificationDataSource* getIdentificationDataSource () const;
unsigned int getScan() const;
pappso::pappso_double getRetentionTime() const;
unsigned int getCharge() const;
const PeptideXtpSp & getPeptideXtpSp() const;
pappso::pappso_double getEvalue() const;
void setGrpPeptideSp(const pappso::GrpPeptideSp & sp_grp_peptide);
const pappso::GrpPeptideSp & getGrpPeptideSp() const;
/** @brief validate or invalidate peptides and proteins based automatic filters and manual checks
* */
void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters);
/** @brief get delta between theoretical mhplus mass and mhplus experimental mass
* theoretical mhplus mass - mhplus experimental mass
*/
pappso::mz getDeltaMass() const;
ValidationState getValidationState() const;
/** @brief tells if this peptide contains a protein position
* the position is the amino acid position on the protein sequence (starts from 0)
* */
bool containsPosition(unsigned int position) 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;
pappso::pappso_double _evalue=0;
pappso::pappso_double _exp_mass;
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)
*/
bool _checked = true;
/** @brief automatic filter result (false by default)
*/
bool _proxy_valid = false;
};
#endif // PEPTIDEEVIDENCE_H
......@@ -24,101 +24,32 @@
#include "peptidematch.h"
#include <pappsomspp/pappsoexception.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());
PeptideMatch::PeptideMatch() {
}
PeptideMatch::PeptideMatch(const PeptideMatch & other): PeptideMatch(other._msrunid_sp, other._scan) {
_hash_sample_scan = other._hash_sample_scan;
_sp_grp_peptide = other._sp_grp_peptide;
_peptide_sp = other._peptide_sp;
_rt = other._rt;
_evalue = other._evalue;
_exp_mass = other._exp_mass;
PeptideMatch::PeptideMatch(const PeptideMatch & other) {
_start=other._start;
_charge= other._charge;
_p_identification_source = other._p_identification_source;
_params = other._params;
_checked = other._checked;
_proxy_valid = other._proxy_valid;
}
PeptideMatchSp PeptideMatch::makePeptideMatchSp() const {
return std::make_shared<PeptideMatch>(*this);
}
void PeptideMatch::updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters) {
_proxy_valid = false;
if (_evalue <= automatic_filter_parameters.getFilterPeptideEvalue()) {
_proxy_valid = true;
}
}
void PeptideMatch::setRetentionTime(pappso::pappso_double rt) {
_rt = 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();
}
}
const std::map<PeptideMatchParam, QVariant> & PeptideMatch::getParamList() const {
return _params;
}
_p_peptide_evidence = other._p_peptide_evidence;
std::size_t PeptideMatch::getHashPeptideMassSample() const {
return PeptideMatch::_hash_fn (QString("%1 %2").arg(_peptide_sp.get()->toAbsoluteString()).arg(_msrunid_sp->getXmlId()).toStdString());
}
std::size_t PeptideMatch::getHashSampleScan() const {
return _hash_sample_scan;
void PeptideMatch::setPeptideEvidenceSp(PeptideEvidenceSp sp_peptide_evidence) {
_p_peptide_evidence = sp_peptide_evidence.get();
}
pappso::pappso_double PeptideMatch::getEvalue() const {
return _evalue;
}
pappso::pappso_double PeptideMatch::getExperimentalMass() const {
return _exp_mass;
}
pappso::pappso_double PeptideMatch::getExperimentalMz() const {
pappso::mz mz = _exp_mass;
for (unsigned int i=0; i < _charge; i++) {
mz+=pappso::MHPLUS;
}
mz = mz/_charge;
return mz;
const PeptideEvidence * PeptideMatch::getPeptideEvidence() const {
return _p_peptide_evidence;
}
void PeptideMatch::setExperimentalMass(pappso::pappso_double exp_mass) {
_exp_mass =exp_mass;
PeptideEvidence * PeptideMatch::getPeptideEvidence() {
return _p_peptide_evidence;
}
void PeptideMatch::setStart(unsigned int start) {
_start =start;
}
pappso::mz PeptideMatch::getDeltaMass() const {
return (_peptide_sp.get()->getMz(1) - (_exp_mass+pappso::MHPLUS));
}
unsigned int PeptideMatch::getStart() const {
return _start;
}
unsigned int PeptideMatch::getStop() const {
return _start+_peptide_sp.get()->size();
return _start+_p_peptide_evidence->getPeptideXtpSp().get()->size();
}
bool PeptideMatch::containsPosition(unsigned int position) const {
......@@ -131,79 +62,3 @@ bool PeptideMatch::containsPosition(unsigned int position) const {
return false;
}
void PeptideMatch::setCharge(unsigned int charge) {
_charge =charge;
}
void PeptideMatch::setPeptideXtpSp (PeptideXtpSp peptide) {
_peptide_sp = peptide;
}
void PeptideMatch::setChecked(bool arg1) {
_checked = arg1;
}
ValidationState PeptideMatch::getValidationState() const {
if (isGrouped()) {
return ValidationState::grouped;
} else if (isValidAndChecked()) {
return ValidationState::validAndChecked;
} else if (isValid()) {
return ValidationState::valid;
}
return ValidationState::notValid;
}
bool PeptideMatch::isValid() const {
return _proxy_valid;
}
bool PeptideMatch::isChecked() const {
return _checked;
}
bool PeptideMatch::isValidAndChecked() const {
return _proxy_valid && _checked;
}
bool PeptideMatch::isGrouped() const {
if (_sp_grp_peptide.get() == nullptr) {
return false;
}
if (_sp_grp_peptide.get()->getGroupNumber() ==0) {
return false;
}
return true;
}
void PeptideMatch::setIdentificationDataSource(IdentificationDataSource* identification_source) {
_p_identification_source = identification_source;
}
IdentificationDataSource* PeptideMatch::getIdentificationDataSource () const {
return _p_identification_source;
}
unsigned int PeptideMatch::getScan() const {
return _scan;
}
pappso::pappso_double PeptideMatch::getRetentionTime() const {
return _rt;
}
unsigned int PeptideMatch::getCharge() const {
return _charge;
}
const PeptideXtpSp & PeptideMatch::getPeptideXtpSp() const {
//if (_sp_grp_peptide.get() == nullptr) {
// throw pappso::PappsoException(QObject::tr("Peptide is null in %1 %2").arg(_msrunid_sp->getXmlId()).arg(this->getScan()));
//}
return _peptide_sp;
}
const MsRun * PeptideMatch::getMsRunP() const {
return _msrunid_sp;
}
void PeptideMatch::setGrpPeptideSp(const pappso::GrpPeptideSp & sp_grp_peptide) {
_sp_grp_peptide =sp_grp_peptide;
}
const pappso::GrpPeptideSp & PeptideMatch::getGrpPeptideSp() const {
return _sp_grp_peptide;
}
......@@ -23,59 +23,14 @@
#ifndef PEPTIDEMATCH_H
#define PEPTIDEMATCH_H
#include <pappsomspp/types.h>
#include "peptidextp.h"
#include "identification_sources/identificationdatasource.h"
#include "automaticfilterparameters.h"
#include "msrun.h"
#include "peptideevidence.h"
#include "../grouping/groupingexperiment.h"
class PeptideMatch;
/** \brief shared pointer on a Peptide object
*/
typedef std::shared_ptr<PeptideMatch> PeptideMatchSp;
class PeptideMatch
{
public :
PeptideMatch(MsRun * msrunid_sp, unsigned int scan);
PeptideMatch();
PeptideMatch(const PeptideMatch & other);
std::size_t getHashSampleScan() const;
std::size_t getHashPeptideMassSample() const;
PeptideMatchSp makePeptideMatchSp() const;
void setRetentionTime(pappso::pappso_double rt);
void setEvalue(pappso::pappso_double evalue);
/** @brief get experimental mass of this peptide
* @return the computed mass given the precursor measured mass and the deduced peptide charge
*/
pappso::pappso_double getExperimentalMass() const;
/** @brief get experimental mz of this peptide
* @return the real mass measured (precuror mass) by the spectrometer
*/
pappso::pappso_double getExperimentalMz() const;
/** @brief set experimental mass of this peptide
* @arg exp_mass the computed mass given the precursor measured mass and the deduced peptide charge
*/
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;
const std::map<PeptideMatchParam, QVariant> & getParamList() const;
/** @brief set start position of this peptide inside the protein sequence
......@@ -90,64 +45,19 @@ public :
* @return stop position in the protein amino acid sequence (starts at 0)
* */
unsigned int getStop() const;
void setCharge(unsigned int charge);
void setPeptideXtpSp (PeptideXtpSp peptide);
void setIdentificationDataSource(IdentificationDataSource* identification_source);
void setChecked(bool arg1);
bool isChecked() const;
bool isValid() const;
bool isValidAndChecked() const;
bool isGrouped() const;
const MsRun * getMsRunP() const;
IdentificationDataSource* getIdentificationDataSource () const;
unsigned int getScan() const;
pappso::pappso_double getRetentionTime() const;
unsigned int getCharge() const;
const PeptideXtpSp & getPeptideXtpSp() const;
pappso::pappso_double getEvalue() const;
void setGrpPeptideSp(const pappso::GrpPeptideSp & sp_grp_peptide);
const pappso::GrpPeptideSp & getGrpPeptideSp() const;
/** @brief validate or invalidate peptides and proteins based automatic filters and manual checks
* */
void updateAutomaticFilters(const AutomaticFilterParameters & automatic_filter_parameters);
/** @brief get delta between theoretical mhplus mass and mhplus experimental mass
* theoretical mhplus mass - mhplus experimental mass
*/
pappso::mz getDeltaMass() const;
ValidationState getValidationState() const;
/** @brief tells if this peptide contains a protein position
* the position is the amino acid position on the protein sequence (starts from 0)
* */
bool containsPosition(unsigned int position) const;
void setPeptideEvidenceSp(PeptideEvidenceSp sp_peptide_evidence);
const PeptideEvidence * getPeptideEvidence() const;
PeptideEvidence * getPeptideEvidence();
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;
pappso::pappso_double _evalue=0;
pappso::pappso_double _exp_mass;
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)
*/
bool _checked = true;
/** @brief automatic filter result (false by default)
*/
bool _proxy_valid = false;
PeptideEvidence * _p_peptide_evidence=nullptr;
};
#endif // PEPTIDEMATCH_H
......@@ -74,7 +74,7 @@ public:
pappso::pappso_double getEmPAI(const MsRun * sp_msrun_id = nullptr) const;
void setProteinXtpSp(ProteinXtpSp protein_sp);
void addPeptideMatchSp(PeptideMatchSp peptide_match);
void addPeptideMatch(const PeptideMatch & peptide_match);
std::vector<PeptideMatch *> & getPeptideMatchList();
const std::vector<PeptideMatch *> & getPeptideMatchList() const;
......
/**
* \file utils/peptidematchstore.cpp
* \file utils/peptideevidencestore.cpp
* \date 18/11/2017
* \author Olivier Langella
* \brief store unique instances of peptide match
* \brief store unique instances of peptide evidences
*/
/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
......@@ -28,9 +29,9 @@
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and implementation
******************************************************************************/
#include "peptidematchstore.h"
#include "peptideevidencestore.h"
#include "../core/peptidematch.h"
#include "../core/peptideevidence.h"
std::shared_ptr<PeptideMatch> & PeptideMatchStore::getInstance(const PeptideMatch * p_peptide_match) {
std::shared_ptr<PeptideEvidence> & PeptideEvidenceStore::getInstance(const PeptideEvidence * p_peptide_evidence) {
}
/**
* \file utils/peptidematchstore.h
* \file utils/peptideevidencestore.h
* \date 18/11/2017
* \author Olivier Langella
* \brief store unique instances of peptide match
* \brief store unique instances of peptide evidences
*/
......@@ -28,17 +28,17 @@
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and implementation
******************************************************************************/
#ifndef PEPTIDEMATCHSTORE_H
#define PEPTIDEMATCHSTORE_H
#ifndef PEPTIDEEVIDENCESTORE_H
#define PEPTIDEEVIDENCESTORE_H
#include <memory>
class PeptideMatch;
class PeptideEvidence;
class PeptideMatchStore
class PeptideEvidenceStore
{
public:
std::shared_ptr<PeptideMatch> & getInstance(const PeptideMatch * p_peptide_match);
std::shared_ptr<PeptideEvidence> & getInstance(const PeptideEvidence * p_peptide_evidence);
};
#endif // PEPTIDEMATCHSTORE_H
#endif // PEPTIDEEVIDENCESTORE_H
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