45 #include <boost/optional.hpp>
52 #pragma clang diagnostic push
53 #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
82 void set(
const double& value);
121 std::vector<MzTabDouble>
get()
const;
123 void set(
const std::vector<MzTabDouble>& entries);
176 std::vector<MzTabInteger>
get()
const;
178 void set(
const std::vector<MzTabInteger>& entries);
196 void set(
const bool& value);
283 std::vector<MzTabParameter>
get()
const;
285 void set(
const std::vector<MzTabParameter>& parameters);
308 std::vector<MzTabString>
get()
const;
310 void set(
const std::vector<MzTabString>& entries);
357 std::vector<MzTabModification>
get()
const;
359 void set(
const std::vector<MzTabModification>& entries);
501 std::map<Size, MzTabString>
uri;
513 std::map<Size, MzTabMSRunMetaData>
ms_run;
517 std::map<Size, MzTabSampleMetaData>
sample;
519 std::map<Size, MzTabAssayMetaData>
assay;
523 std::map<Size, MzTabCVMetaData>
cv;
559 std::vector<MzTabOptionalColumnEntry>
opt_;
595 std::vector<MzTabOptionalColumnEntry>
opt_;
633 std::vector<MzTabOptionalColumnEntry>
opt_;
688 std::vector<MzTabOptionalColumnEntry>
opt_;
713 std::vector<MzTabOptionalColumnEntry>
opt_;
744 std::vector<MzTabOptionalColumnEntry>
opt_;
775 std::vector<MzTabOptionalColumnEntry>
opt_;
907 const std::vector<ProteinIdentification>& prot_ids,
908 const std::vector<PeptideIdentification>& peptide_ids,
910 bool first_run_inference_only,
911 bool export_empty_pep_ids =
false,
912 bool export_all_psms =
false,
913 const String& title =
"ID export from OpenMS");
937 const bool first_run_inference_only,
938 const bool export_unidentified_features,
939 const bool export_unassigned_ids,
940 const bool export_subfeatures,
941 const bool export_empty_pep_ids =
false,
942 const bool export_all_psms =
false,
943 const String& title =
"ConsensusMap export from OpenMS");
949 const std::vector<const ProteinIdentification*>& prot_ids,
950 const std::vector<const PeptideIdentification*>& peptide_ids,
952 bool first_run_inference_only,
953 bool export_empty_pep_ids =
false,
954 bool export_all_psms =
false,
955 const String& title =
"ID export from OpenMS");
992 size_t quant_study_variables_ = 0;
994 size_t PRT_STATE_ = 0;
995 size_t prt_run_id_ = 0;
996 size_t prt_hit_id_ = 0;
997 size_t prt_group_id_ = 0;
998 size_t prt_indistgroup_id_ = 0;
1001 size_t current_psm_idx_ = 0;
1017 const bool first_run_inference_only,
1018 const bool export_unidentified_features,
1019 const bool export_unassigned_ids,
1020 const bool export_subfeatures,
1021 const bool export_empty_pep_ids =
false,
1022 const bool export_all_psms =
false,
1023 const String& title =
"ConsensusMap export from OpenMS");
1061 size_t quant_study_variables_ = 0;
1062 size_t n_study_variables_ = 0;
1063 size_t PRT_STATE_ = 0;
1064 size_t prt_run_id_ = 0;
1065 size_t prt_hit_id_ = 0;
1066 size_t prt_group_id_ = 0;
1067 size_t prt_indistgroup_id_ = 0;
1069 size_t pep_counter_ = 0;
1071 size_t current_psm_idx_ = 0;
1089 std::vector<ProteinIdentification const*>
const& prot_id,
1090 std::map<String, size_t>& idrun_2_run_index,
1091 std::map<std::pair<size_t, size_t>,
size_t>& map_run_fileidx_2_msfileidx,
1092 std::map<
Size, std::vector<std::pair<String, String>>>& run_to_search_engines,
1093 Size const current_psm_idx,
1097 bool const export_empty_pep_ids,
1098 bool const export_all_psms);
1104 const Size n_study_variables,
1105 const std::set<String>& consensus_feature_user_value_keys,
1106 const std::set<String>& peptide_hit_user_value_keys,
1107 const std::map<String, size_t>& idrun_2_run_index,
1108 const std::map<std::pair<size_t,size_t>,
size_t>& map_run_fileidx_2_msfileidx,
1109 const std::map< std::pair< String, unsigned >,
unsigned>& path_label_to_assay,
1110 const std::vector<String>& fixed_mods,
1111 bool export_subfeatures);
1115 const std::set<String>& feature_user_value_keys,
1116 const std::set<String>& peptide_hit_user_value_keys,
1117 const std::vector<String>& fixed_mods);
1123 const std::set<String>& protein_hit_user_value_keys);
1131 const std::vector<ProteinHit>& protein_hits,
1134 const std::map<
Size, std::set<Size>>& ind2prot,
1139 const std::map<size_t, String>& msrunindex_2_msfilename,
1143 const std::vector<const ProteinIdentification*>& prot_ids,
1145 std::map<String, size_t>& msfilename_2_msrunindex,
1146 std::map<size_t, String>& msrunindex_2_msfilename);
1158 const std::vector<const ProteinIdentification*>& prot_ids,
1159 std::vector<const PeptideIdentification*>& peptide_ids_,
1160 std::set<String>& protein_hit_user_value_keys,
1161 std::set<String>& peptide_id_user_value_keys,
1162 std::set<String>& peptide_hit_user_value_keys);
1165 template <
class ForwardIterator>
1170 first->substitute(
' ',
'_');
1177 std::set<String> tmp_keys;
1178 auto first = keys.begin();
1179 while (first != keys.end())
1183 tmp_keys.insert(std::move(s));
1186 std::swap(keys, tmp_keys);
1193 const std::vector<const ProteinIdentification*>& prot_ids,
1194 const std::vector<const PeptideIdentification*>& pep_ids,
1195 bool skip_first_run,
1196 std::map<std::tuple<String, String, String>, std::set<Size>>& search_engine_to_runs,
1197 std::map<
Size, std::vector<std::pair<String, String>>>& run_to_search_engines,
1198 std::map<
Size, std::vector<std::vector<std::pair<String, String>>>>& run_to_search_engines_settings,
1199 std::map<
String, std::vector<std::pair<String, String>>>& search_engine_to_settings);
1202 const std::vector<ProteinIdentification::ProteinGroup>& groups,
1203 const std::vector<ProteinHit>& proteins);
1206 const std::vector<const ProteinIdentification*>& prot_ids,
1207 const std::map<std::tuple<String, String, String>, std::set<Size>>& search_engine_to_runs,
1208 const std::map<
String, std::vector<std::pair<String,String>>>& search_engine_to_settings,
1210 bool first_run_inference_only);
1213 const std::vector<const ProteinIdentification*>& prot_ids,
1214 const std::map<String, size_t>& msfilename_2_msrunindex,
1215 bool skip_first_run,
1216 std::map<std::pair<size_t, size_t>,
size_t>& map_run_fileidx_2_msfileidx);
1219 template <
typename SectionRows>
1223 std::vector<String> names;
1226 for (
typename SectionRows::const_iterator it = rows.begin(); it != rows.end(); ++it)
1228 for (
auto it_opt = it->opt_.cbegin(); it_opt != it->opt_.cend(); ++it_opt)
1230 if (
std::find(names.begin(), names.end(), it_opt->first) == names.end())
1232 names.push_back(it_opt->first);
1241 const std::vector<const ProteinIdentification*>& prot_ids,
1266 #pragma clang diagnostic pop
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:71
A container for consensus elements.
Definition: ConsensusMap.h:88
A container for features.
Definition: FeatureMap.h:105
An LC-MS feature.
Definition: Feature.h:72
String toCellString() const
void fromCellString(const String &s)
void set(const bool &value)
int value_
Definition: MzTab.h:206
std::vector< MzTabDouble > entries_
Definition: MzTab.h:127
String toCellString() const
void fromCellString(const String &s)
MzTabDoubleList()=default
std::vector< MzTabDouble > get() const
void set(const std::vector< MzTabDouble > &entries)
~MzTabDoubleList()=default
MzTabCellStateType state_
Definition: MzTab.h:105
double value_
Definition: MzTab.h:104
String toCellString() const
void fromCellString(const String &s)
MzTabDouble(const double v)
void set(const double &value)
void set(const std::vector< MzTabInteger > &entries)
String toCellString() const
void fromCellString(const String &s)
std::vector< MzTabInteger > get() const
~MzTabIntegerList()=default
std::vector< MzTabInteger > entries_
Definition: MzTab.h:182
MzTabIntegerList()=default
MzTabCellStateType state_
Definition: MzTab.h:160
Int value_
Definition: MzTab.h:159
String toCellString() const
void fromCellString(const String &s)
MzTabInteger(const int v)
void set(const Int &value)
void set(const std::vector< MzTabModification > &entries)
std::vector< MzTabModification > get() const
String toCellString() const
void fromCellString(const String &s)
~MzTabModificationList()=default
std::vector< MzTabModification > entries_
Definition: MzTab.h:363
MzTabString getModOrSubstIdentifier() const
String toCellString() const
void fromCellString(const String &s)
MzTabString mod_identifier_
Definition: MzTab.h:343
void setPositionsAndParameters(const std::vector< std::pair< Size, MzTabParameter > > &ppp)
set (potentially ambiguous) position(s) with associated parameter (might be null if not set)
std::vector< std::pair< Size, MzTabParameter > > pos_param_pairs_
Definition: MzTab.h:342
std::vector< std::pair< Size, MzTabParameter > > getPositionsAndParameters() const
~MzTabModification()=default
void setModificationIdentifier(const MzTabString &mod_id)
void set(const std::vector< MzTabParameter > ¶meters)
MzTabParameterList()=default
String toCellString() const
void fromCellString(const String &s)
~MzTabParameterList()=default
std::vector< MzTabParameter > parameters_
Definition: MzTab.h:289
std::vector< MzTabParameter > get() const
String CV_label_
Definition: MzTab.h:264
~MzTabParameter()=default
String name_
Definition: MzTab.h:266
String toCellString() const
void fromCellString(const String &s)
String getCVLabel() const
void setName(const String &name)
void setCVLabel(const String &CV_label)
String getAccession() const
String accession_
Definition: MzTab.h:265
String value_
Definition: MzTab.h:267
void setAccession(const String &accession)
void setValue(const String &value)
void setMSFile(Size index)
~MzTabSpectraRef()=default
String getSpecRef() const
String spec_ref_
Definition: MzTab.h:392
String toCellString() const
void fromCellString(const String &s)
Size ms_run_
Definition: MzTab.h:391
void setSpecRefFile(const String &spec_ref)
void setSpecRef(const String &spec_ref)
~MzTabStringList()=default
std::vector< MzTabString > get() const
String toCellString() const
void setSeparator(char sep)
needed for e.g. ambiguity_members and GO accessions as these use ',' as separator while the others us...
void fromCellString(const String &s)
char sep_
Definition: MzTab.h:315
std::vector< MzTabString > entries_
Definition: MzTab.h:314
void set(const std::vector< MzTabString > &entries)
String toCellString() const
void fromCellString(const String &s)
void set(const String &value)
String value_
Definition: MzTab.h:230
MzTabString(const String &s)
std::vector< String > pep_optional_column_names_
Definition: MzTab.h:1075
const ConsensusMap & consensus_map_
Definition: MzTab.h:1036
std::map< Size, std::vector< std::pair< String, String > > > run_to_search_engines_
Definition: MzTab.h:1045
std::map< std::pair< size_t, size_t >, size_t > map_id_run_fileidx_2_msfileidx_
Definition: MzTab.h:1047
std::vector< const ProteinIdentification * > prot_ids_
Definition: MzTab.h:1050
String filename_
Definition: MzTab.h:1055
std::map< Size, std::set< Size > > pg2prot_
Definition: MzTab.h:1043
bool export_empty_pep_ids_
Definition: MzTab.h:1059
bool nextPRTRow(MzTabProteinSectionRow &row)
bool export_unidentified_features_
Definition: MzTab.h:1057
bool nextPEPRow(MzTabPeptideSectionRow &row)
const std::vector< String > & getProteinOptionalColumnNames() const
std::set< String > protein_hit_user_value_keys_
Definition: MzTab.h:1037
std::vector< String > psm_optional_column_names_
Definition: MzTab.h:1076
StringList fixed_mods_
Definition: MzTab.h:1056
std::map< String, size_t > idrunid_2_idrunindex_
Definition: MzTab.h:1044
bool export_all_psms_
Definition: MzTab.h:1060
std::vector< const PeptideIdentification * > peptide_ids_
Definition: MzTab.h:1051
std::map< Size, std::set< Size > > ind2prot_
Definition: MzTab.h:1042
const MzTabMetaData & getMetaData() const
StringList ms_runs_
Definition: MzTab.h:1053
bool nextPSMRow(MzTabPSMSectionRow &row)
CMMzTabStream(const ConsensusMap &consensus_map, const String &filename, const bool first_run_inference_only, const bool export_unidentified_features, const bool export_unassigned_ids, const bool export_subfeatures, const bool export_empty_pep_ids=false, const bool export_all_psms=false, const String &title="ConsensusMap export from OpenMS")
std::map< std::pair< String, unsigned >, unsigned > path_label_to_assay_
Definition: MzTab.h:1048
bool first_run_inference_
Definition: MzTab.h:1054
std::map< Size, std::vector< std::vector< std::pair< String, String > > > > run_to_search_engines_settings_
Definition: MzTab.h:1046
const std::vector< String > & getPeptideOptionalColumnNames() const
bool export_subfeatures_
Definition: MzTab.h:1058
std::vector< String > prt_optional_column_names_
Definition: MzTab.h:1074
std::set< String > consensus_feature_user_value_keys_
Definition: MzTab.h:1038
MzTabString db_
Definition: MzTab.h:1072
const std::vector< String > & getPSMOptionalColumnNames() const
MzTabMetaData meta_data_
Definition: MzTab.h:1078
std::set< String > consensus_feature_peptide_hit_user_value_keys_
Definition: MzTab.h:1039
std::vector< String > pep_optional_column_names_
Definition: MzTab.h:1005
std::map< Size, std::vector< std::pair< String, String > > > run_to_search_engines_
Definition: MzTab.h:975
std::map< std::pair< size_t, size_t >, size_t > map_id_run_fileidx_2_msfileidx_
Definition: MzTab.h:977
std::vector< const ProteinIdentification * > prot_ids_
Definition: MzTab.h:980
String filename_
Definition: MzTab.h:985
std::map< Size, std::set< Size > > pg2prot_
Definition: MzTab.h:973
bool export_empty_pep_ids_
Definition: MzTab.h:990
bool nextPRTRow(MzTabProteinSectionRow &row)
bool nextPEPRow(MzTabPeptideSectionRow &row)
const std::vector< String > & getProteinOptionalColumnNames() const
std::set< String > protein_hit_user_value_keys_
Definition: MzTab.h:967
std::vector< String > psm_optional_column_names_
Definition: MzTab.h:1006
StringList fixed_mods_
Definition: MzTab.h:986
std::map< String, size_t > idrunid_2_idrunindex_
Definition: MzTab.h:974
bool export_all_psms_
Definition: MzTab.h:991
std::vector< const PeptideIdentification * > peptide_ids_
Definition: MzTab.h:981
std::map< Size, std::set< Size > > ind2prot_
Definition: MzTab.h:972
const MzTabMetaData & getMetaData() const
StringList ms_runs_
Definition: MzTab.h:983
bool nextPSMRow(MzTabPSMSectionRow &row)
std::map< std::pair< String, unsigned >, unsigned > path_label_to_assay_
Definition: MzTab.h:978
std::set< String > peptide_hit_user_value_keys_
Definition: MzTab.h:969
bool first_run_inference_
Definition: MzTab.h:984
std::map< Size, std::vector< std::vector< std::pair< String, String > > > > run_to_search_engines_settings_
Definition: MzTab.h:976
const std::vector< String > & getPeptideOptionalColumnNames() const
IDMzTabStream(const std::vector< const ProteinIdentification * > &prot_ids, const std::vector< const PeptideIdentification * > &peptide_ids, const String &filename, bool first_run_inference_only, bool export_empty_pep_ids=false, bool export_all_psms=false, const String &title="ID export from OpenMS")
std::vector< String > prt_optional_column_names_
Definition: MzTab.h:1004
std::set< String > peptide_id_user_value_keys_
Definition: MzTab.h:968
MzTabString db_
Definition: MzTab.h:1002
const std::vector< String > & getPSMOptionalColumnNames() const
MzTabMetaData meta_data_
Definition: MzTab.h:1008
Data model of MzTab files. Please see the official MzTab specification at https://code....
Definition: MzTab.h:809
static void getSearchModifications_(const std::vector< const ProteinIdentification * > &prot_ids, StringList &var_mods, StringList &fixed_mods)
static void replaceWhiteSpaces_(ForwardIterator first, ForwardIterator last)
Definition: MzTab.h:1166
const std::map< Size, String > & getCommentRows() const
static MzTabString getModificationIdentifier_(const ResidueModification &r)
void setOligonucleotideSectionRows(const MzTabOligonucleotideSectionRows &onsd)
MzTabOSMSectionRows osm_data_
/ oligonucleotide-spectrum matches
Definition: MzTab.h:1259
std::vector< Size > empty_rows_
index of empty rows
Definition: MzTab.h:1260
MzTabSmallMoleculeSectionRows small_molecule_data_
Definition: MzTab.h:1256
const std::vector< Size > & getEmptyRows() const
static void addMetaInfoToOptionalColumns(const std::set< String > &keys, std::vector< MzTabOptionalColumnEntry > &opt, const String &id, const MetaInfoInterface &meta)
std::vector< String > getSmallMoleculeOptionalColumnNames() const
Extract opt_ (custom, optional column names)
static MzTab exportConsensusMapToMzTab(const ConsensusMap &consensus_map, const String &filename, const bool first_run_inference_only, const bool export_unidentified_features, const bool export_unassigned_ids, const bool export_subfeatures, const bool export_empty_pep_ids=false, const bool export_all_psms=false, const String &title="ConsensusMap export from OpenMS")
export linked peptide features aka consensus map
std::vector< String > getOligonucleotideOptionalColumnNames() const
Extract opt_ (custom, optional column names)
static MzTab exportIdentificationsToMzTab(const std::vector< ProteinIdentification > &prot_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &filename, bool first_run_inference_only, bool export_empty_pep_ids=false, bool export_all_psms=false, const String &title="ID export from OpenMS")
Export peptide and protein identifications to mzTab.
MzTabOligonucleotideSectionRows oligonucleotide_data_
Definition: MzTab.h:1258
static MzTabParameter getProteinScoreType_(const ProteinIdentification &prot_id)
MzTabPSMSectionRows & getPSMSectionRows()
static void addMSRunMetaData_(const std::map< size_t, String > &msrunindex_2_msfilename, MzTabMetaData &meta_data)
static MzTabPeptideSectionRow peptideSectionRowFromFeature_(const Feature &c, const std::set< String > &feature_user_value_keys, const std::set< String > &peptide_hit_user_value_keys, const std::vector< String > &fixed_mods)
static void getFeatureMapMetaValues_(const FeatureMap &feature_map, std::set< String > &feature_user_value_keys, std::set< String > &peptide_hit_user_value_keys)
std::map< Size, String > comment_rows_
comments
Definition: MzTab.h:1261
const MzTabMetaData & getMetaData() const
const MzTabNucleicAcidSectionRows & getNucleicAcidSectionRows() const
std::vector< String > getPeptideOptionalColumnNames() const
Extract opt_ (custom, optional column names)
std::vector< String > getOSMOptionalColumnNames() const
Extract opt_ (custom, optional column names)
void setNucleicAcidSectionRows(const MzTabNucleicAcidSectionRows &nasd)
static MzTabProteinSectionRow nextProteinSectionRowFromIndistinguishableGroup_(const std::vector< ProteinHit > &protein_hits, const ProteinIdentification::ProteinGroup &group, const size_t g, const std::map< Size, std::set< Size >> &ind2prot, const MzTabString &db, const MzTabString &db_version)
void setPeptideSectionRows(const MzTabPeptideSectionRows &psd)
static void replaceWhiteSpaces_(std::set< String > &keys)
Definition: MzTab.h:1175
static size_t getQuantStudyVariables_(const ProteinIdentification &pid)
static MzTabProteinSectionRow nextProteinSectionRowFromProteinGroup_(const ProteinIdentification::ProteinGroup &group, const MzTabString &db, const MzTabString &db_version)
static std::map< Size, std::set< Size > > mapGroupsToProteins_(const std::vector< ProteinIdentification::ProteinGroup > &groups, const std::vector< ProteinHit > &proteins)
const MzTabPeptideSectionRows & getPeptideSectionRows() const
void setSmallMoleculeSectionRows(const MzTabSmallMoleculeSectionRows &smsd)
void setProteinSectionRows(const MzTabProteinSectionRows &psd)
std::vector< String > getNucleicAcidOptionalColumnNames() const
Extract opt_ (custom, optional column names)
static void getConsensusMapMetaValues_(const ConsensusMap &consensus_map, std::set< String > &consensus_feature_user_value_keys, std::set< String > &peptide_hit_user_value_keys)
void setMetaData(const MzTabMetaData &md)
MzTabPSMSectionRows psm_data_
Definition: MzTab.h:1255
const MzTabPSMSectionRows & getPSMSectionRows() const
static MzTabParameter getMSRunSpectrumIdentifierType_(const std::vector< const PeptideIdentification * > &peptide_ids_)
const MzTabOligonucleotideSectionRows & getOligonucleotideSectionRows() const
static MzTabPeptideSectionRow peptideSectionRowFromConsensusFeature_(const ConsensusFeature &c, const ConsensusMap &consensus_map, const StringList &ms_runs, const Size n_study_variables, const std::set< String > &consensus_feature_user_value_keys, const std::set< String > &peptide_hit_user_value_keys, const std::map< String, size_t > &idrun_2_run_index, const std::map< std::pair< size_t, size_t >, size_t > &map_run_fileidx_2_msfileidx, const std::map< std::pair< String, unsigned >, unsigned > &path_label_to_assay, const std::vector< String > &fixed_mods, bool export_subfeatures)
static void mapBetweenRunAndSearchEngines_(const std::vector< const ProteinIdentification * > &prot_ids, const std::vector< const PeptideIdentification * > &pep_ids, bool skip_first_run, std::map< std::tuple< String, String, String >, std::set< Size >> &search_engine_to_runs, std::map< Size, std::vector< std::pair< String, String >>> &run_to_search_engines, std::map< Size, std::vector< std::vector< std::pair< String, String >>>> &run_to_search_engines_settings, std::map< String, std::vector< std::pair< String, String >>> &search_engine_to_settings)
MzTabProteinSectionRows & getProteinSectionRows()
MzTabNucleicAcidSectionRows nucleic_acid_data_
Definition: MzTab.h:1257
static std::map< Size, MzTabModificationMetaData > generateMzTabStringFromVariableModifications(const std::vector< String > &mods)
std::vector< String > getOptionalColumnNames_(const SectionRows &rows) const
Helper function for "get...OptionalColumnNames" functions.
Definition: MzTab.h:1220
MzTabProteinSectionRows protein_data_
Definition: MzTab.h:1253
static std::map< Size, MzTabModificationMetaData > generateMzTabStringFromFixedModifications(const std::vector< String > &mods)
static void checkSequenceUniqueness_(const std::vector< PeptideIdentification > &curr_pep_ids)
static std::map< String, Size > mapIDRunIdentifier2IDRunIndex_(const std::vector< const ProteinIdentification * > &prot_ids)
std::vector< String > getProteinOptionalColumnNames() const
Extract opt_ (custom, optional column names)
static boost::optional< MzTabPSMSectionRow > PSMSectionRowFromPeptideID_(PeptideIdentification const &pid, std::vector< ProteinIdentification const * > const &prot_id, std::map< String, size_t > &idrun_2_run_index, std::map< std::pair< size_t, size_t >, size_t > &map_run_fileidx_2_msfileidx, std::map< Size, std::vector< std::pair< String, String >>> &run_to_search_engines, Size const current_psm_idx, Size const psm_id, MzTabString const &db, MzTabString const &db_version, bool const export_empty_pep_ids, bool const export_all_psms)
void setEmptyRows(const std::vector< Size > &empty)
static MzTabModificationList extractModificationList(const PeptideHit &pep_hit, const std::vector< String > &fixed_mods, const std::vector< String > &localization_mods)
MzTabPeptideSectionRows peptide_data_
Definition: MzTab.h:1254
const MzTabSmallMoleculeSectionRows & getSmallMoleculeSectionRows() const
static void mapIDRunFileIndex2MSFileIndex_(const std::vector< const ProteinIdentification * > &prot_ids, const std::map< String, size_t > &msfilename_2_msrunindex, bool skip_first_run, std::map< std::pair< size_t, size_t >, size_t > &map_run_fileidx_2_msfileidx)
MzTab()=default
Default constructor.
static void getIdentificationMetaValues_(const std::vector< const ProteinIdentification * > &prot_ids, std::vector< const PeptideIdentification * > &peptide_ids_, std::set< String > &protein_hit_user_value_keys, std::set< String > &peptide_id_user_value_keys, std::set< String > &peptide_hit_user_value_keys)
std::vector< String > getPSMOptionalColumnNames() const
Extract opt_ (custom, optional column names)
MzTabMetaData meta_data_
Definition: MzTab.h:1252
const MzTabOSMSectionRows & getOSMSectionRows() const
static void mapBetweenMSFileNameAndMSRunIndex_(const std::vector< const ProteinIdentification * > &prot_ids, bool skip_first, std::map< String, size_t > &msfilename_2_msrunindex, std::map< size_t, String > &msrunindex_2_msfilename)
const MzTabProteinSectionRows & getProteinSectionRows() const
static std::map< Size, MzTabModificationMetaData > generateMzTabStringFromModifications(const std::vector< String > &mods)
MzTabPeptideSectionRows & getPeptideSectionRows()
void setCommentRows(const std::map< Size, String > &com)
void setPSMSectionRows(const MzTabPSMSectionRows &psd)
static void addSearchMetaData_(const std::vector< const ProteinIdentification * > &prot_ids, const std::map< std::tuple< String, String, String >, std::set< Size >> &search_engine_to_runs, const std::map< String, std::vector< std::pair< String, String >>> &search_engine_to_settings, MzTabMetaData &meta_data, bool first_run_inference_only)
void setOSMSectionRows(const MzTabOSMSectionRows &osd)
static MzTabProteinSectionRow proteinSectionRowFromProteinHit_(const ProteinHit &hit, const MzTabString &db, const MzTabString &db_version, const std::set< String > &protein_hit_user_value_keys)
static MzTab exportFeatureMapToMzTab(const FeatureMap &feature_map, const String &filename)
Representation of a peptide hit.
Definition: PeptideHit.h:57
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:65
Representation of a protein hit.
Definition: ProteinHit.h:60
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition: ProteinIdentification.h:118
Representation of a protein identification run.
Definition: ProteinIdentification.h:72
Representation of a modification.
Definition: ResidueModification.h:77
A more convenient string class.
Definition: String.h:61
String & substitute(char from, char to)
Replaces all occurrences of the character from by the character to.
int Int
Signed integer type.
Definition: Types.h:102
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
MzTabCellStateType
Data model of MzTab files.
Definition: MzTab.h:67
@ SIZE_OF_MZTAB_CELLTYPE
Definition: MzTab.h:72
@ MZTAB_CELLSTATE_NULL
Definition: MzTab.h:69
@ MZTAB_CELLSTATE_INF
Definition: MzTab.h:71
@ MZTAB_CELLSTATE_NAN
Definition: MzTab.h:70
@ MZTAB_CELLSTATE_DEFAULT
Definition: MzTab.h:68
const double c
Definition: Constants.h:209
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
MzTabInteger taxid
NEWT taxonomy for the species.
Definition: MzTab.h:673
MzTabInteger end
Definition: MzTab.h:743
MzTabSpectraRef spectra_ref
Spectra identifying the peptide.
Definition: MzTab.h:590
MzTabDouble calc_mass_to_charge
Precursor ion’s m/z.
Definition: MzTab.h:670
std::vector< MzTabPSMSectionRow > MzTabPSMSectionRows
Definition: MzTab.h:795
std::map< Size, MzTabDouble > smallmolecule_abundance_assay
Definition: MzTab.h:684
MzTabParameter software
Definition: MzTab.h:409
MzTabString url
Definition: MzTab.h:435
MzTabString position
Definition: MzTab.h:419
MzTabString modifications
Modifications identified on the small molecule.
Definition: MzTab.h:683
MzTabString email
Definition: MzTab.h:450
MzTabString full_name
Definition: MzTab.h:433
MzTabString sequence
The peptide’s sequence.
Definition: MzTab.h:575
std::map< Size, MzTabInteger > num_oligos_distinct_ms_run
Definition: MzTab.h:705
MzTabDoubleList retention_time
Time points in seconds. Semantics may vary.
Definition: MzTab.h:585
MzTabString name
Definition: MzTab.h:448
MzTabDoubleList retention_time_window
Definition: MzTab.h:586
MzTabParameterList fragmentation_method
Definition: MzTab.h:458
std::vector< int > sample_refs
Definition: MzTab.h:464
MzTabString label
Definition: MzTab.h:432
MzTabParameter format
Definition: MzTab.h:455
std::map< Size, MzTabDouble > smallmolecule_abundance_std_error_study_variable
Definition: MzTab.h:687
std::vector< MzTabProteinSectionRow > MzTabProteinSectionRows
Definition: MzTab.h:793
std::map< Size, MzTabDouble > best_search_engine_score
Search engine(s) score(s) for the peptide.
Definition: MzTab.h:581
MzTabString smiles
Molecular structure in SMILES format.
Definition: MzTab.h:666
MzTabBoolean unique
0=false, 1=true, null else: Peptide is unique for the protein.
Definition: MzTab.h:577
MzTabParameter source
Definition: MzTab.h:441
MzTabString uri
Location of the PSMs source entry.
Definition: MzTab.h:589
std::map< Size, MzTabParameter > disease
Definition: MzTab.h:403
std::map< Size, MzTabString > setting
Definition: MzTab.h:412
std::vector< int > assay_refs
Definition: MzTab.h:463
std::map< Size, MzTabParameter > tissue
Definition: MzTab.h:401
MzTabModificationList modifications
Modifications identified in the peptide.
Definition: MzTab.h:584
MzTabParameter id_format
Definition: MzTab.h:457
MzTabInteger charge
Precursor ion’s charge.
Definition: MzTab.h:587
std::map< Size, MzTabDouble > smallmolecule_abundance_stdev_study_variable
Definition: MzTab.h:686
MzTabString database_version
Version (and optionally # of entries).
Definition: MzTab.h:579
std::map< Size, MzTabModificationMetaData > quantification_mod
Definition: MzTab.h:425
MzTabString description
Definition: MzTab.h:399
MzTabParameter detector
Definition: MzTab.h:443
MzTabStringList identifier
The small molecule’s identifier.
Definition: MzTab.h:664
std::vector< MzTabPeptideSectionRow > MzTabPeptideSectionRows
Definition: MzTab.h:794
std::map< Size, std::map< Size, MzTabDouble > > search_engine_score_ms_run
Definition: MzTab.h:582
MzTabString accession
The protein’s accession.
Definition: MzTab.h:576
MzTabStringList ambiguity_members
Alternative nucleic acid identifications.
Definition: MzTab.h:707
MzTabDouble mass_to_charge
Precursor ion’s m/z.
Definition: MzTab.h:588
MzTabDouble coverage
(0-1) Fraction of nucleic acid sequence identified.
Definition: MzTab.h:712
MzTabParameter modification
Definition: MzTab.h:417
std::map< Size, MzTabInteger > num_oligos_unique_ms_run
Definition: MzTab.h:706
MzTabInteger start
Definition: MzTab.h:742
std::map< Size, MzTabParameter > cell_type
Definition: MzTab.h:402
std::map< Size, MzTabDouble > peptide_abundance_std_error_study_variable
Definition: MzTab.h:594
MzTabString site
Definition: MzTab.h:418
MzTabString inchi_key
InChi Key of the identified compound.
Definition: MzTab.h:667
MzTabParameter quantification_reagent
Definition: MzTab.h:424
MzTabString affiliation
Definition: MzTab.h:449
MzTabString location
Definition: MzTab.h:456
std::map< Size, MzTabParameter > custom
Definition: MzTab.h:404
std::vector< MzTabOSMSectionRow > MzTabOSMSectionRows
Definition: MzTab.h:799
MzTabInteger reliability
(1-3) 0=null Identification reliability for the peptide.
Definition: MzTab.h:583
std::vector< int > ms_run_ref
Definition: MzTab.h:427
std::map< Size, MzTabInteger > num_osms_ms_run
Definition: MzTab.h:704
std::map< Size, MzTabDouble > search_engine_score
Search engine(s) score(s) for the match.
Definition: MzTab.h:766
MzTabStringList go_terms
List of GO terms for the nucleic acid.
Definition: MzTab.h:711
MzTabParameter name
Definition: MzTab.h:440
MzTabString pre
Definition: MzTab.h:740
MzTabDouble exp_mass_to_charge
Precursor ion’s m/z.
Definition: MzTab.h:669
std::map< Size, MzTabDouble > peptide_abundance_study_variable
Definition: MzTab.h:592
std::map< Size, MzTabDouble > smallmolecule_abundance_study_variable
Definition: MzTab.h:685
std::vector< MzTabOptionalColumnEntry > opt_
Optional columns must start with “opt_”.
Definition: MzTab.h:595
std::vector< MzTabOligonucleotideSectionRow > MzTabOligonucleotideSectionRows
Definition: MzTab.h:798
MzTabParameterList search_engine
Search engine(s) that identified the peptide.
Definition: MzTab.h:580
std::pair< String, MzTabString > MzTabOptionalColumnEntry
Definition: MzTab.h:531
MzTabString post
Definition: MzTab.h:741
std::map< Size, MzTabDouble > peptide_abundance_stdev_study_variable
Definition: MzTab.h:593
std::map< Size, MzTabDouble > peptide_abundance_assay
Definition: MzTab.h:591
MzTabString chemical_formula
Chemical formula of the identified compound.
Definition: MzTab.h:665
MzTabString sample_ref
Definition: MzTab.h:426
std::vector< MzTabSmallMoleculeSectionRow > MzTabSmallMoleculeSectionRows
Definition: MzTab.h:796
MzTabString species
Human readable name of the species.
Definition: MzTab.h:674
std::vector< MzTabNucleicAcidSectionRow > MzTabNucleicAcidSectionRows
Definition: MzTab.h:797
MzTabString version
Definition: MzTab.h:434
MzTabString database
Name of the sequence database.
Definition: MzTab.h:578
std::map< Size, MzTabParameter > species
Definition: MzTab.h:400
std::map< Size, MzTabParameter > analyzer
Definition: MzTab.h:442
NUC - Nucleic acid section (table-based)
Definition: MzTab.h:693
OSM - OSM (oligonucleotide-spectrum match) section (table-based)
Definition: MzTab.h:763
OLI - Oligonucleotide section (table-based)
Definition: MzTab.h:728
PEP - Peptide section (Table based)
Definition: MzTab.h:574
SML Small molecule section (table based)
Definition: MzTab.h:663
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:886
Comparison operator for sorting rows.
Definition: MzTab.h:717
bool operator()(const MzTabNucleicAcidSectionRow &row1, const MzTabNucleicAcidSectionRow &row2) const
Definition: MzTab.h:718
Comparison operator for sorting rows.
Definition: MzTab.h:779
bool operator()(const MzTabOSMSectionRow &row1, const MzTabOSMSectionRow &row2) const
Definition: MzTab.h:780
Comparison operator for sorting rows.
Definition: MzTab.h:748
bool operator()(const MzTabOligonucleotideSectionRow &row1, const MzTabOligonucleotideSectionRow &row2) const
Definition: MzTab.h:749
Comparison operator for sorting rows.
Definition: MzTab.h:644
bool operator()(const MzTabPSMSectionRow &row1, const MzTabPSMSectionRow &row2) const
Definition: MzTab.h:645
PSM - PSM section (Table based)
Definition: MzTab.h:612
MzTabSpectraRef spectra_ref
Spectrum for this PSM.
Definition: MzTab.h:628
MzTabDouble calc_mass_to_charge
The calculated m/z ratio of the experimental precursor ion.
Definition: MzTab.h:626
MzTabString start
(List of) Start positions in parent protein(s)
Definition: MzTab.h:631
MzTabString sequence
The peptide’s sequence.
Definition: MzTab.h:613
MzTabDoubleList retention_time
Time points in seconds. Semantics may vary.
Definition: MzTab.h:623
MzTabBoolean unique
0=false, 1=true, null else: Peptide is unique for the protein.
Definition: MzTab.h:616
MzTabString uri
Location of the PSM’s source entry.
Definition: MzTab.h:627
void addPepEvidenceToRows(const std::vector< PeptideEvidence > &peptide_evidences)
Gets peptide_evidences with data from internal structures adds their info to an MzTabPSMSectionRow (p...
MzTabModificationList modifications
Modifications identified in the peptide.
Definition: MzTab.h:622
MzTabInteger charge
The charge of the experimental precursor ion.
Definition: MzTab.h:624
MzTabString database_version
Version (and optionally # of entries).
Definition: MzTab.h:618
MzTabString accession
List of potential parent protein accessions as in the fasta DB.
Definition: MzTab.h:615
MzTabString end
(List of) Start positions in parent protein(s)
Definition: MzTab.h:632
MzTabInteger reliability
(1-3) 0=null Identification reliability for the peptide.
Definition: MzTab.h:621
std::map< Size, MzTabDouble > search_engine_score
Search engine(s) score(s) for the peptide.
Definition: MzTab.h:620
MzTabString pre
(List of) Amino acid in parent protein(s) before the start of the current PSM
Definition: MzTab.h:629
MzTabDouble exp_mass_to_charge
The observed m/z ratio of the experimental precursor ion (either directly from the raw data or correc...
Definition: MzTab.h:625
std::vector< MzTabOptionalColumnEntry > opt_
Optional columns must start with “opt_”.
Definition: MzTab.h:633
MzTabParameterList search_engine
Search engine(s) that identified the peptide.
Definition: MzTab.h:619
MzTabString post
(List of) Amino acid in parent protein(s) after the start of the current PSM
Definition: MzTab.h:630
MzTabInteger PSM_ID
A unique ID of a PSM line.
Definition: MzTab.h:614
MzTabString database
Name of the sequence database.
Definition: MzTab.h:617
Comparison operator for sorting rows.
Definition: MzTab.h:600
bool operator()(const MzTabPeptideSectionRow &row1, const MzTabPeptideSectionRow &row2) const
Definition: MzTab.h:601
Comparison operator for sorting rows.
Definition: MzTab.h:563
bool operator()(const MzTabProteinSectionRow &row1, const MzTabProteinSectionRow &row2) const
Definition: MzTab.h:564
PRT - Protein section (Table based)
Definition: MzTab.h:535
MzTabInteger taxid
NEWT taxonomy for the species.
Definition: MzTab.h:539
std::map< Size, MzTabDouble > protein_abundance_assay
Definition: MzTab.h:555
std::map< Size, MzTabDouble > best_search_engine_score
best_search_engine_score[1-n]
Definition: MzTab.h:544
MzTabString uri
Location of the protein’s source entry.
Definition: MzTab.h:552
std::map< Size, MzTabDouble > protein_abundance_std_error_study_variable
Definition: MzTab.h:558
MzTabModificationList modifications
Modifications identified in the protein.
Definition: MzTab.h:551
MzTabString database_version
String Version of the protein database.
Definition: MzTab.h:542
MzTabString description
Human readable description (i.e. the name)
Definition: MzTab.h:538
std::map< Size, MzTabInteger > num_peptides_distinct_ms_run
Definition: MzTab.h:548
std::map< Size, MzTabDouble > protein_abundance_study_variable
Definition: MzTab.h:556
std::map< Size, std::map< Size, MzTabDouble > > search_engine_score_ms_run
search_engine_score[index1]_ms_run[index2]
Definition: MzTab.h:545
MzTabString accession
The protein’s accession.
Definition: MzTab.h:537
MzTabStringList ambiguity_members
Alternative protein identifications.
Definition: MzTab.h:550
MzTabDouble coverage
(0-1) Amount of protein sequence identified.
Definition: MzTab.h:554
MzTabInteger reliability
Definition: MzTab.h:546
std::map< Size, MzTabInteger > num_psms_ms_run
Definition: MzTab.h:547
MzTabStringList go_terms
List of GO terms for the protein.
Definition: MzTab.h:553
std::map< Size, MzTabInteger > num_peptides_unique_ms_run
Definition: MzTab.h:549
std::map< Size, MzTabDouble > protein_abundance_stdev_study_variable
Definition: MzTab.h:557
std::vector< MzTabOptionalColumnEntry > opt_
Optional Columns must start with “opt_”
Definition: MzTab.h:559
MzTabParameterList search_engine
Search engine(s) identifying the protein.
Definition: MzTab.h:543
MzTabString species
Human readable name of the species.
Definition: MzTab.h:540
MzTabString database
Name of the protein database.
Definition: MzTab.h:541