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

Method addMetaDataMetricsToMzTab

src/openms/source/QC/Ms2IdentificationRate.cpp:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 void Ms2IdentificationRate::addMetaDataMetricsToMzTab(MzTabMetaData& meta) const
74 {
75 // Adding MS2_ID_Rate to meta data
76 const auto& ms2_irs = this->getResults();
77 for (Size i = 0; i < ms2_irs.size(); ++i)
78 {
79 MzTabParameter ms2_ir {};
80 ms2_ir.setCVLabel("MS2 identification rate");
81 ms2_ir.setAccession("null");
82 ms2_ir.setName("MS2_ID_Rate_" + String(i + 1));
83 ms2_ir.setValue(String(100 * ms2_irs[i].identification_rate));
84 meta.custom[meta.custom.size()] = ms2_ir;
85 }
86 }
87 Size Ms2IdentificationRate::getMS2Count_(const MSExperiment& exp)
88 {
89 if (exp.empty())

Callers

nothing calls this directly

Calls 7

setCVLabelMethod · 0.80
StringClass · 0.50
getResultsMethod · 0.45
sizeMethod · 0.45
setAccessionMethod · 0.45
setNameMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected