MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / getScanIdentifier_

Method getScanIdentifier_

src/topp/MaRaClusterAdapter.cpp:211–230  ·  view source on GitHub ↗

replace with PercolatorAdapter function

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 6

getSpectrumReferenceMethod · 0.80
metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
StringClass · 0.50
emptyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected