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

Method addMetaDataMetricsToMzTab

src/openms/source/QC/TIC.cpp:81–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void TIC::addMetaDataMetricsToMzTab(OpenMS::MzTabMetaData& meta, vector<TIC::Result>& tics)
82 {
83 // Adding TIC information to meta data
84 for (Size i = 0; i < tics.size(); ++i)
85 {
86 if (tics[i].intensities.empty())
87 {
88 continue; // no MS1 spectra
89 }
90 MzTabParameter tic {};
91 tic.setCVLabel("total ion current");
92 tic.setAccession("MS:1000285");
93 tic.setName("TIC_" + String(i + 1));
94 String value("[");
95 value += String(tics[i].retention_times[0], false) + ", " + String((UInt64)tics[i].intensities[0]);
96 for (Size j = 1; j < tics[i].intensities.size(); ++j)
97 {
98 value += ", " + String(tics[i].retention_times[j], false) + ", " + String((UInt64)tics[i].intensities[j]);
99 }
100 value += "]";
101 tic.setValue(value);
102 meta.custom[meta.custom.size()] = tic;
103 }
104 }
105} // namespace OpenMS

Callers 1

main_Method · 0.45

Calls 7

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

Tested by

no test coverage detected