static method remapping the target/decoy column from an opt_ to a standardized column
| 298 | |
| 299 | // static method remapping the target/decoy column from an opt_ to a standardized column |
| 300 | static void remapTargetDecoyPSMAndPeptideSection_(std::vector<MzTabOptionalColumnEntry>& opt_entries) |
| 301 | { |
| 302 | const String old_header("opt_global_target_decoy"); |
| 303 | const String new_header("opt_global_cv_MS:1002217_decoy_peptide"); // for PRIDE |
| 304 | for (auto &opt_entry : opt_entries) |
| 305 | { |
| 306 | if (opt_entry.first == old_header || opt_entry.first == new_header) |
| 307 | { |
| 308 | opt_entry.first = new_header; |
| 309 | const String ¤t_value = opt_entry.second.get(); |
| 310 | if (current_value == "target" || current_value == "target+decoy") |
| 311 | { |
| 312 | opt_entry.second = MzTabString("0"); |
| 313 | } |
| 314 | else if (current_value == "decoy") |
| 315 | { |
| 316 | opt_entry.second = MzTabString("1"); |
| 317 | } |
| 318 | } |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | // static method remapping the target/decoy column from an opt_ to a standardized column |
| 323 | static void remapTargetDecoyProteinSection_(std::vector<MzTabOptionalColumnEntry>& opt_entries) |
no test coverage detected