Loading...
Searching...
No Matches
pappso::OboPsiModTerm Class Reference

`#include <obopsimodterm.h>`

## Public Member Functions

| OboPsiModTerm ()
| ~OboPsiModTerm ()
| OboPsiModTerm (const OboPsiModTerm &)
OboPsiModTerm & | operator= (const OboPsiModTerm &)
bool | isValid () const
bool | isA (const QString &accession) const
| tells if this term "is_a" another accession
void | setAccession (const QString &accession)
const QString & | getAccession () const
bool | isUnimod () const

## Public Attributes

QString | m_name
QString | m_definition
QString | m_psiModLabel
QString | m_psiMsLabel
QString | m_diffFormula
QString | m_formula
QString | m_origin
double | m_diffMono
double | m_massMono
QStringList | m_isA

## Private Member Functions

void | parseLine (const QString &line)
void | clearTerm ()

## Private Attributes

friend | OboPsiMod
friend | OboPsiMs
friend | OboUnimod
QString | m_accession
bool | m_isUnimod = false

## Static Private Attributes

static QRegularExpression | m_firstParse
static QRegularExpression | m_findExactPsiModLabel
static QRegularExpression | m_findRelatedPsiMsLabel
static QRegularExpression | m_firstParseUnimod
static QRegularExpression | m_parseDefinition

## Detailed Description

Definition at line 33 of file obopsimodterm.h.

## Constructor & Destructor Documentation

## OboPsiModTerm() [1/2]

pappso::OboPsiModTerm::OboPsiModTerm | ( |  | ) |

Definition at line 51 of file obopsimodterm.cpp.

{
}

Referenced by OboPsiModTerm(), and operator=().

## ~OboPsiModTerm()

pappso::OboPsiModTerm::~OboPsiModTerm | ( |  | ) |

Definition at line 55 of file obopsimodterm.cpp.

{
}

## OboPsiModTerm() [2/2]

pappso::OboPsiModTerm::OboPsiModTerm | ( | const OboPsiModTerm & | other | ) |

Definition at line 58 of file obopsimodterm.cpp.

{
m_accession = other.m_accession;
m_name = other.m_name;
m_definition = other.m_definition;
m_psiModLabel = other.m_psiModLabel;
m_psiMsLabel = other.m_psiMsLabel;
m_diffFormula = other.m_diffFormula;
m_formula = other.m_formula;
m_origin = other.m_origin;
m_diffMono = other.m_diffMono;
m_massMono = other.m_massMono;
m_isA = other.m_isA;
m_isUnimod = other.m_isUnimod;
}
pappso::OboPsiModTerm::m_psiModLabel
QString m_psiModLabel
Definition obopsimodterm.h:60
pappso::OboPsiModTerm::m_isA
QStringList m_isA
Definition obopsimodterm.h:69
pappso::OboPsiModTerm::m_psiMsLabel
QString m_psiMsLabel
Definition obopsimodterm.h:61
pappso::OboPsiModTerm::m_diffFormula
QString m_diffFormula
Definition obopsimodterm.h:62
pappso::OboPsiModTerm::m_origin
QString m_origin
Definition obopsimodterm.h:64
pappso::OboPsiModTerm::m_definition
QString m_definition
Definition obopsimodterm.h:59
pappso::OboPsiModTerm::m_formula
QString m_formula
Definition obopsimodterm.h:63
pappso::OboPsiModTerm::m_massMono
double m_massMono
Definition obopsimodterm.h:67
pappso::OboPsiModTerm::m_diffMono
double m_diffMono
Definition obopsimodterm.h:66
pappso::OboPsiModTerm::m_isUnimod
bool m_isUnimod
Definition obopsimodterm.h:83
pappso::OboPsiModTerm::m_accession
QString m_accession
Definition obopsimodterm.h:82
pappso::OboPsiModTerm::m_name
QString m_name
Definition obopsimodterm.h:58

References OboPsiModTerm(), m_accession, m_definition, m_diffFormula, m_diffMono, m_formula, m_isA, m_isUnimod, m_massMono, m_name, m_origin, m_psiModLabel, and m_psiMsLabel.

## Member Function Documentation

## clearTerm()

void pappso::OboPsiModTerm::clearTerm | ( |  | ) |

private

Definition at line 243 of file obopsimodterm.cpp.

{
m_accession = "";
m_name = "";
m_definition = "";
m_psiModLabel = "";
m_diffFormula = "";
m_formula = "";
m_diffMono = 0;
m_origin = "";
m_massMono = 0;
m_isA.clear();
m_isUnimod = false;
}

References m_accession, m_definition, m_diffFormula, m_diffMono, m_formula, m_isA, m_isUnimod, m_massMono, m_name, m_origin, and m_psiModLabel.

## getAccession()

const QString & pappso::OboPsiModTerm::getAccession | ( |  | ) | const

Definition at line 261 of file obopsimodterm.cpp.

{
return m_accession;
}

References m_accession.

Referenced by pappso::AaModification::createInstance(), pappso::OboTermForm::displayOboTerm(), pappso::AaModification::getInstance(), pappso::OboListWidget::onSelectionChanged(), pappso::ChemicalFormula::setOboPsiModTerm(), pappso::FilterOboPsiModMap::setOboPsiModTerm(), pappso::FilterOboPsiModTermAccession::setOboPsiModTerm(), and pappso::MzIdentMlWriter::writeCvParam().

## isA()

bool pappso::OboPsiModTerm::isA | ( | const QString & | accession | ) | const

tells if this term "is_a" another accession

Returns
  bool if true

Definition at line 102 of file obopsimodterm.cpp.

{
return m_isA.contains(accession);
}

References m_isA.

Referenced by pappso::ChemicalFormula::setOboPsiModTerm().

## isUnimod()

bool pappso::OboPsiModTerm::isUnimod | ( |  | ) | const

Definition at line 277 of file obopsimodterm.cpp.

{
return m_isUnimod;
}

References m_isUnimod.

Referenced by pappso::ChemicalFormula::setOboPsiModTerm().

## isValid()

bool pappso::OboPsiModTerm::isValid | ( |  | ) | const

Definition at line 96 of file obopsimodterm.cpp.

{
return (!m_accession.isEmpty());
}

References m_accession.

Referenced by pappso::OboTermForm::displayOboTerm().

## operator=()

OboPsiModTerm & pappso::OboPsiModTerm::operator= | ( | const OboPsiModTerm & | other | ) |

Definition at line 76 of file obopsimodterm.cpp.

{
m_accession = other.m_accession;
m_name = other.m_name;
m_definition = other.m_definition;
m_psiModLabel = other.m_psiModLabel;
m_psiMsLabel = other.m_psiMsLabel;
m_diffFormula = other.m_diffFormula;
m_formula = other.m_formula;
m_origin = other.m_origin;
m_diffMono = other.m_diffMono;
m_massMono = other.m_massMono;
m_isA = other.m_isA;
m_isUnimod = other.m_isUnimod;
return *this;
}

References OboPsiModTerm(), m_accession, m_definition, m_diffFormula, m_diffMono, m_formula, m_isA, m_isUnimod, m_massMono, m_name, m_origin, m_psiModLabel, and m_psiMsLabel.

## parseLine()

void pappso::OboPsiModTerm::parseLine | ( | const QString & | line | ) |

private

Definition at line 108 of file obopsimodterm.cpp.

{
// qDebug() << "OboPsiModTerm::parseLine begin " << line;
// id: MOD:00007
// is_a: MOD:01441 ! natural, standard, encoded residue
QRegularExpressionMatch match_line = m_firstParse.match(line);
if(match_line.hasMatch())
{
QStringList pline = match_line.capturedTexts();
// qDebug() << "OboPsiModTerm::parseLine match " << pline[0] << pline[1];
if(pline[1] == "id")
{
setAccession(pline[2].trimmed());
// qDebug() << "OboPsiModTerm::parseLine accession = " << m_accession;
}
else if(pline[1] == "name")
{
m_name = pline[2].trimmed();
// qDebug() << "OboPsiModTerm::parseLine accession = " << m_accession;
}
else if(pline[1] == "is_a")
{
m_isA << pline[2].section(" ", 0, 0);
// qDebug() << "OboPsiModTerm::parseLine is_a = " << m_isA.join(" ");
}
else if(pline[1] == "xref")
{
// xref: DiffMono: "1.007276"
QRegularExpressionMatch match_subline = m_firstParse.match(pline[2]);
if(m_isUnimod)
{
match_subline = m_firstParseUnimod.match(pline[2]);
}
if(match_subline.hasMatch())
{
QStringList psecond = match_subline.capturedTexts();
if(psecond[1] == "DiffMono")
{
m_diffMono = psecond[2].replace("\"", "").toDouble();
// qDebug() << "OboPsiModTerm::parseLine m_diffMono = " <<
// m_diffMono;
}
else if(psecond[1] == "delta_mono_mass")
{ // UNIMOD
// xref: delta_mono_mass "42.010565"
m_diffMono = psecond[2].replace("\"", "").toDouble();
// qDebug() << "OboPsiModTerm::parseLine m_diffFormula = |" <<
// m_diffFormula<<"|";
}
else if(psecond[1] == "DiffFormula")
{
m_diffFormula = psecond[2].trimmed().replace("\"", "");
// qDebug() << "OboPsiModTerm::parseLine m_diffFormula = |" <<
// m_diffFormula<<"|";
}
else if(psecond[1] == "delta_composition")
{
// UNIMOD
// xref: delta_composition "H(2) C(2) O"
m_diffFormula = psecond[2].trimmed().replace("\"", "");
// qDebug() << "OboPsiModTerm::parseLine m_diffFormula = |" <<
// m_diffFormula<<"|";
}
else if(psecond[1] == "Formula")
{
// xref: Formula: "C 5 H 9 N 1 O 1 S 1"
m_formula = psecond[2].trimmed().replace("\"", "");
// qDebug() << "OboPsiModTerm::parseLine m_diffFormula = |" <<
// m_diffFormula<<"|";
}
else if(psecond[1] == "Origin")
{
m_origin = psecond[2].trimmed().replace("\"", "").replace(",", "");
// qDebug() << "OboPsiModTerm::parseLine m_diffFormula = |" <<
// m_diffFormula<<"|";
}
// xref: MassMono: "71.037114"
else if(psecond[1] == "MassMono")
{
bool is_ok = false;
double mass_mono = psecond[2].replace("\"", "").toDouble(&is_ok);
if(is_ok)
m_massMono = mass_mono;
else
m_massMono = 0;
// qDebug() << "OboPsiModTerm::parseLine m_diffFormula = |" <<
// m_diffFormula<<"|";
}
}
}
else if(pline[1] == "synonym")
{
// synonym: "Se(S)Res" EXACT PSI-MOD-label []
QRegularExpressionMatch match_exact_psimod = m_findExactPsiModLabel.match(pline[2]);
if(match_exact_psimod.hasMatch())
{
m_psiModLabel = match_exact_psimod.captured(1).trimmed().replace("\"", "");
// qDebug() << "OboPsiModTerm::parseLine m_psiModLabel = |" <<
// m_psiModLabel<<"|";
}
else
{
QRegularExpressionMatch match_related_psims = m_findRelatedPsiMsLabel.match(pline[2]);
if(match_related_psims.hasMatch())
{
m_psiMsLabel = match_related_psims.captured(1).trimmed().replace("\"", "");
// qDebug() << "OboPsiModTerm::parseLine m_psiModLabel = |" <<
// m_psiModLabel<<"|";
}
}
}
else if(pline[1] == "def")
{
// def: "A protein modification that modifies an L-asparagine
// residue." [PubMed:18688235]
QRegularExpressionMatch match_subline = m_parseDefinition.match(pline[2]);
if(match_subline.hasMatch())
{
QStringList psecond = match_subline.capturedTexts();
m_definition = psecond[1];
}
else
{
m_definition = pline[2];
}
}
}
}
CardanoResultCase::line
@ line
Definition cardano.h:42
pappso::OboPsiModTerm::m_firstParseUnimod
static QRegularExpression m_firstParseUnimod
Definition obopsimodterm.h:78
pappso::OboPsiModTerm::setAccession
void setAccession(const QString &accession)
Definition obopsimodterm.cpp:267
pappso::OboPsiModTerm::m_firstParse
static QRegularExpression m_firstParse
Definition obopsimodterm.h:75
pappso::OboPsiModTerm::m_findRelatedPsiMsLabel
static QRegularExpression m_findRelatedPsiMsLabel
Definition obopsimodterm.h:77
pappso::OboPsiModTerm::m_findExactPsiModLabel
static QRegularExpression m_findExactPsiModLabel
Definition obopsimodterm.h:76
pappso::OboPsiModTerm::m_parseDefinition
static QRegularExpression m_parseDefinition
Definition obopsimodterm.h:79

References line, m_definition, m_diffFormula, m_diffMono, m_findExactPsiModLabel, m_findRelatedPsiMsLabel, m_firstParse, m_firstParseUnimod, m_formula, m_isA, m_isUnimod, m_massMono, m_name, m_origin, m_parseDefinition, m_psiModLabel, m_psiMsLabel, and setAccession().

## setAccession()

void pappso::OboPsiModTerm::setAccession | ( | const QString & | accession | ) |

Definition at line 267 of file obopsimodterm.cpp.

{
qDebug() << accession;
m_isUnimod = false;
m_accession = accession;
if(m_accession.startsWith("UNIMOD:"))
m_isUnimod = true;
}

References m_accession, and m_isUnimod.

Referenced by pappso::AaModification::createInstance(), pappso::AaModification::createInstanceC13N15LabelledAminoAcid(), pappso::MsFileAccessor::getOboPsiModTermFileFormat(), pappso::PwizMsRunReader::getOboPsiModTermNativeIDFormat(), pappso::OboListModel::loadPsiMod(), and parseLine().

## Member Data Documentation

## m_accession

QString pappso::OboPsiModTerm::m_accession

private

Definition at line 82 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), getAccession(), isValid(), operator=(), and setAccession().

## m_definition

QString pappso::OboPsiModTerm::m_definition

Definition at line 59 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), pappso::OboTermForm::displayOboTerm(), pappso::MsFileAccessor::getOboPsiModTermFileFormat(), pappso::PwizMsRunReader::getOboPsiModTermNativeIDFormat(), operator=(), and parseLine().

## m_diffFormula

QString pappso::OboPsiModTerm::m_diffFormula

Definition at line 62 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), pappso::AaModification::createInstance(), pappso::AaModification::createInstanceC13N15LabelledAminoAcid(), pappso::OboTermForm::displayOboTerm(), pappso::OboListModel::loadPsiMod(), operator=(), parseLine(), and pappso::ChemicalFormula::setOboPsiModTerm().

## m_diffMono

double pappso::OboPsiModTerm::m_diffMono

Definition at line 66 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), pappso::AaModification::createInstance(), pappso::AaModification::createInstance(), pappso::AaModification::createInstanceC13N15LabelledAminoAcid(), pappso::OboTermForm::displayOboTerm(), pappso::OboListProxyModel::filterAcceptsRow(), pappso::OboListProxyModel::lessThan(), pappso::OboListModel::loadPsiMod(), operator=(), parseLine(), and pappso::FilterOboPsiModTermDiffMono::setOboPsiModTerm().

## m_findExactPsiModLabel

QRegularExpression pappso::OboPsiModTerm::m_findExactPsiModLabel

static private

Definition at line 76 of file obopsimodterm.h.

Referenced by parseLine().

## m_findRelatedPsiMsLabel

QRegularExpression pappso::OboPsiModTerm::m_findRelatedPsiMsLabel

static private

Definition at line 77 of file obopsimodterm.h.

Referenced by parseLine().

## m_firstParse

QRegularExpression pappso::OboPsiModTerm::m_firstParse

static private

Definition at line 75 of file obopsimodterm.h.

Referenced by parseLine().

## m_firstParseUnimod

QRegularExpression pappso::OboPsiModTerm::m_firstParseUnimod

static private

Definition at line 78 of file obopsimodterm.h.

Referenced by parseLine().

## m_formula

QString pappso::OboPsiModTerm::m_formula

Definition at line 63 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), operator=(), parseLine(), and pappso::ChemicalFormula::setOboPsiModTerm().

## m_isA

QStringList pappso::OboPsiModTerm::m_isA

Definition at line 69 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), isA(), operator=(), parseLine(), and pappso::ChemicalFormula::setOboPsiModTerm().

## m_isUnimod

bool pappso::OboPsiModTerm::m_isUnimod = false

private

Definition at line 83 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), isUnimod(), operator=(), parseLine(), and setAccession().

## m_massMono

double pappso::OboPsiModTerm::m_massMono

Definition at line 67 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), operator=(), and parseLine().

## m_name

QString pappso::OboPsiModTerm::m_name

Definition at line 58 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), pappso::AaModification::createInstance(), pappso::AaModification::createInstance(), pappso::AaModification::createInstanceC13N15LabelledAminoAcid(), pappso::OboTermForm::displayOboTerm(), pappso::MsFileAccessor::getOboPsiModTermFileFormat(), pappso::TimsMsRunReaderBase::getOboPsiModTermInstrumentModelName(), pappso::PwizMsRunReader::getOboPsiModTermNativeIDFormat(), pappso::OboListModel::loadPsiMod(), operator=(), parseLine(), pappso::FilterOboPsiModTermName::setOboPsiModTerm(), and pappso::MzIdentMlWriter::writeCvParam().

## m_origin

QString pappso::OboPsiModTerm::m_origin

Definition at line 64 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), pappso::AaModification::createInstance(), pappso::OboTermForm::displayOboTerm(), operator=(), parseLine(), and pappso::ChemicalFormula::setOboPsiModTerm().

## m_parseDefinition

QRegularExpression pappso::OboPsiModTerm::m_parseDefinition

static private

Definition at line 79 of file obopsimodterm.h.

Referenced by parseLine().

## m_psiModLabel

QString pappso::OboPsiModTerm::m_psiModLabel

Definition at line 60 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), clearTerm(), pappso::OboTermForm::displayOboTerm(), operator=(), parseLine(), and pappso::FilterOboPsiModTermLabel::setOboPsiModTerm().

## m_psiMsLabel

QString pappso::OboPsiModTerm::m_psiMsLabel

Definition at line 61 of file obopsimodterm.h.

Referenced by OboPsiModTerm(), operator=(), parseLine(), and pappso::FilterOboPsiModTermLabel::setOboPsiModTerm().

## OboPsiMod

friend pappso::OboPsiModTerm::OboPsiMod

private

Definition at line 35 of file obopsimodterm.h.

## OboPsiMs

friend pappso::OboPsiModTerm::OboPsiMs

private

Definition at line 36 of file obopsimodterm.h.

## OboUnimod

friend pappso::OboPsiModTerm::OboUnimod

private

Definition at line 37 of file obopsimodterm.h.

The documentation for this class was generated from the following files:

- pappsomspp/core/obo/obopsimodterm.h
- pappsomspp/core/obo/obopsimodterm.cpp