| 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 | { |
nothing calls this directly
no test coverage detected