| 3080 | } |
| 3081 | |
| 3082 | MzTab MzTab::exportConsensusMapToMzTab( |
| 3083 | const ConsensusMap& consensus_map, |
| 3084 | const String& filename, |
| 3085 | const bool first_run_inference_only, |
| 3086 | const bool export_unidentified_features, |
| 3087 | const bool export_unassigned_ids, |
| 3088 | const bool export_subfeatures, |
| 3089 | const bool export_empty_pep_ids, |
| 3090 | const bool export_all_psms, |
| 3091 | const String& title) |
| 3092 | { |
| 3093 | OPENMS_LOG_INFO << "exporting consensus map: \"" << filename << "\" to mzTab: " << std::endl; |
| 3094 | |
| 3095 | CMMzTabStream s(consensus_map, |
| 3096 | filename, |
| 3097 | first_run_inference_only, |
| 3098 | export_unidentified_features, |
| 3099 | export_unassigned_ids, |
| 3100 | export_subfeatures, |
| 3101 | export_empty_pep_ids, |
| 3102 | export_all_psms, |
| 3103 | title); |
| 3104 | |
| 3105 | MzTab m; |
| 3106 | m.setMetaData(s.getMetaData()); |
| 3107 | |
| 3108 | MzTabProteinSectionRow prot_row; |
| 3109 | while (s.nextPRTRow(prot_row)) |
| 3110 | { |
| 3111 | m.getProteinSectionRows().emplace_back(std::move(prot_row)); |
| 3112 | } |
| 3113 | |
| 3114 | MzTabPeptideSectionRow pep_row; |
| 3115 | while (s.nextPEPRow(pep_row)) |
| 3116 | { |
| 3117 | m.getPeptideSectionRows().emplace_back(std::move(pep_row)); |
| 3118 | } |
| 3119 | |
| 3120 | MzTabPSMSectionRow psm_row; |
| 3121 | while (s.nextPSMRow(psm_row)) |
| 3122 | { |
| 3123 | // TODO better return a State enum instead of relying on some uninitialized |
| 3124 | // parts of a row.. |
| 3125 | if (!psm_row.sequence.isNull()) |
| 3126 | { |
| 3127 | m.getPSMSectionRows().push_back(psm_row); |
| 3128 | } |
| 3129 | } |
| 3130 | |
| 3131 | return m; |
| 3132 | } |
| 3133 | |
| 3134 | void MzTab::checkSequenceUniqueness_(const vector<PeptideIdentification>& curr_pep_ids) |
| 3135 | { |
nothing calls this directly
no test coverage detected