| 34 | IdentificationData ids; |
| 35 | |
| 36 | START_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 | } |
| 56 | END_SECTION |
| 57 | |
| 58 | START_SECTION(void load(const String& filename, IdentificationData& id_data)) |
nothing calls this directly
no test coverage detected