27 #include "../pappsoexception.h"
30 qRegisterMetaType<pappso::OboPsiModTerm>(
"pappso::OboPsiModTerm");
35 Q_INIT_RESOURCE(libpappsomsppresources);
44 "^(.*)\\sEXACT\\sPSI-MOD-label\\s\\[\\]$");
48 "^(.*)\\sRELATED\\sPSI-MS-label\\s\\[\\]$");
98 QRegularExpressionMatch match_line =
m_firstParse.match(line);
99 if(match_line.hasMatch())
101 QStringList pline = match_line.capturedTexts();
108 else if(pline[1] ==
"name")
110 m_name = pline[2].trimmed();
113 else if(pline[1] ==
"xref")
116 QRegularExpressionMatch match_subline =
m_firstParse.match(pline[2]);
117 if(match_subline.hasMatch())
119 QStringList psecond = match_subline.capturedTexts();
120 if(psecond[1] ==
"DiffMono")
122 m_diffMono = psecond[2].replace(
"\"",
"").toDouble();
126 else if(psecond[1] ==
"DiffFormula")
132 else if(psecond[1] ==
"Origin")
135 psecond[2].trimmed().replace(
"\"",
"").replace(
",",
"");
141 else if(pline[1] ==
"synonym")
144 QRegularExpressionMatch match_exact_psimod =
146 if(match_exact_psimod.hasMatch())
149 match_exact_psimod.captured(1).trimmed().replace(
"\"",
"");
155 QRegularExpressionMatch match_related_psims =
157 if(match_related_psims.hasMatch())
160 match_related_psims.captured(1).trimmed().replace(
"\"",
"");
166 else if(pline[1] ==
"def")
OboPsiModTerm & operator=(const OboPsiModTerm &)
static QRegularExpression m_firstParse
void parseLine(const QString &line)
static QRegularExpression m_findRelatedPsiMsLabel
static QRegularExpression m_findExactPsiModLabel
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
int oboPsiModTermMetaTypeId