libpappsomspp
Library for mass spectrometry
pappso::PeptideSizeFilter Class Reference

filter peptide string by size More...

#include <peptidesizefilter.h>

Inheritance diagram for pappso::PeptideSizeFilter:
pappso::EnzymeProductInterface pappso::PeptideSinkInterface

Public Member Functions

 PeptideSizeFilter (unsigned int min_size, unsigned int max_size)
 
virtual ~PeptideSizeFilter ()
 
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
 
const int m_minSize
 
const int m_maxSize
 

Additional Inherited Members

Detailed Description

filter peptide string by size

Definition at line 34 of file peptidesizefilter.h.

Constructor & Destructor Documentation

◆ PeptideSizeFilter()

pappso::PeptideSizeFilter::PeptideSizeFilter ( unsigned int  min_size,
unsigned int  max_size 
)

Definition at line 29 of file peptidesizefilter.cpp.

31  : m_minSize(min_size), m_maxSize(max_size)
32 {
33 }

◆ ~PeptideSizeFilter()

pappso::PeptideSizeFilter::~PeptideSizeFilter ( )
virtual

Definition at line 35 of file peptidesizefilter.cpp.

36 {
37 }

Member Function Documentation

◆ setPeptide()

void pappso::PeptideSizeFilter::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 40 of file peptidesizefilter.cpp.

48 {
49  if((peptide.size() >= m_minSize) && (peptide.size() <= m_maxSize))
50  {
51  m_sink->setPeptide(sequence_database_id,
52  protein_sp,
53  is_decoy,
54  peptide,
55  start,
56  is_nter,
57  missed_cleavage_number,
58  semi_enzyme);
59  }
60 }
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

References m_maxSize, m_minSize, m_sink, and pappso::EnzymeProductInterface::setPeptide().

◆ setSink()

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

Implements pappso::PeptideSinkInterface.

Definition at line 54 of file peptidesizefilter.h.

55  {
56  m_sink = sink;
57  };

Member Data Documentation

◆ m_maxSize

const int pappso::PeptideSizeFilter::m_maxSize
private

Definition at line 63 of file peptidesizefilter.h.

Referenced by setPeptide().

◆ m_minSize

const int pappso::PeptideSizeFilter::m_minSize
private

Definition at line 62 of file peptidesizefilter.h.

Referenced by setPeptide().

◆ m_sink

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

Definition at line 61 of file peptidesizefilter.h.

Referenced by setPeptide().


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