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

Method setPresenceAndScanEventNumber_

src/openms/source/QC/Ms2SpectrumStats.cpp:71–90  ·  view source on GitHub ↗

marks all seen (unassigned-)PeptideIdentifications in vector ms2_included

Source from the content-addressed store, hash-verified

69
70 // marks all seen (unassigned-)PeptideIdentifications in vector ms2_included
71 void Ms2SpectrumStats::setPresenceAndScanEventNumber_(PeptideIdentification& peptide_ID, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum)
72 {
73 if (!peptide_ID.metaValueExists("spectrum_reference"))
74 {
75 throw Exception::InvalidParameter(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "No spectrum reference annotated at peptide identification!");
76 }
77
78 UInt64 index = map_to_spectrum.at(peptide_ID.getSpectrumReference());
79 const MSSpectrum& spectrum = exp[index];
80
81 if (spectrum.getMSLevel() == 2)
82 {
83 ms2_included_[index].ms2_presence = true;
84 peptide_ID.setMetaValue("ScanEventNumber", ms2_included_[index].scan_event_number);
85 peptide_ID.setMetaValue("identified", 1);
86 peptide_ID.setMetaValue("total_ion_count", spectrum.calculateTIC());
87 peptide_ID.setMetaValue("base_peak_intensity", getBPI_(spectrum));
88 annotatePepIDfromSpectrum_(spectrum, peptide_ID); // ion_injection_time and activation_method
89 }
90 }
91
92 std::vector<PeptideIdentification> Ms2SpectrumStats::getUnassignedPeptideIdentifications_(const MSExperiment& exp)
93 {

Callers

nothing calls this directly

Calls 7

metaValueExistsMethod · 0.80
atMethod · 0.80
getSpectrumReferenceMethod · 0.80
getMSLevelMethod · 0.80
setMetaValueMethod · 0.45
calculateTICMethod · 0.45

Tested by

no test coverage detected