replace with PercolatorAdapter function
| 209 | |
| 210 | // replace with PercolatorAdapter function |
| 211 | String getScanIdentifier_(vector<PeptideIdentification>::iterator it, vector<PeptideIdentification>::iterator start) |
| 212 | { |
| 213 | // MSGF+ uses this field, is empty if not specified |
| 214 | String scan_identifier = it->getSpectrumReference(); |
| 215 | if (scan_identifier.empty()) |
| 216 | { |
| 217 | // XTandem uses this (integer) field |
| 218 | // these ids are 1-based in contrast to the index which is 0-based. This might be problematic to use for merging |
| 219 | if (it->metaValueExists("spectrum_id") && !it->getMetaValue("spectrum_id").toString().empty()) |
| 220 | { |
| 221 | scan_identifier = "scan=" + it->getMetaValue("spectrum_id").toString(); |
| 222 | } |
| 223 | else |
| 224 | { |
| 225 | scan_identifier = "index=" + String(it - start + 1); |
| 226 | OPENMS_LOG_WARN << "no known spectrum identifiers, using index [1,n] - use at own risk." << endl; |
| 227 | } |
| 228 | } |
| 229 | return scan_identifier.removeWhitespaces(); |
| 230 | } |
| 231 | |
| 232 | // replace with PercolatorAdapter function |
| 233 | Int getScanNumber_(String scan_identifier) |
nothing calls this directly
no test coverage detected