libpappsomspp
Library for mass spectrometry
peptidesizefilter.cpp
Go to the documentation of this file.
1
2/*******************************************************************************
3 * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
4 *
5 * This file is part of the PAPPSOms++ library.
6 *
7 * PAPPSOms++ is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * PAPPSOms++ is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * Contributors:
21 * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
22 *implementation
23 ******************************************************************************/
24
25#include "peptidesizefilter.h"
26
27namespace pappso
28{
30 unsigned int max_size)
31 : m_minSize(min_size), m_maxSize(max_size)
32{
33}
34
36{
37}
38
39void
40PeptideSizeFilter::setPeptide(std::int8_t sequence_database_id,
41 const ProteinSp &protein_sp,
42 bool is_decoy,
43 const QString &peptide,
44 unsigned int start,
45 bool is_nter,
46 unsigned int missed_cleavage_number,
47 bool semi_enzyme)
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}
61} // namespace pappso
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
PeptideSizeFilter(unsigned int min_size, unsigned int max_size)
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
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition: protein.h:47