| 41 | delete ptr; |
| 42 | } |
| 43 | END_SECTION |
| 44 | |
| 45 | START_SECTION(void load(const String& filename, std::vector<ProteinIdentification>& protein_ids, std::vector<PeptideIdentification>& peptide_ids) ) |
| 46 | { |
| 47 | std::vector<ProteinIdentification> protein_ids; |
| 48 | std::vector<PeptideIdentification> peptide_ids; |
| 49 | std::vector<String> fm{"Carbamidomethyl (C)", "Xlink:DTSSP[88] (Protein N-term)"}; |
| 50 | MzIdentMLFile().load(OPENMS_GET_TEST_DATA_PATH("MzIdentMLFile_msgf_mini.mzid"), protein_ids, peptide_ids); |
| 51 | |
| 52 | TEST_EQUAL(protein_ids.size(),2) |
| 53 | TEST_EQUAL(protein_ids[0].getHits().size(),2) |
| 54 | TEST_EQUAL(protein_ids[1].getHits().size(),1) |
| 55 | TEST_EQUAL(peptide_ids.size(),5) |
| 56 | TEST_EQUAL(peptide_ids[0].getHits().size(),1) |
| 57 | TEST_EQUAL(peptide_ids[1].getHits().size(),1) |
| 58 | TEST_EQUAL(peptide_ids[2].getHits().size(),1) |
| 59 | TEST_EQUAL(peptide_ids[3].getHits().size(),1) |
| 60 | TEST_EQUAL(peptide_ids[4].getHits().size(),1) |
| 61 | |
| 62 | /////////////// protein id 1 ////////////////// |
| 63 | TEST_EQUAL(protein_ids[0].getSearchEngine(),"MS-GF+") |
| 64 | TEST_EQUAL(protein_ids[0].getSearchEngineVersion(),"Beta (v9979)") |
| 65 | TEST_NOT_EQUAL(protein_ids[0].getDateTime().getDate(),"0000-00-00") |
| 66 | TEST_NOT_EQUAL(protein_ids[0].getDateTime().getTime(),"00:00:00") |
| 67 | TEST_EQUAL(protein_ids[0].getSearchParameters().db,"database.fasta") |
| 68 | TEST_EQUAL(protein_ids[0].getSearchParameters().missed_cleavages, 1000) |
| 69 | ABORT_IF(protein_ids[0].getSearchParameters().fixed_modifications.size() != fm.size()) |
| 70 | for (size_t i = 0; i < fm.size(); ++i) |
| 71 | { |
| 72 | TEST_EQUAL(protein_ids[0].getSearchParameters().fixed_modifications[i], fm[i]); |
| 73 | } |
| 74 | TEST_REAL_SIMILAR(protein_ids[0].getSearchParameters().fragment_mass_tolerance,0) |
| 75 | TEST_REAL_SIMILAR(protein_ids[0].getSearchParameters().precursor_mass_tolerance,20) |
| 76 | |
| 77 | //ProteinGroups not nupported yet, also no ProteinDetection, too few input here |
| 78 | // TEST_EQUAL(protein_ids[0].getProteinGroups().size(), 0); |
| 79 | // TEST_EQUAL(protein_ids[0].getIndistinguishableProteins().size(), 0); |
| 80 | |
| 81 | //protein hit 1 |
| 82 | TEST_EQUAL(protein_ids[0].getHits()[0].getAccession(),"sp|P0A9K9|SLYD_ECOLI") |
| 83 | TEST_EQUAL(protein_ids[0].getHits()[0].getSequence(),"") |
| 84 | //protein hit 2 |
| 85 | TEST_EQUAL(protein_ids[0].getHits()[1].getAccession(),"sp|P0A786|PYRB_ECOLI") |
| 86 | TEST_EQUAL(protein_ids[0].getHits()[1].getSequence(),"") |
| 87 | |
| 88 | //peptide id s |
| 89 | TEST_EQUAL(peptide_ids[0].getScoreType(),"MS-GF:RawScore") |
| 90 | TEST_REAL_SIMILAR(peptide_ids[0].getHits()[0].getScore(),195) |
| 91 | TEST_EQUAL(peptide_ids[0].getHits()[0].getSequence().toString(),"LATEFSGNVPVLNAGDGSNQHPTQTLLDLFTIQETQGR") |
| 92 | TEST_EQUAL(peptide_ids[0].getSpectrumReference(),"controllerType=0 controllerNumber=1 scan=32805") |
| 93 | TEST_EQUAL(peptide_ids[1].getScoreType(),"MS-GF:RawScore") |
| 94 | TEST_REAL_SIMILAR(peptide_ids[1].getHits()[0].getScore(),182) |
| 95 | TEST_EQUAL(peptide_ids[1].getHits()[0].getSequence().toString(),"FLAETDQGPVPVEITAVEDDHVVVDGNHMLAGQNLK") |
| 96 | TEST_EQUAL(peptide_ids[1].getSpectrumReference(),"controllerType=0 controllerNumber=1 scan=26090") |
| 97 | TEST_EQUAL(peptide_ids[2].getScoreType(),"MS-GF:RawScore") |
| 98 | TEST_REAL_SIMILAR(peptide_ids[2].getHits()[0].getScore(),191) |
| 99 | TEST_EQUAL(peptide_ids[2].getHits()[0].getSequence().toString(),"FLAETDQGPVPVEITAVEDDHVVVDGNHMLAGQNLK") |
| 100 | TEST_EQUAL(peptide_ids[2].getSpectrumReference(),"controllerType=0 controllerNumber=1 scan=26157") |
nothing calls this directly
no test coverage detected