libpappsomspp
Library for mass spectrometry
|
#include <aamodification.h>
|
| AaModification (AaModification &&toCopy) |
|
const QString & | getAccession () const |
|
const QString & | getName () const |
|
| ~AaModification () |
|
pappso_double | getMass () const |
|
int | getNumberOfAtom (AtomIsotopeSurvey atom) const override final |
| get the number of atom C, O, N, H in the molecule More...
|
|
int | getNumberOfIsotope (Isotope isotope) const override final |
| get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule More...
|
|
bool | isInternal () const |
|
Definition at line 77 of file aamodification.h.
◆ MapAccessionModifications
◆ AaModification() [1/2]
pappso::AaModification::AaModification |
( |
const QString & |
accession, |
|
|
pappso_double |
mass |
|
) |
| |
|
private |
Definition at line 77 of file aamodification.cpp.
93 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
◆ AaModification() [2/2]
◆ ~AaModification()
pappso::AaModification::~AaModification |
( |
| ) |
|
◆ calculateMassFromChemicalComponents()
void pappso::AaModification::calculateMassFromChemicalComponents |
( |
| ) |
|
|
private |
Definition at line 307 of file aamodification.cpp.
315 theoreticalm_mass +=
MASSSULFUR * (it_atom->second);
318 qDebug() << theoreticalm_mass;
333 m_mass = theoreticalm_mass;
334 qDebug() <<
"AaModification::calculateMassFromChemicalComponents "
340 <<
"ERROR in AaModification::calculateMassFromChemicalComponents theo="
341 << theoreticalm_mass <<
" m=" <<
m_mass <<
" diff=" << diff
349 QString accession = QString(
"%1").arg(modificationMass);
350 qDebug() <<
"AaModification::getInstanceCustomizedMod " << accession;
References pappso::MASSNITROGEN().
◆ createInstance() [1/2]
Definition at line 130 of file aamodification.cpp.
133 :Cter_hydrolytic_cleavage_HO
")
136 term.m_accession = accession;
137 term.m_diffFormula = "H 1
O 1
";
138 term.m_diffMono = MPROTIUM + MASSOXYGEN;
139 term.m_name = "Cter hydrolytic cleavage HO
";
140 return (AaModification::createInstance(term));
◆ createInstance() [2/2]
AaModificationP pappso::AaModification::createInstance |
( |
const QString & |
saccession | ) |
|
|
staticprivate |
Definition at line 143 of file aamodification.cpp.
144 QRegExp regexp_mutation(
"^MUTATION:([A-Z])=>([A-Z])$");
145 if(regexp_mutation.exactMatch(accession))
147 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__ <<
" "
148 << regexp_mutation.capturedTexts()[1].at(0) <<
" "
149 << regexp_mutation.capturedTexts()[2].at(0);
152 regexp_mutation.capturedTexts()[1].toStdString().c_str()[0]);
153 Aa aa_to(regexp_mutation.capturedTexts()[2].toStdString().c_str()[0]);
156 return instance_mutation;
161 FilterOboPsiModSink term_list;
162 FilterOboPsiModTermAccession filterm_accession(term_list, accession);
164 OboPsiMod psimod(filterm_accession);
170 catch(ExceptionNotFound &e)
172 throw ExceptionNotFound(QObject::tr(
"modification not found : [%1]\n%2")
188 QRegExp rx(
"(^|\\s)([C,H,O,N,H,S])\\s([-]{0,1}\\d+)");
191 while((pos = rx.indexIn(diff_formula, pos)) != -1)
193 qDebug() << rx.cap(2) <<
" " << rx.cap(3);
References createInstanceMutation().
Referenced by getInstanceCustomizedMod().
◆ createInstanceMutation()
AaModificationP pappso::AaModification::createInstanceMutation |
( |
const Aa & |
aa_from, |
|
|
const Aa & |
aa_to |
|
) |
| |
|
staticprivate |
Definition at line 601 of file aamodification.cpp.
609 QString accession(QString(
"MUTATION:%1=>%2").arg(mut_from).arg(mut_to));
613 MapAccessionModifications::iterator it =
617 Aa aa_from(mut_from.toLatin1());
618 Aa aa_to(mut_to.toLatin1());
622 std::pair<MapAccessionModifications::iterator, bool> insert_res =
624 std::pair<QString, AaModificationP>(accession,
Referenced by createInstance().
◆ getAccession()
const QString & pappso::AaModification::getAccession |
( |
| ) |
const |
◆ getInstance() [1/2]
◆ getInstance() [2/2]
AaModificationP pappso::AaModification::getInstance |
( |
const QString & |
accession | ) |
|
|
static |
◆ getInstanceCustomizedMod()
◆ getInstanceMutation()
AaModificationP pappso::AaModification::getInstanceMutation |
( |
const QChar & |
mut_from, |
|
|
const QChar & |
mut_to |
|
) |
| |
|
static |
get a fake modification coding a mutation from an amino acid to an other
- Parameters
-
mut_from | orginal amino acid |
mut_to | targeted amino acid |
Definition at line 628 of file aamodification.cpp.
634 catch(ExceptionNotFound &e)
636 throw ExceptionNotFound(
637 QObject::tr(
"ERROR getting instance of : %1 NOT FOUND\n%2")
641 catch(PappsoException &e)
643 throw PappsoException(QObject::tr(
"ERROR getting instance of %1\n%2")
647 catch(std::exception &e)
649 throw PappsoException(QObject::tr(
"ERROR getting instance of %1\n%2")
◆ getInstanceXtandemMod()
Definition at line 456 of file aamodification.cpp.
507 if(peptide_sp.get()->size() == (position + 1))
511 if((position == 0) || isCter)
529 throw PappsoException(
530 QObject::tr(
"tandem modification not found : %1 %2 %3 %4")
533 .arg(peptide_sp.get()->getSequence())
References getInstance().
◆ getMass()
◆ getName()
const QString & pappso::AaModification::getName |
( |
| ) |
const |
◆ getNumberOfAtom()
◆ getNumberOfIsotope()
int pappso::AaModification::getNumberOfIsotope |
( |
Isotope |
isotope | ) |
const |
|
finaloverridevirtual |
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
Implements pappso::AtomNumberInterface.
Definition at line 575 of file aamodification.cpp.
583 QString(
"MUTATION:%1=>%2").arg(aa_from.getLetter()).arg(aa_to.getLetter()));
584 double diffMono = aa_to.getMass() - aa_from.getMass();
◆ isInternal()
bool pappso::AaModification::isInternal |
( |
| ) |
const |
Definition at line 591 of file aamodification.cpp.
596 instance_mutation->m_atomCount[atom] =
597 aa_to.getNumberOfAtom(atom) - aa_from.getNumberOfAtom(atom);
◆ setDiffFormula()
void pappso::AaModification::setDiffFormula |
( |
const QString & |
diff_formula | ) |
|
|
protected |
Definition at line 207 of file aamodification.cpp.
210 else if(rx.cap(2) ==
"S")
214 pos += rx.matchedLength();
218 rx.setPattern(
"\\(([-]{0,1}\\d+)\\)([C,H,O,N,H,S])\\s([-]{0,1}\\d+)");
221 while((pos = rx.indexIn(diff_formula, pos)) != -1)
223 qDebug() << rx.cap(1) <<
" " << rx.cap(2) <<
" " << rx.cap(3);
224 int number_of_isotopes = rx.cap(3).toInt();
227 if(rx.cap(1) ==
"13")
233 else if(rx.cap(2) ==
"H")
241 else if(rx.cap(2) ==
"N")
243 if(rx.cap(1) ==
"15")
249 else if(rx.cap(2) ==
"O")
251 if(rx.cap(1) ==
"17")
255 else if(rx.cap(1) ==
"18")
261 else if(rx.cap(2) ==
"S")
263 if(rx.cap(1) ==
"33")
267 else if(rx.cap(1) ==
"34")
271 else if(rx.cap(1) ==
"36")
277 pos += rx.matchedLength();
289 std::map<AtomIsotopeSurvey, int>::const_iterator it_atom =
293 theoreticalm_mass +=
MASSCARBON * (it_atom->second);
298 theoreticalm_mass +=
MPROTIUM * (it_atom->second);
References m_atomCount, and pappso::O.
◆ setXrefOrigin()
void pappso::AaModification::setXrefOrigin |
( |
const QString & |
origin | ) |
|
|
protected |
set list of amino acid on which this modification takes place
- origin string of the form "S T" for Serine or Threonine, "X" for any amino acid (see OBO PSI format)
Definition at line 200 of file aamodification.cpp.
◆ m_accession
const QString pappso::AaModification::m_accession |
|
protected |
◆ m_atomCount
◆ m_mapAccessionModifications
◆ m_mapIsotope
std::map<Isotope, int> pappso::AaModification::m_mapIsotope |
|
private |
◆ m_mass
◆ m_mutex
QMutex pappso::AaModification::m_mutex |
|
staticprivate |
◆ m_name
QString pappso::AaModification::m_name |
|
protected |
◆ m_origin
QString pappso::AaModification::m_origin |
|
private |
The documentation for this class was generated from the following files:
void setDiffFormula(const QString &diff_formula)
double pappso_double
A type definition for doubles.
void calculateMassFromChemicalComponents()
const QString & getAccession() const
static AaModificationP createInstanceMutation(const Aa &aa_from, const Aa &aa_to)
const QString m_accession
const pappso_double MASSCARBON(12)
const pappso_double DIFFN14N15(15.0001088982 - MASSNITROGEN)
const pappso_double DIFFH1H2(2.0141017778 - MPROTIUM)
int getNumberOfAtom(AtomIsotopeSurvey atom) const override final
get the number of atom C, O, N, H in the molecule
const pappso_double DIFFS32S33(32.97145876 - MASSSULFUR)
AaModification(const QString &accession, pappso_double mass)
pappso_double getMass() const
const AaModification * AaModificationP
static PrecisionPtr getDaltonInstance(pappso_double value)
const pappso_double DIFFS32S34(33.96786690 - MASSSULFUR)
static MapAccessionModifications m_mapAccessionModifications
const pappso_double DIFFC12C13(1.0033548378)
int getNumberOfIsotope(Isotope isotope) const override final
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
static AaModificationP getInstance(const QString &accession)
std::map< Isotope, int > m_mapIsotope
const PrecisionBase * PrecisionPtr
std::map< QString, AaModificationP > MapAccessionModifications
std::map< AtomIsotopeSurvey, int > m_atomCount
const pappso_double DIFFS32S36(35.96708076 - MASSSULFUR)
void setXrefOrigin(const QString &origin)
set list of amino acid on which this modification takes place
static AaModificationP createInstance(const QString &saccession)
const pappso_double MASSSULFUR(31.97207100)
static AaModificationP getInstanceCustomizedMod(pappso_double modificationMass)
const pappso_double MPROTIUM(1.007825032241)
const pappso_double MASSNITROGEN(14.0030740048)
const pappso_double DIFFO16O17(16.99913150 - MASSOXYGEN)
const pappso_double DIFFO16O18(17.9991610 - MASSOXYGEN)