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

Method store

src/openms/source/FORMAT/AbsoluteQuantitationMethodFile.cpp:108–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 void AbsoluteQuantitationMethodFile::store(
109 const String& filename,
110 const std::vector<AbsoluteQuantitationMethod>& aqm_list
111 )
112 {
113 clear(); // clear the buffer_
114 const String headers = "IS_name,component_name,feature_name,concentration_units,llod,ulod,lloq,uloq,correlation_coefficient,n_points,transformation_model";
115 StringList split_headers;
116 headers.split(',', split_headers);
117 StringList tm_params_names; // transformation model params
118 if (!aqm_list.empty())
119 {
120 const Param tm_params = aqm_list[0].getTransformationModelParams();
121 for (const Param::ParamEntry& param : tm_params)
122 {
123 tm_params_names.insert(tm_params_names.begin(), param.name);
124 split_headers.insert(split_headers.begin() + 11, "transformation_model_param_" + param.name);
125 }
126 }
127 addRow(split_headers);
128 for (const AbsoluteQuantitationMethod& aqm : aqm_list)
129 {
130 StringList row(split_headers.size());
131 row[0] = aqm.getISName();
132 row[1] = aqm.getComponentName();
133 row[2] = aqm.getFeatureName();
134 row[3] = aqm.getConcentrationUnits();
135 row[4] = aqm.getLLOD();
136 row[5] = aqm.getULOD();
137 row[6] = aqm.getLLOQ();
138 row[7] = aqm.getULOQ();
139 row[8] = aqm.getCorrelationCoefficient();
140 row[9] = aqm.getNPoints();
141 row[10] = aqm.getTransformationModel();
142 const Param tm_params = aqm.getTransformationModelParams();
143 for (Size i = 0, j = 11; i < tm_params_names.size(); ++i, ++j)
144 {
145 row[j] = tm_params.exists(tm_params_names[i]) ? tm_params.getValue(tm_params_names[i]).toString() : "";
146 }
147 addRow(row);
148 }
149 CsvFile::store(filename);
150 }
151
152 void AbsoluteQuantitationMethodFile::setCastValue_(const String& key, const String& value, Param& params) const
153 {

Callers

nothing calls this directly

Calls 15

getISNameMethod · 0.80
getComponentNameMethod · 0.80
getFeatureNameMethod · 0.80
getConcentrationUnitsMethod · 0.80
getLLODMethod · 0.80
getULODMethod · 0.80
getLLOQMethod · 0.80
getULOQMethod · 0.80
getNPointsMethod · 0.80

Tested by

no test coverage detected