set modifications changed by LuciPHOr2
| 385 | |
| 386 | // set modifications changed by LuciPHOr2 |
| 387 | ExitCodes setLuciphorTargetMods_(AASequence& seq, String seq_luciphor, const map<String, String>& target_mods_conv) |
| 388 | { |
| 389 | for (Size i = 0; i < seq_luciphor.length(); ++i) |
| 390 | { |
| 391 | char aa = seq_luciphor[i]; |
| 392 | if (std::islower(aa)) |
| 393 | { |
| 394 | map<String, String>::const_iterator iter = target_mods_conv.find(String(aa).toUpper()); |
| 395 | if (iter != target_mods_conv.end()) |
| 396 | { |
| 397 | if (seq.getResidue(i).isModified()) |
| 398 | { |
| 399 | writeLogError_("Error: ambiguous modifications on AA '" + iter->first + "' (" + seq.getResidue(i).getModificationName() + ", " + iter->second + ")"); |
| 400 | return PARSE_ERROR; |
| 401 | } |
| 402 | else |
| 403 | { |
| 404 | seq.setModification(i, iter->second); |
| 405 | } |
| 406 | } |
| 407 | } |
| 408 | } |
| 409 | return EXECUTION_OK; |
| 410 | } |
| 411 | |
| 412 | void addScoreToMetaValues_(PeptideHit& hit, const String score_type) |
| 413 | { |
nothing calls this directly
no test coverage detected