libpappsomspp
Library for mass spectrometry
pappso::PeptideSemiEnzyme Class Reference

cut a regular peptide obtained with an enzyme at any position from Nter or Cter More...

#include <peptidesemienzyme.h>

Inheritance diagram for pappso::PeptideSemiEnzyme:
pappso::EnzymeProductInterface pappso::PeptideSinkInterface

Public Member Functions

 PeptideSemiEnzyme ()
 
virtual ~PeptideSemiEnzyme ()
 
void setPeptide (std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const QString &peptide, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme) override
 function to give the products of a protein digestion by an enzyme More...
 
void setSink (EnzymeProductInterface *sink) override
 

Private Attributes

EnzymeProductInterfacem_sink = nullptr
 

Additional Inherited Members

Detailed Description

cut a regular peptide obtained with an enzyme at any position from Nter or Cter

WORK IN PROGRESS

Definition at line 39 of file peptidesemienzyme.h.

Constructor & Destructor Documentation

◆ PeptideSemiEnzyme()

pappso::PeptideSemiEnzyme::PeptideSemiEnzyme ( )

Definition at line 30 of file peptidesemienzyme.cpp.

31 {
32 }

◆ ~PeptideSemiEnzyme()

pappso::PeptideSemiEnzyme::~PeptideSemiEnzyme ( )
virtual

Definition at line 34 of file peptidesemienzyme.cpp.

35 {
36 }

Member Function Documentation

◆ setPeptide()

void pappso::PeptideSemiEnzyme::setPeptide ( std::int8_t  sequence_database_id,
const ProteinSp protein_sp,
bool  is_decoy,
const QString &  peptide,
unsigned int  start,
bool  is_nter,
unsigned int  missed_cleavage_number,
bool  semi_enzyme 
)
overridevirtual

function to give the products of a protein digestion by an enzyme

Parameters
sequence_database_idinteger that references the sequence fatabase (file, stream, url...)
protein_spshared pointer on the protein that was digested
is_decoytell if the current protein is a decoy (true) or normal (false) protein
peptideamino acid sequence of the peptide (string) produced by the digestion
startthe 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_nterboolean to tell if the peptide is an Nter peptide (to allow Methionin Nter removal)
missed_cleavage_numbernumber of missed cleavage sites (that the enzyme has not cut) fot the product
semi_enzymeboolean that tells if this peptide is the produce of a semi enzymatic lysis

Implements pappso::EnzymeProductInterface.

Definition at line 39 of file peptidesemienzyme.cpp.

47 {
48  // if (start == 1) {
49  // m_sink->setPeptide(protein_sp, peptide, start);
50  // 2 begin
51  // size = 6
52  // i=5
53 
54  //}
55  if(semi_enzyme)
56  {
57  throw ExceptionNotPossible(
58  QObject::tr("ERROR : semi_ensyme flag is true.\n This is not possible, "
59  "because only PeptideSemiEnzyme is autorized to set it "
60  "true, and this can not be used several times."));
61  }
62 
63  m_sink->setPeptide(sequence_database_id,
64  protein_sp,
65  is_decoy,
66  peptide,
67  start,
68  is_nter,
69  missed_cleavage_number,
70  false); // transmits orignal peptide
71  unsigned int max = peptide.size();
72  // unsigned int maxi = max-1;
73  for(unsigned int i = 1; i < max; i++)
74  {
75  m_sink->setPeptide(sequence_database_id,
76  protein_sp,
77  is_decoy,
78  peptide.left(i),
79  start,
80  is_nter,
81  missed_cleavage_number,
82  true);
83  m_sink->setPeptide(sequence_database_id,
84  protein_sp,
85  is_decoy,
86  peptide.right(i),
87  start + (max - i),
88  false,
89  missed_cleavage_number,
90  true);
91  }
92 }
virtual void setPeptide(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideStr &peptide, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme)=0
function to give the products of a protein digestion by an enzyme
EnzymeProductInterface * m_sink
@ max
maximum of intensities

References m_sink, pappso::max, and pappso::EnzymeProductInterface::setPeptide().

◆ setSink()

void pappso::PeptideSemiEnzyme::setSink ( EnzymeProductInterface sink)
inlineoverridevirtual

Implements pappso::PeptideSinkInterface.

Definition at line 58 of file peptidesemienzyme.h.

59  {
60  m_sink = sink;
61  };

Member Data Documentation

◆ m_sink

EnzymeProductInterface* pappso::PeptideSemiEnzyme::m_sink = nullptr
private

Definition at line 65 of file peptidesemienzyme.h.

Referenced by setPeptide().


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