| 2260 | } |
| 2261 | |
| 2262 | bool MzTab::IDMzTabStream::nextPSMRow(MzTabPSMSectionRow& row) |
| 2263 | { |
| 2264 | if (pep_id_ >= peptide_ids_.size()) |
| 2265 | { |
| 2266 | return false; |
| 2267 | } |
| 2268 | const PeptideIdentification* pid = peptide_ids_[pep_id_]; |
| 2269 | |
| 2270 | auto psm_row = MzTab::PSMSectionRowFromPeptideID_( |
| 2271 | *pid, |
| 2272 | prot_ids_, |
| 2273 | idrunid_2_idrunindex_, |
| 2274 | map_id_run_fileidx_2_msfileidx_, |
| 2275 | run_to_search_engines_, |
| 2276 | current_psm_idx_, |
| 2277 | psm_id_, |
| 2278 | db_, |
| 2279 | db_version_, |
| 2280 | export_empty_pep_ids_, |
| 2281 | export_all_psms_); |
| 2282 | |
| 2283 | if (!export_all_psms_ || current_psm_idx_ == pid->getHits().size()-1) |
| 2284 | { |
| 2285 | ++pep_id_; |
| 2286 | current_psm_idx_ = 0; |
| 2287 | } |
| 2288 | else |
| 2289 | { |
| 2290 | ++current_psm_idx_; |
| 2291 | } |
| 2292 | ++psm_id_; //global psm id "counter" |
| 2293 | |
| 2294 | if (psm_row) // valid row? |
| 2295 | { |
| 2296 | row = *psm_row; |
| 2297 | } |
| 2298 | else |
| 2299 | { |
| 2300 | row = MzTabPSMSectionRow(); |
| 2301 | } |
| 2302 | return true; |
| 2303 | } |
| 2304 | |
| 2305 | MzTab MzTab::exportIdentificationsToMzTab( |
| 2306 | const vector<ProteinIdentification>& prot_ids, |
no test coverage detected