32 #include "../peptide/peptide.h"
33 #include <QStringList>
35 #include "../pappsoexception.h"
66 : m_description(description.simplified()),
67 m_accession(m_description.split(
" ").at(0)),
75 : m_description(protein.m_description),
76 m_accession(protein.m_accession),
77 m_sequence(protein.m_sequence),
78 m_length(protein.m_length)
99 return std::make_shared<Protein>(*
this);
159 sequence.replace(QRegularExpression(
"[^WGASPVTLINDKQEMHFRCYUBZX]"),
"");
160 pappso::Peptide peptide(sequence.replace(QRegularExpression(
"[BZX]"),
"E"));
166 QObject::tr(
"Error computing mass for protein %1 :\n%2")
168 .arg(error.
qwhat()));
virtual const QString & qwhat() const
const QString & getAccession() const
const QString & getDescription() const
Protein & removeTranslationStop()
remove * characters at the end of the sequence
unsigned int m_length
number of amino acid
pappso_double getMass() const
get monoisotopic mass of ProteinSp Protein::makeProteinSp() const
QString m_sequence
the amino acid sequence
static QRegularExpression m_removeTranslationStopRegExp
unsigned int size() const
protein amino acid sequence size
Protein & reverse()
reverse characters in the sequence
QString m_accession
a single unique identifier of the protein (usually the first word of description)
bool operator==(const Protein &other) const
QString m_description
free text to describe the protein
ProteinSp makeProteinSp() const
void setSequence(const QString &sequence)
const QString & getSequence() const
void setDescription(const QString &description)
virtual void setAccession(const QString &accession)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
double pappso_double
A type definition for doubles.
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
object to handle a protein