libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
protein.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/protein/protein.h
3
* \date 2/7/2015
4
* \author Olivier Langella
5
* \brief object to handle a protein
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
10
*
11
* This file is part of the PAPPSOms++ library.
12
*
13
* PAPPSOms++ is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation, either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* PAPPSOms++ is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
25
*
26
* Contributors:
27
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
28
*implementation
29
******************************************************************************/
30
31
32
#pragma once
33
34
#include <QString>
35
#include <memory>
36
#include "
pappsomspp/core/types.h
"
37
#include "
pappsomspp/export-import-config.h
"
38
39
namespace
pappso
40
{
41
42
43
class
Protein
;
44
45
/** \brief shared pointer on a Protein object
46
*/
47
typedef
std::shared_ptr<const Protein>
ProteinSp
;
48
49
class
PMSPP_LIB_DECL
Protein
50
{
51
52
public
:
53
Protein
();
54
Protein
(
const
QString &description,
const
QString &sequence);
55
Protein
(
const
Protein
&protein);
56
virtual
~Protein
();
57
ProteinSp
makeProteinSp
()
const
;
58
59
bool
operator==
(
const
Protein
&other)
const
;
60
61
const
QString &
getSequence
()
const
;
62
63
void
setSequence
(
const
QString &sequence);
64
65
const
QString &
getAccession
()
const
;
66
67
virtual
void
setAccession
(
const
QString &accession);
68
69
const
QString &
getDescription
()
const
;
70
71
void
setDescription
(
const
QString &description);
72
73
/** \brief remove * characters at the end of the sequence
74
*/
75
Protein
&
removeTranslationStop
();
76
77
/** \brief reverse characters in the sequence
78
*/
79
Protein
&
reverse
();
80
81
/** \brief protein amino acid sequence size
82
*/
83
unsigned
int
size
()
const
;
84
85
/** \brief get monoisotopic mass of ProteinSp Protein::makeProteinSp() const
86
*/
87
pappso_double
getMass
()
const
;
88
89
private
:
90
/** \brief free text to describe the protein */
91
QString
m_description
;
92
/** \brief a single unique identifier of the protein (usually the first word
93
* of description) */
94
QString
m_accession
;
95
/** \brief the amino acid sequence */
96
QString
m_sequence
;
97
/** \brief number of amino acid */
98
unsigned
int
m_length
= 0;
99
100
static
QRegularExpression
m_removeTranslationStopRegExp
;
101
};
102
103
104
}
// namespace pappso
pappso::Protein
Definition
protein.h:50
pappso::Protein::getAccession
const QString & getAccession() const
Definition
protein.cpp:127
pappso::Protein::getDescription
const QString & getDescription() const
Definition
protein.cpp:137
pappso::Protein::removeTranslationStop
Protein & removeTranslationStop()
remove * characters at the end of the sequence
Definition
protein.cpp:83
pappso::Protein::Protein
Protein()
Definition
protein.cpp:62
pappso::Protein::m_length
unsigned int m_length
number of amino acid
Definition
protein.h:98
pappso::Protein::getMass
pappso_double getMass() const
get monoisotopic mass of ProteinSp Protein::makeProteinSp() const
Definition
protein.cpp:150
pappso::Protein::m_sequence
QString m_sequence
the amino acid sequence
Definition
protein.h:96
pappso::Protein::m_removeTranslationStopRegExp
static QRegularExpression m_removeTranslationStopRegExp
Definition
protein.h:100
pappso::Protein::size
unsigned int size() const
protein amino acid sequence size
Definition
protein.cpp:116
pappso::Protein::reverse
Protein & reverse()
reverse characters in the sequence
Definition
protein.cpp:90
pappso::Protein::m_accession
QString m_accession
a single unique identifier of the protein (usually the first word of description)
Definition
protein.h:94
pappso::Protein::operator==
bool operator==(const Protein &other) const
Definition
protein.cpp:104
pappso::Protein::m_description
QString m_description
free text to describe the protein
Definition
protein.h:91
pappso::Protein::makeProteinSp
ProteinSp makeProteinSp() const
Definition
protein.cpp:97
pappso::Protein::setSequence
void setSequence(const QString &sequence)
Definition
protein.cpp:110
pappso::Protein::getSequence
const QString & getSequence() const
Definition
protein.cpp:122
pappso::Protein::setDescription
void setDescription(const QString &description)
Definition
protein.cpp:142
pappso::Protein::setAccession
virtual void setAccession(const QString &accession)
Definition
protein.cpp:132
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition
types.h:60
pappso::ProteinSp
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition
protein.h:47
types.h
pappsomspp
core
protein
protein.h
Generated on
for libpappsomspp by
1.17.0