Loading...
Searching...
No Matches
protein.h
Go to the documentation of this file.
/**
* \file pappsomspp/protein/protein.h
* \date 2/7/2015
* \author Olivier Langella
* \brief object to handle a protein
*/
/*******************************************************************************
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include <QString>
#include <memory>
#include "../types.h"
#include "../exportinmportconfig.h"
namespace pappso
{
class Protein;
/** \brief shared pointer on a Protein object
*/
typedef std::shared_ptr<const Protein> ProteinSp;
class PMSPP_LIB_DECL Protein
{
public:
Protein();
Protein(const QString &description, const QString &sequence);
Protein(const Protein &protein);
virtual ~Protein();
ProteinSp makeProteinSp() const;
bool operator==(const Protein &other) const;
const QString &getSequence() const;
void setSequence(const QString &sequence);
const QString &getAccession() const;
virtual void setAccession(const QString &accession);
const QString &getDescription() const;
void setDescription(const QString &description);
/** \brief remove * characters at the end of the sequence
*/
Protein &removeTranslationStop();
/** \brief reverse characters in the sequence
*/
Protein &reverse();
/** \brief protein amino acid sequence size
*/
unsigned int size() const;
/** \brief get monoisotopic mass of ProteinSp Protein::makeProteinSp() const
*/
pappso_double getMass() const;
private:
/** \brief free text to describe the protein */
QString m_description;
/** \brief a single unique identifier of the protein (usually the first word
* of description) */
QString m_accession;
/** \brief the amino acid sequence */
QString m_sequence;
/** \brief number of amino acid */
unsigned int m_length = 0;
static QRegularExpression m_removeTranslationStopRegExp;
};
} // namespace pappso
pappso::Protein
Definition protein.h:50
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::m_accession
QString m_accession
a single unique identifier of the protein (usually the first word of description)
Definition protein.h:94
pappso::Protein::m_description
QString m_description
free text to describe the protein
Definition protein.h:91
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition exportinmportconfig.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:50
pappso::ProteinSp
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
Definition protein.h:47
pappso::operator==
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:342