| 62 | std::map<String, std::vector<const ReactionMonitoringTransition *> > peptide_transition_map; |
| 63 | |
| 64 | void write_out_header(std::ostream &os, FeatureMap &feature_map, /* String main_var_name, */ std::vector<String> &meta_value_names, bool short_format) |
| 65 | { |
| 66 | std::vector<String> meta_value_names_tmp; |
| 67 | |
| 68 | os << "transition_group_id" << "\t" |
| 69 | << "run_id" << "\t" |
| 70 | << "filename" << "\t" |
| 71 | << "RT" << "\t" |
| 72 | << "id" << "\t" |
| 73 | << "Sequence" << "\t" |
| 74 | << "FullPeptideName" << "\t" |
| 75 | << "Charge" << "\t" |
| 76 | << "m/z" << "\t" |
| 77 | << "Intensity" << "\t" |
| 78 | << "ProteinName" << "\t" |
| 79 | << "decoy" << "\t"; |
| 80 | |
| 81 | // get all meta values from the first feature |
| 82 | feature_map[0].getKeys(meta_value_names_tmp); |
| 83 | for (Size i = 0; i < meta_value_names_tmp.size(); i++) |
| 84 | { |
| 85 | if (meta_value_names_tmp[i] != "PeptideRef" && meta_value_names_tmp[i] != "PrecursorMZ") |
| 86 | { |
| 87 | meta_value_names.push_back(meta_value_names_tmp[i]); |
| 88 | } |
| 89 | } |
| 90 | std::sort(meta_value_names.begin(), meta_value_names.end()); |
| 91 | for (Size i = 0; i < meta_value_names.size(); i++) |
| 92 | { |
| 93 | os << meta_value_names[i] << "\t"; |
| 94 | } |
| 95 | |
| 96 | if (!short_format) |
| 97 | { |
| 98 | os << "Peak_Area" << "\t"; |
| 99 | os << "Peak_Apex" << "\t"; |
| 100 | os << "Fragment_Annotation" << "\t"; |
| 101 | os << "ProductMZ"; |
| 102 | } |
| 103 | else |
| 104 | { |
| 105 | os << "aggr_Peak_Area" << "\t"; |
| 106 | os << "aggr_Peak_Apex" << "\t"; |
| 107 | os << "aggr_Fragment_Annotation"; |
| 108 | } |
| 109 | os << std::endl; |
| 110 | } |
| 111 | |
| 112 | void write_out_body_(std::ostream &os, Feature *feature_it, TargetedExperiment &transition_exp, |
| 113 | std::vector<String> &meta_value_names, int run_id, bool short_format, String identifier, String filename) |