libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
peptidebuilder.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
#include "
peptidebuilder.h
"
25
#include <QDebug>
26
27
namespace
pappso
28
{
29
PeptideBuilder::PeptideBuilder
()
30
{
31
}
32
33
PeptideBuilder::~PeptideBuilder
()
34
{
35
}
36
void
37
PeptideBuilder::addFixedAaModification
(
char
aa,
AaModificationP
modification)
38
{
39
40
m_fixedModificationList
.push_back(std::pair<char, AaModificationP>(aa, modification));
41
}
42
43
void
44
PeptideBuilder::setPeptide
(std::int8_t sequence_database_id,
45
const
ProteinSp
&protein_sp,
46
bool
is_decoy,
47
const
QString &peptide_str,
48
unsigned
int
start,
49
bool
is_nter,
50
unsigned
int
missed_cleavage_number,
51
bool
semi_enzyme)
52
{
53
54
qDebug() <<
"PeptideBuilder::setPeptide begin"
;
55
56
Peptide
peptide(peptide_str);
57
58
for
(
auto
&&aamod_pair :
m_fixedModificationList
)
59
{
60
std::vector<unsigned int> position_list = peptide.
getAaPositionList
(aamod_pair.first);
61
for
(
auto
&&position : position_list)
62
{
63
peptide.
addAaModification
(aamod_pair.second, position);
64
}
65
}
66
67
PeptideSp
peptide_sp = peptide.
makePeptideSp
();
68
// set fixed modifications
69
70
qDebug() <<
"PeptideBuilder::setPeptide m_sink->setPeptideSp"
;
71
m_sink
->setPeptideSp(sequence_database_id,
72
protein_sp,
73
is_decoy,
74
peptide_sp,
75
start,
76
is_nter,
77
missed_cleavage_number,
78
semi_enzyme);
79
qDebug() <<
"PeptideBuilder::setPeptide end"
;
80
}
81
82
}
// namespace pappso
pappso::PeptideBuilder::m_fixedModificationList
std::list< std::pair< char, AaModificationP > > m_fixedModificationList
Definition
peptidebuilder.h:62
pappso::PeptideBuilder::setPeptide
void setPeptide(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const QString &peptide_str, 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
Definition
peptidebuilder.cpp:44
pappso::PeptideBuilder::PeptideBuilder
PeptideBuilder()
Definition
peptidebuilder.cpp:29
pappso::PeptideBuilder::m_sink
PeptideModificatorInterface * m_sink
Definition
peptidebuilder.h:60
pappso::PeptideBuilder::~PeptideBuilder
virtual ~PeptideBuilder()
Definition
peptidebuilder.cpp:33
pappso::PeptideBuilder::addFixedAaModification
void addFixedAaModification(char aa, AaModificationP modification)
Definition
peptidebuilder.cpp:37
pappso::Peptide
Definition
peptide.h:102
pappso::Peptide::makePeptideSp
PeptideSp makePeptideSp() const
Definition
peptide.cpp:160
pappso::Peptide::getAaPositionList
std::vector< unsigned int > getAaPositionList(char aa) const
get positions of one amino acid in peptide
Definition
peptide.cpp:567
pappso::Peptide::addAaModification
void addAaModification(AaModificationP aaModification, unsigned int position)
adds a modification to amino acid sequence
Definition
peptide.cpp:222
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::PeptideSp
std::shared_ptr< const Peptide > PeptideSp
Definition
aamodification.h:48
pappso::AaModificationP
const AaModification * AaModificationP
Definition
aamodification.h:52
pappso::ProteinSp
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition
protein.h:47
peptidebuilder.h
pappsomspp
core
protein
peptidebuilder.cpp
Generated on
for libpappsomspp by
1.17.0