Loading...
Searching...
No Matches
pappso::PeptideFixedModificationBuilder Class Reference

`#include <peptidefixedmodificationbuilder.h>`

Inheritance diagram for pappso::PeptideFixedModificationBuilder:

## Public Member Functions

| PeptideFixedModificationBuilder (AaModificationP p_mod)
virtual | ~PeptideFixedModificationBuilder ()
void | setPeptideSp (std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideSp &peptide_sp_original, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme) override
| function to give the products of modifications for a digested peptide
void | addAa (char aa)
void | setSink (PeptideModificatorInterface *sink) override
void | setProtNter (bool arg1)
| this modification concerns the Nter peptide
void | setProtCter (bool arg1)
| this modification concerns the Cter peptide
void | setProtElse (bool arg1)
| this modification concerns all peptides between Nter and Cter
Public Member Functions inherited from pappso::PeptideModificatorBase
| PeptideModificatorBase ()
virtual | ~PeptideModificatorBase ()
virtual void | setModificationPattern (QString &pattern) final
| set the pattern on which the modification will be applied (usually the list of concerned AA)
Public Member Functions inherited from pappso::PeptideModificatorInterface
virtual | ~PeptideModificatorInterface ()

## Private Attributes

PeptideModificatorInterface * | m_sink = nullptr
const AaModificationP | mp_mod
bool | m_isProtNterMod = true
bool | m_isProtCterMod = true
bool | m_isProtElseMod = true
QString | m_aaModificationList

## Additional Inherited Members

Protected Member Functions inherited from pappso::PeptideModificatorBase
virtual void | getModificationPositionList (std::vector< unsigned int > &position_list, const QString &peptide_str) final
virtual void | getModificationPositionList (std::vector< unsigned int > &position_list, const Peptide *p_peptide, AaModificationP mod, unsigned int modification_counter)
Protected Attributes inherited from pappso::PeptideModificatorBase
QRegularExpression | m_pattern

## Detailed Description

Definition at line 33 of file peptidefixedmodificationbuilder.h.

## Constructor & Destructor Documentation

## PeptideFixedModificationBuilder()

PeptideFixedModificationBuilder::PeptideFixedModificationBuilder | ( | AaModificationP | p_mod | ) |

Definition at line 29 of file peptidefixedmodificationbuilder.cpp.

: mp_mod(p_mod)
{
}
pappso::PeptideFixedModificationBuilder::mp_mod
const AaModificationP mp_mod
Definition peptidefixedmodificationbuilder.h:80

## ~PeptideFixedModificationBuilder()

PeptideFixedModificationBuilder::~PeptideFixedModificationBuilder | ( |  | ) |

virtual

Definition at line 35 of file peptidefixedmodificationbuilder.cpp.

{
}

## Member Function Documentation

## addAa()

void PeptideFixedModificationBuilder::addAa | ( | char | aa | ) |

Definition at line 40 of file peptidefixedmodificationbuilder.cpp.

{
m_aaModificationList.append(aa);
m_pattern.setPattern(QString("[%1]").arg(m_aaModificationList));
}
pappso::PeptideFixedModificationBuilder::m_aaModificationList
QString m_aaModificationList
Definition peptidefixedmodificationbuilder.h:89
pappso::PeptideModificatorBase::m_pattern
QRegularExpression m_pattern
Definition peptidemodificatorbase.h:66

References m_aaModificationList, and pappso::PeptideModificatorBase::m_pattern.

## setPeptideSp()

void PeptideFixedModificationBuilder::setPeptideSp | ( | std::int8_t | sequence_database_id,
|  | const ProteinSp & | protein_sp,
|  | bool | is_decoy,
|  | const PeptideSp & | peptide_sp,
|  | unsigned int | start,
|  | bool | is_nter,
|  | unsigned int | missed_cleavage_number,
|  | bool | semi_enzyme
| ) |  |

override virtual

function to give the products of modifications for a digested peptide

Parameters

  sequence_database_id | integer that references the sequence fatabase (file, stream, url...)
  protein_sp | shared pointer on the protein that was initialy digested
  is_decoy | tell if the current protein is a decoy (true) or normal (false) protein
  peptide | Peptide object containing sequence and possible modifications
  start | the position of the first amino acid of the peptide in the original protein sequence. the first amino acid of the protein is at position 1.
  is_nter | boolean to tell if the peptide is an Nter peptide (to allow Methionin Nter removal)
  missed_cleavage_number | number of missed cleavage sites (that the enzyme has not cut) fot the product
  semi_enzyme | boolean that tells if this peptide is the produce of a semi enzymatic lysis

Implements pappso::PeptideModificatorInterface.

Definition at line 51 of file peptidefixedmodificationbuilder.cpp.

{
qDebug() << "PeptideFixedModificationBuilder::setPeptide begin";
std::vector<unsigned int> position_list;
getModificationPositionList(position_list,
peptide_sp_original.get()->getSequence());
Peptide peptide(*peptide_sp_original.get());
unsigned int size = peptide.size();
for(unsigned int pos : position_list)
{
if((m_isProtNterMod) && (is_nter))
{
peptide.addAaModification(mp_mod, pos);
}
else if((m_isProtCterMod) && (protein_sp.get()->size() == (start + size)))
{
peptide.addAaModification(mp_mod, pos);
}
else if(m_isProtElseMod)
{
peptide.addAaModification(mp_mod, pos);
}
}
PeptideSp peptide_sp = peptide.makePeptideSp();
// set fixed modifications
m_sink->setPeptideSp(sequence_database_id,
protein_sp,
is_decoy,
peptide_sp,
start,
is_nter,
missed_cleavage_number,
semi_enzyme);
qDebug() << "PeptideFixedModificationBuilder::setPeptide end";
}
pappso::PeptideFixedModificationBuilder::m_sink
PeptideModificatorInterface * m_sink
Definition peptidefixedmodificationbuilder.h:78
pappso::PeptideFixedModificationBuilder::m_isProtElseMod
bool m_isProtElseMod
Definition peptidefixedmodificationbuilder.h:87
pappso::PeptideFixedModificationBuilder::m_isProtNterMod
bool m_isProtNterMod
Definition peptidefixedmodificationbuilder.h:83
pappso::PeptideFixedModificationBuilder::m_isProtCterMod
bool m_isProtCterMod
Definition peptidefixedmodificationbuilder.h:85
pappso::PeptideModificatorBase::getModificationPositionList
virtual void getModificationPositionList(std::vector< unsigned int > &position_list, const QString &peptide_str) final
Definition peptidemodificatorbase.cpp:50
pappso::PeptideModificatorInterface::setPeptideSp
virtual void setPeptideSp(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideSp &peptide_sp, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme)=0
function to give the products of modifications for a digested peptide
pappso::Peptide
Definition peptide.h:100
pappso::PeptideSp
std::shared_ptr< const Peptide > PeptideSp
Definition aamodification.h:48

References pappso::Peptide::addAaModification(), pappso::PeptideModificatorBase::getModificationPositionList(), m_isProtCterMod, m_isProtElseMod, m_isProtNterMod, m_sink, pappso::Peptide::makePeptideSp(), mp_mod, pappso::PeptideModificatorInterface::setPeptideSp(), and pappso::Peptide::size().

## setProtCter()

void pappso::PeptideFixedModificationBuilder::setProtCter | ( | bool | arg1 | ) |

inline

this modification concerns the Cter peptide

Definition at line 65 of file peptidefixedmodificationbuilder.h.

{
m_isProtCterMod = arg1;
};

Referenced by pappso::PeptideModificatorPipeline::parseFixedModification(), and pappso::PeptideModificatorPipeline::parseLabeledModification().

## setProtElse()

void pappso::PeptideFixedModificationBuilder::setProtElse | ( | bool | arg1 | ) |

inline

this modification concerns all peptides between Nter and Cter

Definition at line 72 of file peptidefixedmodificationbuilder.h.

{
m_isProtElseMod = arg1;
};

Referenced by pappso::PeptideModificatorPipeline::parseFixedModification().

## setProtNter()

void pappso::PeptideFixedModificationBuilder::setProtNter | ( | bool | arg1 | ) |

inline

this modification concerns the Nter peptide

Definition at line 58 of file peptidefixedmodificationbuilder.h.

{
m_isProtNterMod = arg1;
};

Referenced by pappso::PeptideModificatorPipeline::parseFixedModification(), and pappso::PeptideModificatorPipeline::parseLabeledModification().

## setSink()

void pappso::PeptideFixedModificationBuilder::setSink | ( | PeptideModificatorInterface * | sink | ) |

inline override virtual

Implements pappso::PeptideSpSinkInterface.

Definition at line 51 of file peptidefixedmodificationbuilder.h.

{
m_sink = sink;
};

Referenced by pappso::PeptideModificatorPipeline::parseFixedModification(), and pappso::PeptideModificatorPipeline::parseLabeledModification().

## Member Data Documentation

## m_aaModificationList

QString pappso::PeptideFixedModificationBuilder::m_aaModificationList

private

Definition at line 89 of file peptidefixedmodificationbuilder.h.

Referenced by addAa().

## m_isProtCterMod

bool pappso::PeptideFixedModificationBuilder::m_isProtCterMod = true

private

Definition at line 85 of file peptidefixedmodificationbuilder.h.

Referenced by setPeptideSp().

## m_isProtElseMod

bool pappso::PeptideFixedModificationBuilder::m_isProtElseMod = true

private

Definition at line 87 of file peptidefixedmodificationbuilder.h.

Referenced by setPeptideSp().

## m_isProtNterMod

bool pappso::PeptideFixedModificationBuilder::m_isProtNterMod = true

private

Definition at line 83 of file peptidefixedmodificationbuilder.h.

Referenced by setPeptideSp().

## m_sink

PeptideModificatorInterface* pappso::PeptideFixedModificationBuilder::m_sink = nullptr

private

Definition at line 78 of file peptidefixedmodificationbuilder.h.

Referenced by setPeptideSp().

## mp_mod

const AaModificationP pappso::PeptideFixedModificationBuilder::mp_mod

private

Definition at line 80 of file peptidefixedmodificationbuilder.h.

Referenced by setPeptideSp().

The documentation for this class was generated from the following files:

- pappsomspp/protein/peptidefixedmodificationbuilder.h
- pappsomspp/protein/peptidefixedmodificationbuilder.cpp