libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
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)),
70 m_description = m_description.remove(0, m_accession.size()).simplified();
72 m_length = m_sequence.size();
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(QRegExp(
"[^WGASPVTLINDKQEMHFRCYUBZX]"),
"");
161 return peptide.getMass();
166 QObject::tr(
"Error computing mass for protein %1 :\n%2")
168 .arg(error.
qwhat()));
const QString & getSequence() const
ProteinSp makeProteinSp() const
double pappso_double
A type definition for doubles.
void setDescription(const QString &description)
static QRegExp m_removeTranslationStopRegExp
unsigned int size() const
protein amino acid sequence size
const QString & getDescription() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
const QString & getAccession() const
object to handle a protein
QString m_description
free text to describe the protein
virtual void setAccession(const QString &accession)
unsigned int m_length
number of amino acid
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object
void setSequence(const QString &sequence)
virtual const QString & qwhat() const
Protein & removeTranslationStop()
remove * characters at the end of the sequence
bool operator==(const Protein &other) const
Protein & reverse()
reverse characters in the sequence
QString m_sequence
the amino acid sequence
pappso_double getMass() const
get monoisotopic mass of ProteinSp Protein::makeProteinSp() const
QString m_accession
a single unique identifier of the protein (usually the first word of description)