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

Function START_SECTION

src/tests/class_tests/openms/source/OMSFile_test.cpp:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34IdentificationData ids;
35
36START_SECTION(void store(const String& filename, const IdentificationData& id_data))
37{
38 vector<ProteinIdentification> proteins_in;
39 vector<PeptideIdentification> peptides_in;
40 IdXMLFile().load(OPENMS_GET_TEST_DATA_PATH("IdXMLFile_whole.idXML"), proteins_in, peptides_in);
41 // IdentificationData doesn't allow score types with the same name, but different orientations:
42 peptides_in[0].setHigherScoreBetter(true);
43
44 IdentificationDataConverter::importIDs(ids, proteins_in, peptides_in);
45 // add an adduct (not supported by idXML):
46 AdductInfo adduct("Cl-", EmpiricalFormula("Cl"), -1);
47 auto adduct_ref = ids.registerAdduct(adduct);
48 IdentificationData::ObservationMatch match = *ids.getObservationMatches().begin();
49 match.adduct_opt = adduct_ref;
50 ids.registerObservationMatch(match);
51
52 NEW_TMP_FILE(oms_tmp);
53 OMSFile().store(oms_tmp, ids);
54 TEST_EQUAL(File::empty(oms_tmp), false);
55}
56END_SECTION
57
58START_SECTION(void load(const String& filename, IdentificationData& id_data))

Callers

nothing calls this directly

Calls 15

TEST_EQUALFunction · 0.85
registerAdductMethod · 0.80
getScoreTypeMethod · 0.80
atMethod · 0.80
setAcceptableRelativeMethod · 0.80
setAcceptableAbsoluteMethod · 0.80
setWhitelistMethod · 0.80
compareFilesMethod · 0.80
getFeaturesMethod · 0.80
EmpiricalFormulaFunction · 0.50
emptyFunction · 0.50

Tested by

no test coverage detected