49  int matched_length_cumul = 0;
 
   52  QRegularExpressionMatch match_mod = 
_mod_parser.match(pepstr, pos);
 
   54  while(match_mod.hasMatch())
 
   56      pos              = match_mod.capturedStart(0);
 
   57      QString captured = match_mod.captured(0);
 
   58      qDebug() << 
" captured=" << captured << 
" pos=" << pos
 
   59               << 
" match_mod.lastCapturedIndex()=" << match_mod.lastCapturedIndex();
 
   60      QStringList mod_list =
 
   61        captured.mid(1, captured.size() - 2).split(QRegularExpression(
"[+,\\,]"));
 
   62      for(QString &mod : mod_list)
 
   64          qDebug() << 
"PeptideStrParser::parseString mod " << mod;
 
   65          QRegularExpressionMatch match_psimod = 
_rx_psimod.match(mod);
 
   66          if(match_psimod.hasMatch())
 
   68              qDebug() << 
"PeptideStrParser::parseString pos-1 " 
   69                       << (pos - 1 - matched_length_cumul);
 
   71                                        pos - 1 - matched_length_cumul);
 
   73          else if(mod.startsWith(
"internal:Nter_"))
 
   77          else if(mod.startsWith(
"internal:Cter_"))
 
   81          else if(mod.startsWith(
"C13N15:"))
 
   83              qDebug() << 
"PeptideStrParser::parseString pos-1 " 
   84                       << (pos - 1 - matched_length_cumul);
 
   86                                        pos - 1 - matched_length_cumul);
 
   90              qDebug() << 
"mod=" << mod;
 
   91              QRegularExpressionMatch match_modmass = 
_rx_modmass.match(mod);
 
   92              if(match_modmass.hasMatch())
 
   95                  qDebug() << 
"number mod=" << mod << 
" cap=" << match_modmass.captured(0);
 
   96                  if(!mod.contains(
"."))
 
   99                      qDebug() << 
"integer mod=" << mod;
 
  100                      mod = 
"MOD:0000" + mod;
 
  101                      while(mod.size() > 9)
 
  103                          mod = mod.replace(4, 1, 
"");
 
  106                                                pos - 1 - matched_length_cumul);
 
  110                      qDebug() << 
"double mod=" << mod;
 
  113                        pos - 1 - matched_length_cumul);
 
  118                  qDebug() << 
"not a number mod=" << mod;
 
  125                                            pos - 1 - matched_length_cumul);
 
  130      matched_length_cumul += captured.size();