MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / removeMetaValue

Method removeMetaValue

src/openms/source/METADATA/ID/IdentificationData.cpp:1344–1356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1342
1343
1344 void IdentificationData::removeMetaValue(const ObservationMatchRef ref, const String& key)
1345 {
1346 if (!no_checks_ && ((observation_match_lookup_.empty() && !isValidReference_(ref, observation_matches_)) ||
1347 (!observation_match_lookup_.empty() && !isValidHashedReference_(ref, observation_match_lookup_))))
1348 {
1349 String msg = "invalid reference to an observation match";
1350 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, msg);
1351 }
1352 observation_matches_.modify(ref, [&key](ObservationMatch& element)
1353 {
1354 element.removeMetaValue(key);
1355 });
1356 }
1357
1358
1359 IdentificationData::IdentifiedMolecule IdentificationData::RefTranslator::translate(IdentifiedMolecule old) const

Callers 5

importIDsMethod · 0.45
importFeatureIDsMethod · 0.45
exportFeatureIDsMethod · 0.45
importConsensusIDsMethod · 0.45
exportConsensusIDsMethod · 0.45

Calls 3

isValidReference_Function · 0.85
isValidHashedReference_Function · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected