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\\[\\]$");
61 QRegularExpressionMatch match_line =
m_firstParse.match(line);
62 if(match_line.hasMatch())
64 QStringList pline = match_line.capturedTexts();
71 else if(pline[1] ==
"name")
73 m_name = pline[2].trimmed();
76 else if(pline[1] ==
"xref")
79 QRegularExpressionMatch match_subline =
m_firstParse.match(pline[2]);
80 if(match_subline.hasMatch())
82 QStringList psecond = match_subline.capturedTexts();
83 if(psecond[1] ==
"DiffMono")
85 m_diffMono = psecond[2].replace(
"\"",
"").toDouble();
89 else if(psecond[1] ==
"DiffFormula")
95 else if(psecond[1] ==
"Origin")
98 psecond[2].trimmed().replace(
"\"",
"").replace(
",",
"");
104 else if(pline[1] ==
"synonym")
107 QRegularExpressionMatch match_exact_psimod =
109 if(match_exact_psimod.hasMatch())
112 match_exact_psimod.captured(1).trimmed().replace(
"\"",
"");
118 QRegularExpressionMatch match_related_psims =
120 if(match_related_psims.hasMatch())
123 match_related_psims.captured(1).trimmed().replace(
"\"",
"");
129 else if(pline[1] ==
"def")
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