| 1971 | } |
| 1972 | |
| 1973 | bool PepXMLFile::lookupAddFromHeader_(double modification_mass, |
| 1974 | Size modification_position, |
| 1975 | vector<AminoAcidModification> const& header_mods) |
| 1976 | { |
| 1977 | bool found = false; |
| 1978 | for (const auto& m : header_mods) |
| 1979 | { |
| 1980 | //TODO do we really want to allow another tolerance to the masses in the header? |
| 1981 | if (fabs(modification_mass - m.getMass()) < mod_tol_) |
| 1982 | { |
| 1983 | if (m.getAminoAcid().hasSubstring(current_sequence_[modification_position])) |
| 1984 | { |
| 1985 | current_modifications_ |
| 1986 | .emplace_back(m.getRegisteredMod(), modification_position); // position not needed for terminus |
| 1987 | found = true; |
| 1988 | break; // only one modification should match, so we can stop the loop here |
| 1989 | } |
| 1990 | } |
| 1991 | } |
| 1992 | return found; |
| 1993 | } |
| 1994 | |
| 1995 | void PepXMLFile::endElement(const XMLCh* const /*uri*/, |
| 1996 | const XMLCh* const /*local_name*/, |
nothing calls this directly
no test coverage detected