OpenMS
MzTab.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2023.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Timo Sachsenberg $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
44 
45 #include <optional>
46 
47 #pragma clang diagnostic push
48 #pragma clang diagnostic ignored "-Wnon-virtual-dtor"
49 
50 namespace OpenMS
51 {
60  class OPENMS_DLLAPI MzTabModification
61  {
62 public:
64 
65  bool isNull() const;
66 
67  void setNull(bool b);
68 
70  void setPositionsAndParameters(const std::vector<std::pair<Size, MzTabParameter> >& ppp);
71 
72  std::vector<std::pair<Size, MzTabParameter> > getPositionsAndParameters() const;
73 
75 
77 
79 
80  void fromCellString(const String& s);
81 
82  ~MzTabModification() = default;
83 protected:
84  std::vector<std::pair<Size, MzTabParameter> > pos_param_pairs_;
86  };
87 
88  class OPENMS_DLLAPI MzTabModificationList
89  {
90 public:
91  bool isNull() const;
92 
93  void setNull(bool b);
94 
96 
97  void fromCellString(const String& s);
98 
99  std::vector<MzTabModification> get() const;
100 
101  void set(const std::vector<MzTabModification>& entries);
102 
104 protected:
105  std::vector<MzTabModification> entries_;
106  };
107 
108 // MTD
109  struct OPENMS_DLLAPI MzTabModificationMetaData
110  {
114  };
115 
116  struct OPENMS_DLLAPI MzTabAssayMetaData
117  {
119  std::map<Size, MzTabModificationMetaData> quantification_mod;
121  std::vector<int> ms_run_ref; // adapted to address https://github.com/HUPO-PSI/mzTab/issues/26
122  };
123 
124  struct OPENMS_DLLAPI MzTabMSRunMetaData
125  {
130  };
131 
132  struct OPENMS_DLLAPI MzTabStudyVariableMetaData
133  {
134  std::vector<int> assay_refs;
135  std::vector<int> sample_refs;
137  };
138 
140  class OPENMS_DLLAPI MzTabMetaData
141  {
142 public:
144 
151 
152  std::map<Size, MzTabParameter> protein_search_engine_score;
153  std::map<Size, MzTabParameter> peptide_search_engine_score;
154  std::map<Size, MzTabParameter> psm_search_engine_score;
155  std::map<Size, MzTabParameter> smallmolecule_search_engine_score;
156  std::map<Size, MzTabParameter> nucleic_acid_search_engine_score;
157  std::map<Size, MzTabParameter> oligonucleotide_search_engine_score;
158  std::map<Size, MzTabParameter> osm_search_engine_score;
159 
160  std::map<Size, MzTabParameterList> sample_processing;
161 
162  std::map<Size, MzTabInstrumentMetaData> instrument;
163 
164  std::map<Size, MzTabSoftwareMetaData> software;
165 
167 
168  std::map<Size, MzTabString> publication;
169 
170  std::map<Size, MzTabContactMetaData> contact;
171 
172  std::map<Size, MzTabString> uri;
173 
174  std::map<Size, MzTabModificationMetaData> fixed_mod;
175 
176  std::map<Size, MzTabModificationMetaData> variable_mod;
177 
179 
183 
184  std::map<Size, MzTabMSRunMetaData> ms_run;
185 
186  std::map<Size, MzTabParameter> custom;
187 
188  std::map<Size, MzTabSampleMetaData> sample;
189 
190  std::map<Size, MzTabAssayMetaData> assay;
191 
192  std::map<Size, MzTabStudyVariableMetaData> study_variable;
193 
194  std::map<Size, MzTabCVMetaData> cv;
195 
196  std::vector<String> colunit_protein;
197  std::vector<String> colunit_peptide;
198  std::vector<String> colunit_psm;
199  std::vector<String> colunit_small_molecule;
200  };
201 
203  struct OPENMS_DLLAPI MzTabProteinSectionRow
204  {
213  std::map<Size, MzTabDouble> best_search_engine_score;
214  std::map<Size, std::map<Size, MzTabDouble> > search_engine_score_ms_run;
216  std::map<Size, MzTabInteger> num_psms_ms_run;
217  std::map<Size, MzTabInteger> num_peptides_distinct_ms_run;
218  std::map<Size, MzTabInteger> num_peptides_unique_ms_run;
224  std::map<Size, MzTabDouble> protein_abundance_assay;
225  std::map<Size, MzTabDouble> protein_abundance_study_variable;
226  std::map<Size, MzTabDouble> protein_abundance_stdev_study_variable;
227  std::map<Size, MzTabDouble> protein_abundance_std_error_study_variable;
228  std::vector<MzTabOptionalColumnEntry> opt_;
229 
231  struct RowCompare
232  {
234  const MzTabProteinSectionRow& row2) const
235  {
236  return row1.accession.get() < row2.accession.get();
237  }
238  };
239  };
240 
242  struct OPENMS_DLLAPI MzTabPeptideSectionRow
243  {
250  std::map<Size, MzTabDouble> best_search_engine_score;
251  std::map<Size, std::map<Size, MzTabDouble> > search_engine_score_ms_run;
260  std::map<Size, MzTabDouble> peptide_abundance_assay;
261  std::map<Size, MzTabDouble> peptide_abundance_study_variable;
262  std::map<Size, MzTabDouble> peptide_abundance_stdev_study_variable;
263  std::map<Size, MzTabDouble> peptide_abundance_std_error_study_variable;
264  std::vector<MzTabOptionalColumnEntry> opt_;
265 
266 
268  struct RowCompare
269  {
271  const MzTabPeptideSectionRow& row2) const
272  {
273  return (std::make_pair(row1.sequence.get(), row1.accession.get()) <
274  std::make_pair(row2.sequence.get(), row2.accession.get()));
275  }
276  };
277  };
278 
280  struct OPENMS_DLLAPI MzTabPSMSectionRow
281  {
289  std::map<Size, MzTabDouble> search_engine_score;
302  std::vector<MzTabOptionalColumnEntry> opt_;
303 
310  void addPepEvidenceToRows(const std::vector<PeptideEvidence>& peptide_evidences);
312  struct RowCompare
313  {
314  bool operator()(const MzTabPSMSectionRow& row1,
315  const MzTabPSMSectionRow& row2) const
316  {
317  // @TODO: sort by "PSM_ID"? what's the point of that field?
318  return (std::make_tuple(row1.sequence.get(),
319  row1.spectra_ref.getMSFile(),
320  row1.spectra_ref.getSpecRef(),
321  row1.accession.get()) <
322  std::make_tuple(row2.sequence.get(),
323  row2.spectra_ref.getMSFile(),
324  row2.spectra_ref.getSpecRef(),
325  row2.accession.get()));
326  }
327  };
328  };
329 
331  struct OPENMS_DLLAPI MzTabSmallMoleculeSectionRow
332  {
350  std::map<Size, MzTabDouble> best_search_engine_score;
351  std::map<Size, std::map<Size, MzTabDouble> > search_engine_score_ms_run;
353  std::map<Size, MzTabDouble> smallmolecule_abundance_assay;
354  std::map<Size, MzTabDouble> smallmolecule_abundance_study_variable;
355  std::map<Size, MzTabDouble> smallmolecule_abundance_stdev_study_variable;
357  std::vector<MzTabOptionalColumnEntry> opt_;
358  };
359 
361  struct OPENMS_DLLAPI MzTabNucleicAcidSectionRow
362  {
370  std::map<Size, MzTabDouble> best_search_engine_score;
371  std::map<Size, std::map<Size, MzTabDouble> > search_engine_score_ms_run;
373  std::map<Size, MzTabInteger> num_osms_ms_run;
374  std::map<Size, MzTabInteger> num_oligos_distinct_ms_run;
375  std::map<Size, MzTabInteger> num_oligos_unique_ms_run;
379  // do GO terms make sense for nucleic acid sequences?
382  std::vector<MzTabOptionalColumnEntry> opt_;
383 
385  struct RowCompare
386  {
388  const MzTabNucleicAcidSectionRow& row2) const
389  {
390  return row1.accession.get() < row2.accession.get();
391  }
392  };
393  };
394 
396  struct OPENMS_DLLAPI MzTabOligonucleotideSectionRow
397  {
402  std::map<Size, MzTabDouble> best_search_engine_score;
403  std::map<Size, std::map<Size, MzTabDouble>> search_engine_score_ms_run;
413  std::vector<MzTabOptionalColumnEntry> opt_;
414 
416  struct RowCompare
417  {
419  const MzTabOligonucleotideSectionRow& row2) const
420  {
421  return (std::make_tuple(row1.sequence.get(), row1.accession.get(),
422  row1.start.get(), row1.end.get()) <
423  std::make_tuple(row2.sequence.get(), row2.accession.get(),
424  row2.start.get(), row2.end.get()));
425  }
426  };
427 
428  };
429 
431  struct OPENMS_DLLAPI MzTabOSMSectionRow
432  {
435  std::map<Size, MzTabDouble> search_engine_score;
444  std::vector<MzTabOptionalColumnEntry> opt_;
445 
447  struct RowCompare
448  {
449  bool operator()(const MzTabOSMSectionRow& row1,
450  const MzTabOSMSectionRow& row2) const
451  {
452  return (std::make_tuple(row1.sequence.get(),
453  row1.spectra_ref.getMSFile(),
454  row1.spectra_ref.getSpecRef()) <
455  std::make_tuple(row2.sequence.get(),
456  row2.spectra_ref.getMSFile(),
457  row2.spectra_ref.getSpecRef()));
458  }
459  };
460  };
461 
462  typedef std::vector<MzTabProteinSectionRow> MzTabProteinSectionRows;
463  typedef std::vector<MzTabPeptideSectionRow> MzTabPeptideSectionRows;
464  typedef std::vector<MzTabPSMSectionRow> MzTabPSMSectionRows;
465  typedef std::vector<MzTabSmallMoleculeSectionRow> MzTabSmallMoleculeSectionRows;
466  typedef std::vector<MzTabNucleicAcidSectionRow> MzTabNucleicAcidSectionRows;
467  typedef std::vector<MzTabOligonucleotideSectionRow> MzTabOligonucleotideSectionRows;
468  typedef std::vector<MzTabOSMSectionRow> MzTabOSMSectionRows;
469 
470 
477  class OPENMS_DLLAPI MzTab : public MzTabBase
478  {
479  public:
481  MzTab() = default;
482  ~MzTab() = default;
483 
484  const MzTabMetaData& getMetaData() const;
485 
486  void setMetaData(const MzTabMetaData& md);
487 
489 
491 
493 
495 
497 
499 
501 
503 
505 
507 
509 
511 
513 
515 
517 
519 
521 
522  void setCommentRows(const std::map<Size, String>& com);
523 
524  void setEmptyRows(const std::vector<Size>& empty);
525 
526  const std::vector<Size>& getEmptyRows() const;
527 
528  const std::map<Size, String>& getCommentRows() const;
529 
531  std::vector<String> getProteinOptionalColumnNames() const;
532 
534  std::vector<String> getPeptideOptionalColumnNames() const;
535 
537  std::vector<String> getPSMOptionalColumnNames() const;
538 
540  std::vector<String> getSmallMoleculeOptionalColumnNames() const;
541 
543  std::vector<String> getNucleicAcidOptionalColumnNames() const;
544 
546  std::vector<String> getOligonucleotideOptionalColumnNames() const;
547 
548  static void addMetaInfoToOptionalColumns(const std::set<String>& keys, std::vector<MzTabOptionalColumnEntry>& opt, const String& id, const MetaInfoInterface& meta);
549 
551  std::vector<String> getOSMOptionalColumnNames() const;
552 
553  static std::map<Size, MzTabModificationMetaData> generateMzTabStringFromModifications(const std::vector<String>& mods);
554 
555  static std::map<Size, MzTabModificationMetaData> generateMzTabStringFromVariableModifications(const std::vector<String>& mods);
556 
557  static std::map<Size, MzTabModificationMetaData> generateMzTabStringFromFixedModifications(const std::vector<String>& mods);
558 
559  static MzTab exportFeatureMapToMzTab(const FeatureMap& feature_map, const String& filename);
560 
576  const std::vector<ProteinIdentification>& prot_ids,
577  const std::vector<PeptideIdentification>& peptide_ids,
578  const String& filename,
579  bool first_run_inference_only,
580  bool export_empty_pep_ids = false,
581  bool export_all_psms = false,
582  const String& title = "ID export from OpenMS");
583 
584 
589  static MzTabModificationList extractModificationList(const PeptideHit& pep_hit, const std::vector<String>& fixed_mods, const std::vector<String>& localization_mods);
590 
604  const ConsensusMap& consensus_map,
605  const String& filename,
606  const bool first_run_inference_only,
607  const bool export_unidentified_features,
608  const bool export_unassigned_ids,
609  const bool export_subfeatures,
610  const bool export_empty_pep_ids = false,
611  const bool export_all_psms = false,
612  const String& title = "ConsensusMap export from OpenMS");
613 
615  {
616  public:
618  const std::vector<const ProteinIdentification*>& prot_ids,
619  const std::vector<const PeptideIdentification*>& peptide_ids,
620  const String& filename,
621  bool first_run_inference_only,
622  bool export_empty_pep_ids = false,
623  bool export_all_psms = false,
624  const String& title = "ID export from OpenMS");
625 
626  const MzTabMetaData& getMetaData() const;
627 
628  const std::vector<String>& getProteinOptionalColumnNames() const;
629  const std::vector<String>& getPeptideOptionalColumnNames() const;
630  const std::vector<String>& getPSMOptionalColumnNames() const;
631 
635  private:
637  std::set<String> peptide_id_user_value_keys_;
639 
640  // beautiful mapping structs
641  std::map<Size, std::set<Size>> ind2prot_;
642  std::map<Size, std::set<Size>> pg2prot_;
643  std::map<String, size_t> idrunid_2_idrunindex_;
644  std::map<Size, std::vector<std::pair<String, String>>> run_to_search_engines_;
645  std::map<Size, std::vector<std::vector<std::pair<String, String>>>> run_to_search_engines_settings_;
646  std::map<std::pair<size_t,size_t>,size_t> map_id_run_fileidx_2_msfileidx_;
647  std::map<std::pair< String, unsigned >, unsigned> path_label_to_assay_;
648 
649  std::vector<const ProteinIdentification*> prot_ids_;
650  std::vector<const PeptideIdentification*> peptide_ids_;
651 
656  /* currently unused
657  bool export_unidentified_features_;
658  bool export_subfeatures_; */
661  size_t quant_study_variables_ = 0;
662  // size_t n_study_variables_ = 0; //currently unused
663  size_t PRT_STATE_ = 0;
664  size_t prt_run_id_ = 0; // current (protein) identification run
665  size_t prt_hit_id_ = 0; // current protein in (protein) identification run
666  size_t prt_group_id_ = 0;
667  size_t prt_indistgroup_id_ = 0;
668  size_t pep_id_ = 0;
669  size_t psm_id_ = 0;
670  size_t current_psm_idx_ = 0;
671  MzTabString db_, db_version_;
672 
673  std::vector<String> prt_optional_column_names_;
674  std::vector<String> pep_optional_column_names_;
675  std::vector<String> psm_optional_column_names_;
676 
678  };
679 
681  {
682  public:
684  const ConsensusMap& consensus_map,
685  const String& filename,
686  const bool first_run_inference_only,
687  const bool export_unidentified_features,
688  const bool export_unassigned_ids,
689  const bool export_subfeatures,
690  const bool export_empty_pep_ids = false,
691  const bool export_all_psms = false,
692  const String& title = "ConsensusMap export from OpenMS");
693 
694  const MzTabMetaData& getMetaData() const;
695 
696  const std::vector<String>& getProteinOptionalColumnNames() const;
697  const std::vector<String>& getPeptideOptionalColumnNames() const;
698  const std::vector<String>& getPSMOptionalColumnNames() const;
699 
703 
704  private:
710 
711  // beautiful mapping structs
712  std::map<Size, std::set<Size>> ind2prot_;
713  std::map<Size, std::set<Size>> pg2prot_;
714  std::map<String, size_t> idrunid_2_idrunindex_;
715  std::map<Size, std::vector<std::pair<String, String>>> run_to_search_engines_;
716  std::map<Size, std::vector<std::vector<std::pair<String, String>>>> run_to_search_engines_settings_;
717  std::map<std::pair<size_t,size_t>,size_t> map_id_run_fileidx_2_msfileidx_;
718  std::map<std::pair< String, unsigned >, unsigned> path_label_to_assay_;
719 
720  std::vector<const ProteinIdentification*> prot_ids_;
721  std::vector<const PeptideIdentification*> peptide_ids_;
722 
731  size_t quant_study_variables_ = 0;
732  size_t n_study_variables_ = 0;
733  size_t PRT_STATE_ = 0;
734  size_t prt_run_id_ = 0; // current (protein) identification run
735  size_t prt_hit_id_ = 0; // current protein in (protein) identification run
736  size_t prt_group_id_ = 0;
737  size_t prt_indistgroup_id_ = 0;
738  size_t pep_id_ = 0;
739  size_t pep_counter_ = 0;
740  size_t psm_id_ = 0;
741  size_t current_psm_idx_ = 0;
742  MzTabString db_, db_version_;
743 
744  std::vector<String> prt_optional_column_names_;
745  std::vector<String> pep_optional_column_names_;
746  std::vector<String> psm_optional_column_names_;
747 
749  };
750 
751 
752  protected:
753  // extract basic mappings
754 
755  static std::map<String, Size> mapIDRunIdentifier2IDRunIndex_(const std::vector<const ProteinIdentification*>& prot_ids);
756 
757  static std::optional<MzTabPSMSectionRow> PSMSectionRowFromPeptideID_(
758  PeptideIdentification const& pid,
759  std::vector<ProteinIdentification const*> const& prot_id,
760  std::map<String, size_t>& idrun_2_run_index,
761  std::map<std::pair<size_t, size_t>, size_t>& map_run_fileidx_2_msfileidx,
762  std::map<Size, std::vector<std::pair<String, String>>>& run_to_search_engines,
763  Size const current_psm_idx,
764  Size const psm_id,
765  MzTabString const& db,
766  MzTabString const& db_version,
767  bool const export_empty_pep_ids,
768  bool const export_all_psms);
769 
771  const ConsensusFeature& c,
772  const ConsensusMap& consensus_map,
773  const StringList& ms_runs,
774  const Size n_study_variables,
775  const std::set<String>& consensus_feature_user_value_keys,
776  const std::set<String>& peptide_identifications_user_value_keys,
777  const std::set<String>& peptide_hit_user_value_keys,
778  const std::map<String, size_t>& idrun_2_run_index,
779  const std::map<std::pair<size_t,size_t>,size_t>& map_run_fileidx_2_msfileidx,
780  const std::map< std::pair< String, unsigned >, unsigned>& path_label_to_assay,
781  const std::vector<String>& fixed_mods,
782  bool export_subfeatures);
783 
785  const Feature& c,
786  const std::set<String>& feature_user_value_keys,
787  const std::set<String>& peptide_identifications_user_value_keys,
788  const std::set<String>& peptide_hit_user_value_keys,
789  const std::vector<String>& fixed_mods);
790 
792  const ProteinHit& hit,
793  const MzTabString& db,
794  const MzTabString& db_version,
795  const std::set<String>& protein_hit_user_value_keys);
796 
799  const MzTabString& db,
800  const MzTabString& db_version);
801 
803  const std::vector<ProteinHit>& protein_hits,
805  const size_t g,
806  const std::map<Size, std::set<Size>>& ind2prot,
807  const MzTabString& db,
808  const MzTabString& db_version);
809 
810  static void addMSRunMetaData_(
811  const std::map<size_t, String>& msrunindex_2_msfilename,
812  MzTabMetaData& meta_data);
813 
815  const std::vector<const ProteinIdentification*>& prot_ids,
816  bool skip_first,
817  std::map<String, size_t>& msfilename_2_msrunindex,
818  std::map<size_t, String>& msrunindex_2_msfilename);
819 
821 
823 
824  // TODO: move to core classes?
825  static void getConsensusMapMetaValues_(const ConsensusMap& consensus_map,
826  std::set<String>& consensus_feature_user_value_keys,
827  std::set<String>& peptide_identification_user_value_keys,
828  std::set<String>& peptide_hit_user_value_keys);
829 
830  static void getFeatureMapMetaValues_(const FeatureMap& feature_map,
831  std::set<String>& feature_user_value_keys,
832  std::set<String>& peptide_identification_user_value_keys,
833  std::set<String>& peptide_hit_user_value_keys);
834 
836  const std::vector<const ProteinIdentification*>& prot_ids,
837  std::vector<const PeptideIdentification*>& peptide_ids_,
838  std::set<String>& protein_hit_user_value_keys,
839  std::set<String>& peptide_id_user_value_keys,
840  std::set<String>& peptide_hit_user_value_keys);
841 
842  // determine spectrum reference identifier type (e.g., Thermo nativeID) from spectrum references
843  static MzTabParameter getMSRunSpectrumIdentifierType_(const std::vector<const PeptideIdentification*>& peptide_ids_);
844 
846  const std::vector<const ProteinIdentification*>& prot_ids,
847  const std::vector<const PeptideIdentification*>& pep_ids,
848  bool skip_first_run,
849  std::map<std::tuple<String, String, String>, std::set<Size>>& search_engine_to_runs,
850  std::map<Size, std::vector<std::pair<String, String>>>& run_to_search_engines,
851  std::map<Size, std::vector<std::vector<std::pair<String, String>>>>& run_to_search_engines_settings,
852  std::map<String, std::vector<std::pair<String, String>>>& search_engine_to_settings);
853 
854  static std::map<Size, std::set<Size>> mapGroupsToProteins_(
855  const std::vector<ProteinIdentification::ProteinGroup>& groups,
856  const std::vector<ProteinHit>& proteins);
857 
858  static void addSearchMetaData_(
859  const std::vector<const ProteinIdentification*>& prot_ids,
860  const std::map<std::tuple<String, String, String>, std::set<Size>>& search_engine_to_runs,
861  const std::map<String, std::vector<std::pair<String,String>>>& search_engine_to_settings,
862  MzTabMetaData& meta_data,
863  bool first_run_inference_only);
864 
866  const std::vector<const ProteinIdentification*>& prot_ids,
867  const std::map<String, size_t>& msfilename_2_msrunindex,
868  bool skip_first_run,
869  std::map<std::pair<size_t, size_t>, size_t>& map_run_fileidx_2_msfileidx);
870 
872  const std::vector<const ProteinIdentification*>& prot_ids,
873  StringList& var_mods,
874  StringList& fixed_mods);
875 
876  // create MzTab compatible modification identifier from ResidueModification
877  // If the Modification has a unimod identifier it will be prefixed as UNIMOD
878  // otherwise as CHEMMOD (see MzTab specification for details)
880 
881  static void checkSequenceUniqueness_(const std::vector<PeptideIdentification>& curr_pep_ids);
882 
891  std::vector<Size> empty_rows_;
892  std::map<Size, String> comment_rows_;
893  };
894 
895 } // namespace OpenMS
896 
897 #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:92
A container for features.
Definition: FeatureMap.h:106
An LC-MS feature.
Definition: Feature.h:72
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:61
Definition: MzTabBase.h:387
Definition: MzTabBase.h:182
Definition: MzTabBase.h:105
Definition: MzTabBase.h:67
Definition: MzTabBase.h:127
all meta data of a mzTab file. Please refer to specification for documentation.
Definition: MzTab.h:141
std::map< Size, MzTabCVMetaData > cv
Definition: MzTab.h:194
MzTabString mz_tab_version
Definition: MzTab.h:145
std::map< Size, MzTabParameter > peptide_search_engine_score
Definition: MzTab.h:153
std::map< Size, MzTabParameter > protein_search_engine_score
Definition: MzTab.h:152
std::vector< String > colunit_protein
Definition: MzTab.h:196
MzTabString mz_tab_mode
Definition: MzTab.h:146
MzTabParameter peptide_quantification_unit
Definition: MzTab.h:181
MzTabParameter quantification_method
Definition: MzTab.h:178
std::map< Size, MzTabString > publication
Definition: MzTab.h:168
MzTabString mz_tab_id
Definition: MzTab.h:148
std::map< Size, MzTabParameter > smallmolecule_search_engine_score
Definition: MzTab.h:155
MzTabParameterList false_discovery_rate
Definition: MzTab.h:166
MzTabString description
Definition: MzTab.h:150
std::map< Size, MzTabContactMetaData > contact
Definition: MzTab.h:170
std::map< Size, MzTabModificationMetaData > variable_mod
Definition: MzTab.h:176
std::map< Size, MzTabParameter > psm_search_engine_score
Definition: MzTab.h:154
std::map< Size, MzTabParameter > oligonucleotide_search_engine_score
Definition: MzTab.h:157
MzTabParameter small_molecule_quantification_unit
Definition: MzTab.h:182
std::map< Size, MzTabParameterList > sample_processing
Definition: MzTab.h:160
std::map< Size, MzTabInstrumentMetaData > instrument
Definition: MzTab.h:162
std::map< Size, MzTabModificationMetaData > fixed_mod
Definition: MzTab.h:174
std::map< Size, MzTabStudyVariableMetaData > study_variable
Definition: MzTab.h:192
std::vector< String > colunit_peptide
Definition: MzTab.h:197
std::map< Size, MzTabParameter > custom
Definition: MzTab.h:186
std::map< Size, MzTabSampleMetaData > sample
Definition: MzTab.h:188
MzTabString title
Definition: MzTab.h:149
MzTabString mz_tab_type
Definition: MzTab.h:147
std::map< Size, MzTabMSRunMetaData > ms_run
Definition: MzTab.h:184
std::map< Size, MzTabParameter > osm_search_engine_score
Definition: MzTab.h:158
std::map< Size, MzTabAssayMetaData > assay
Definition: MzTab.h:190
MzTabParameter protein_quantification_unit
Definition: MzTab.h:180
std::map< Size, MzTabString > uri
Definition: MzTab.h:172
std::map< Size, MzTabParameter > nucleic_acid_search_engine_score
Definition: MzTab.h:156
std::vector< String > colunit_small_molecule
Definition: MzTab.h:199
std::map< Size, MzTabSoftwareMetaData > software
Definition: MzTab.h:164
std::vector< String > colunit_psm
Definition: MzTab.h:198
Definition: MzTab.h:89
void set(const std::vector< MzTabModification > &entries)
std::vector< MzTabModification > get() const
void fromCellString(const String &s)
std::vector< MzTabModification > entries_
Definition: MzTab.h:105
Data model of MzTab files.
Definition: MzTab.h:61
MzTabString getModOrSubstIdentifier() const
String toCellString() const
void fromCellString(const String &s)
MzTabString mod_identifier_
Definition: MzTab.h:85
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:84
std::vector< std::pair< Size, MzTabParameter > > getPositionsAndParameters() const
void setModificationIdentifier(const MzTabString &mod_id)
Definition: MzTabBase.h:269
Definition: MzTabBase.h:232
Definition: MzTabBase.h:318
String getSpecRef() const
Definition: MzTabBase.h:292
Definition: MzTabBase.h:206
String get() const
Definition: MzTab.h:681
std::vector< String > pep_optional_column_names_
Definition: MzTab.h:745
const ConsensusMap & consensus_map_
Definition: MzTab.h:705
std::map< Size, std::vector< std::pair< String, String > > > run_to_search_engines_
Definition: MzTab.h:715
std::map< std::pair< size_t, size_t >, size_t > map_id_run_fileidx_2_msfileidx_
Definition: MzTab.h:717
std::vector< const ProteinIdentification * > prot_ids_
Definition: MzTab.h:720
std::set< String > consensus_feature_peptide_identification_user_value_keys_
Definition: MzTab.h:708
String filename_
Definition: MzTab.h:725
std::map< Size, std::set< Size > > pg2prot_
Definition: MzTab.h:713
bool export_empty_pep_ids_
Definition: MzTab.h:729
bool nextPRTRow(MzTabProteinSectionRow &row)
bool export_unidentified_features_
Definition: MzTab.h:727
bool nextPEPRow(MzTabPeptideSectionRow &row)
const std::vector< String > & getProteinOptionalColumnNames() const
std::set< String > protein_hit_user_value_keys_
Definition: MzTab.h:706
std::vector< String > psm_optional_column_names_
Definition: MzTab.h:746
StringList fixed_mods_
Definition: MzTab.h:726
std::map< String, size_t > idrunid_2_idrunindex_
Definition: MzTab.h:714
bool export_all_psms_
Definition: MzTab.h:730
std::vector< const PeptideIdentification * > peptide_ids_
Definition: MzTab.h:721
std::map< Size, std::set< Size > > ind2prot_
Definition: MzTab.h:712
const MzTabMetaData & getMetaData() const
StringList ms_runs_
Definition: MzTab.h:723
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:718
bool first_run_inference_
Definition: MzTab.h:724
std::map< Size, std::vector< std::vector< std::pair< String, String > > > > run_to_search_engines_settings_
Definition: MzTab.h:716
const std::vector< String > & getPeptideOptionalColumnNames() const
bool export_subfeatures_
Definition: MzTab.h:728
std::vector< String > prt_optional_column_names_
Definition: MzTab.h:744
std::set< String > consensus_feature_user_value_keys_
Definition: MzTab.h:707
MzTabString db_
Definition: MzTab.h:742
const std::vector< String > & getPSMOptionalColumnNames() const
MzTabMetaData meta_data_
Definition: MzTab.h:748
std::set< String > consensus_feature_peptide_hit_user_value_keys_
Definition: MzTab.h:709
Definition: MzTab.h:615
std::vector< String > pep_optional_column_names_
Definition: MzTab.h:674
std::map< Size, std::vector< std::pair< String, String > > > run_to_search_engines_
Definition: MzTab.h:644
std::map< std::pair< size_t, size_t >, size_t > map_id_run_fileidx_2_msfileidx_
Definition: MzTab.h:646
std::vector< const ProteinIdentification * > prot_ids_
Definition: MzTab.h:649
String filename_
Definition: MzTab.h:654
std::map< Size, std::set< Size > > pg2prot_
Definition: MzTab.h:642
bool export_empty_pep_ids_
Definition: MzTab.h:659
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:636
std::vector< String > psm_optional_column_names_
Definition: MzTab.h:675
StringList fixed_mods_
Definition: MzTab.h:655
std::map< String, size_t > idrunid_2_idrunindex_
Definition: MzTab.h:643
bool export_all_psms_
Definition: MzTab.h:660
std::vector< const PeptideIdentification * > peptide_ids_
Definition: MzTab.h:650
std::map< Size, std::set< Size > > ind2prot_
Definition: MzTab.h:641
const MzTabMetaData & getMetaData() const
StringList ms_runs_
Definition: MzTab.h:652
bool nextPSMRow(MzTabPSMSectionRow &row)
std::map< std::pair< String, unsigned >, unsigned > path_label_to_assay_
Definition: MzTab.h:647
std::set< String > peptide_hit_user_value_keys_
Definition: MzTab.h:638
bool first_run_inference_
Definition: MzTab.h:653
std::map< Size, std::vector< std::vector< std::pair< String, String > > > > run_to_search_engines_settings_
Definition: MzTab.h:645
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:673
std::set< String > peptide_id_user_value_keys_
Definition: MzTab.h:637
MzTabString db_
Definition: MzTab.h:671
const std::vector< String > & getPSMOptionalColumnNames() const
MzTabMetaData meta_data_
Definition: MzTab.h:677
Data model of MzTab files. Please see the official MzTab specification at https://code....
Definition: MzTab.h:478
static void getSearchModifications_(const std::vector< const ProteinIdentification * > &prot_ids, StringList &var_mods, StringList &fixed_mods)
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:890
std::vector< Size > empty_rows_
index of empty rows
Definition: MzTab.h:891
MzTabSmallMoleculeSectionRows small_molecule_data_
Definition: MzTab.h:887
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:889
static MzTabParameter getProteinScoreType_(const ProteinIdentification &prot_id)
MzTabPSMSectionRows & getPSMSectionRows()
static void addMSRunMetaData_(const std::map< size_t, String > &msrunindex_2_msfilename, MzTabMetaData &meta_data)
std::map< Size, String > comment_rows_
comments
Definition: MzTab.h:892
const MzTabMetaData & getMetaData() const
const MzTabNucleicAcidSectionRows & getNucleicAcidSectionRows() 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_identifications_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 std::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)
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 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)
void setMetaData(const MzTabMetaData &md)
MzTabPSMSectionRows psm_data_
Definition: MzTab.h:886
const MzTabPSMSectionRows & getPSMSectionRows() const
static MzTabParameter getMSRunSpectrumIdentifierType_(const std::vector< const PeptideIdentification * > &peptide_ids_)
const MzTabOligonucleotideSectionRows & getOligonucleotideSectionRows() const
~MzTab()=default
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()
static void getFeatureMapMetaValues_(const FeatureMap &feature_map, std::set< String > &feature_user_value_keys, std::set< String > &peptide_identification_user_value_keys, std::set< String > &peptide_hit_user_value_keys)
MzTabNucleicAcidSectionRows nucleic_acid_data_
Definition: MzTab.h:888
static std::map< Size, MzTabModificationMetaData > generateMzTabStringFromVariableModifications(const std::vector< String > &mods)
MzTabProteinSectionRows protein_data_
Definition: MzTab.h:884
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)
void setEmptyRows(const std::vector< Size > &empty)
static MzTabPeptideSectionRow peptideSectionRowFromFeature_(const Feature &c, const std::set< String > &feature_user_value_keys, const std::set< String > &peptide_identifications_user_value_keys, const std::set< String > &peptide_hit_user_value_keys, const std::vector< String > &fixed_mods)
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:885
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:883
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 getConsensusMapMetaValues_(const ConsensusMap &consensus_map, std::set< String > &consensus_feature_user_value_keys, std::set< String > &peptide_identification_user_value_keys, std::set< String > &peptide_hit_user_value_keys)
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:131
Representation of a protein identification run.
Definition: ProteinIdentification.h:76
Representation of a modification on an amino acid residue.
Definition: ResidueModification.h:79
A more convenient string class.
Definition: String.h:60
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
const double c
Definition: Constants.h:214
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
MzTabInteger taxid
NEWT taxonomy for the species.
Definition: MzTab.h:342
MzTabInteger end
Definition: MzTab.h:412
MzTabSpectraRef spectra_ref
Spectra identifying the peptide.
Definition: MzTab.h:259
MzTabDouble calc_mass_to_charge
Precursor ion’s m/z.
Definition: MzTab.h:339
std::vector< MzTabPSMSectionRow > MzTabPSMSectionRows
Definition: MzTab.h:464
std::map< Size, MzTabDouble > smallmolecule_abundance_assay
Definition: MzTab.h:353
MzTabString position
Definition: MzTab.h:113
MzTabString modifications
Modifications identified on the small molecule.
Definition: MzTab.h:352
MzTabString sequence
The peptide’s sequence.
Definition: MzTab.h:244
std::map< Size, MzTabInteger > num_oligos_distinct_ms_run
Definition: MzTab.h:374
MzTabDoubleList retention_time
Time points in seconds. Semantics may vary.
Definition: MzTab.h:254
MzTabDoubleList retention_time_window
Definition: MzTab.h:255
MzTabParameterList fragmentation_method
Definition: MzTab.h:129
std::vector< int > sample_refs
Definition: MzTab.h:135
MzTabParameter format
Definition: MzTab.h:126
std::map< Size, MzTabDouble > smallmolecule_abundance_std_error_study_variable
Definition: MzTab.h:356
std::vector< MzTabProteinSectionRow > MzTabProteinSectionRows
Definition: MzTab.h:462
std::map< Size, MzTabDouble > best_search_engine_score
Search engine(s) score(s) for the peptide.
Definition: MzTab.h:250
MzTabString smiles
Molecular structure in SMILES format.
Definition: MzTab.h:335
MzTabBoolean unique
0=false, 1=true, null else: Peptide is unique for the protein.
Definition: MzTab.h:246
MzTabString uri
Location of the PSMs source entry.
Definition: MzTab.h:258
std::vector< int > assay_refs
Definition: MzTab.h:134
MzTabModificationList modifications
Modifications identified in the peptide.
Definition: MzTab.h:253
MzTabParameter id_format
Definition: MzTab.h:128
MzTabInteger charge
Precursor ion’s charge.
Definition: MzTab.h:256
std::map< Size, MzTabDouble > smallmolecule_abundance_stdev_study_variable
Definition: MzTab.h:355
MzTabString database_version
Version (and optionally # of entries).
Definition: MzTab.h:248
std::map< Size, MzTabModificationMetaData > quantification_mod
Definition: MzTab.h:119
MzTabString description
Definition: MzTab.h:136
MzTabStringList identifier
The small molecule’s identifier.
Definition: MzTab.h:333
std::vector< MzTabPeptideSectionRow > MzTabPeptideSectionRows
Definition: MzTab.h:463
std::map< Size, std::map< Size, MzTabDouble > > search_engine_score_ms_run
Definition: MzTab.h:251
MzTabString accession
The protein’s accession.
Definition: MzTab.h:245
MzTabStringList ambiguity_members
Alternative nucleic acid identifications.
Definition: MzTab.h:376
MzTabDouble mass_to_charge
Precursor ion’s m/z.
Definition: MzTab.h:257
MzTabDouble coverage
(0-1) Fraction of nucleic acid sequence identified.
Definition: MzTab.h:381
MzTabParameter modification
Definition: MzTab.h:111
std::map< Size, MzTabInteger > num_oligos_unique_ms_run
Definition: MzTab.h:375
MzTabInteger start
Definition: MzTab.h:411
std::map< Size, MzTabDouble > peptide_abundance_std_error_study_variable
Definition: MzTab.h:263
MzTabString site
Definition: MzTab.h:112
MzTabString inchi_key
InChi Key of the identified compound.
Definition: MzTab.h:336
MzTabParameter quantification_reagent
Definition: MzTab.h:118
MzTabString location
Definition: MzTab.h:127
std::vector< MzTabOSMSectionRow > MzTabOSMSectionRows
Definition: MzTab.h:468
MzTabInteger reliability
(1-3) 0=null Identification reliability for the peptide.
Definition: MzTab.h:252
std::vector< int > ms_run_ref
Definition: MzTab.h:121
std::map< Size, MzTabInteger > num_osms_ms_run
Definition: MzTab.h:373
std::map< Size, MzTabDouble > search_engine_score
Search engine(s) score(s) for the match.
Definition: MzTab.h:435
MzTabStringList go_terms
List of GO terms for the nucleic acid.
Definition: MzTab.h:380
MzTabString pre
Definition: MzTab.h:409
MzTabDouble exp_mass_to_charge
Precursor ion’s m/z.
Definition: MzTab.h:338
std::map< Size, MzTabDouble > peptide_abundance_study_variable
Definition: MzTab.h:261
std::map< Size, MzTabDouble > smallmolecule_abundance_study_variable
Definition: MzTab.h:354
std::vector< MzTabOptionalColumnEntry > opt_
Optional columns must start with “opt_”.
Definition: MzTab.h:264
std::vector< MzTabOligonucleotideSectionRow > MzTabOligonucleotideSectionRows
Definition: MzTab.h:467
MzTabParameterList search_engine
Search engine(s) that identified the peptide.
Definition: MzTab.h:249
MzTabString post
Definition: MzTab.h:410
std::map< Size, MzTabDouble > peptide_abundance_stdev_study_variable
Definition: MzTab.h:262
std::map< Size, MzTabDouble > peptide_abundance_assay
Definition: MzTab.h:260
MzTabString chemical_formula
Chemical formula of the identified compound.
Definition: MzTab.h:334
MzTabString sample_ref
Definition: MzTab.h:120
std::vector< MzTabSmallMoleculeSectionRow > MzTabSmallMoleculeSectionRows
Definition: MzTab.h:465
MzTabString species
Human readable name of the species.
Definition: MzTab.h:343
std::vector< MzTabNucleicAcidSectionRow > MzTabNucleicAcidSectionRows
Definition: MzTab.h:466
MzTabString database
Name of the sequence database.
Definition: MzTab.h:247
Definition: MzTab.h:117
Definition: MzTab.h:125
Definition: MzTab.h:110
NUC - Nucleic acid section (table-based)
Definition: MzTab.h:362
OSM - OSM (oligonucleotide-spectrum match) section (table-based)
Definition: MzTab.h:432
OLI - Oligonucleotide section (table-based)
Definition: MzTab.h:397
PEP - Peptide section (Table based)
Definition: MzTab.h:243
SML Small molecule section (table based)
Definition: MzTab.h:332
Definition: MzTab.h:133
Comparison operator for sorting rows.
Definition: MzTab.h:386
bool operator()(const MzTabNucleicAcidSectionRow &row1, const MzTabNucleicAcidSectionRow &row2) const
Definition: MzTab.h:387
Comparison operator for sorting rows.
Definition: MzTab.h:448
bool operator()(const MzTabOSMSectionRow &row1, const MzTabOSMSectionRow &row2) const
Definition: MzTab.h:449
Comparison operator for sorting rows.
Definition: MzTab.h:417
bool operator()(const MzTabOligonucleotideSectionRow &row1, const MzTabOligonucleotideSectionRow &row2) const
Definition: MzTab.h:418
Comparison operator for sorting rows.
Definition: MzTab.h:313
bool operator()(const MzTabPSMSectionRow &row1, const MzTabPSMSectionRow &row2) const
Definition: MzTab.h:314
PSM - PSM section (Table based)
Definition: MzTab.h:281
MzTabSpectraRef spectra_ref
Spectrum for this PSM.
Definition: MzTab.h:297
MzTabDouble calc_mass_to_charge
The calculated m/z ratio of the experimental precursor ion.
Definition: MzTab.h:295
MzTabString start
(List of) Start positions in parent protein(s)
Definition: MzTab.h:300
MzTabString sequence
The peptide’s sequence.
Definition: MzTab.h:282
MzTabDoubleList retention_time
Time points in seconds. Semantics may vary.
Definition: MzTab.h:292
MzTabBoolean unique
0=false, 1=true, null else: Peptide is unique for the protein.
Definition: MzTab.h:285
MzTabString uri
Location of the PSM’s source entry.
Definition: MzTab.h:296
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:291
MzTabInteger charge
The charge of the experimental precursor ion.
Definition: MzTab.h:293
MzTabString database_version
Version (and optionally # of entries).
Definition: MzTab.h:287
MzTabString accession
List of potential parent protein accessions as in the fasta DB.
Definition: MzTab.h:284
MzTabString end
(List of) Start positions in parent protein(s)
Definition: MzTab.h:301
MzTabInteger reliability
(1-3) 0=null Identification reliability for the peptide.
Definition: MzTab.h:290
std::map< Size, MzTabDouble > search_engine_score
Search engine(s) score(s) for the peptide.
Definition: MzTab.h:289
MzTabString pre
(List of) Amino acid in parent protein(s) before the start of the current PSM
Definition: MzTab.h:298
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:294
std::vector< MzTabOptionalColumnEntry > opt_
Optional columns must start with “opt_”.
Definition: MzTab.h:302
MzTabParameterList search_engine
Search engine(s) that identified the peptide.
Definition: MzTab.h:288
MzTabString post
(List of) Amino acid in parent protein(s) after the start of the current PSM
Definition: MzTab.h:299
MzTabInteger PSM_ID
A unique ID of a PSM line.
Definition: MzTab.h:283
MzTabString database
Name of the sequence database.
Definition: MzTab.h:286
Comparison operator for sorting rows.
Definition: MzTab.h:269
bool operator()(const MzTabPeptideSectionRow &row1, const MzTabPeptideSectionRow &row2) const
Definition: MzTab.h:270
Comparison operator for sorting rows.
Definition: MzTab.h:232
bool operator()(const MzTabProteinSectionRow &row1, const MzTabProteinSectionRow &row2) const
Definition: MzTab.h:233
PRT - Protein section (Table based)
Definition: MzTab.h:204
MzTabInteger taxid
NEWT taxonomy for the species.
Definition: MzTab.h:208
std::map< Size, MzTabDouble > protein_abundance_assay
Definition: MzTab.h:224
std::map< Size, MzTabDouble > best_search_engine_score
best_search_engine_score[1-n]
Definition: MzTab.h:213
MzTabString uri
Location of the protein’s source entry.
Definition: MzTab.h:221
std::map< Size, MzTabDouble > protein_abundance_std_error_study_variable
Definition: MzTab.h:227
MzTabModificationList modifications
Modifications identified in the protein.
Definition: MzTab.h:220
MzTabString database_version
String Version of the protein database.
Definition: MzTab.h:211
MzTabString description
Human readable description (i.e. the name)
Definition: MzTab.h:207
std::map< Size, MzTabInteger > num_peptides_distinct_ms_run
Definition: MzTab.h:217
std::map< Size, MzTabDouble > protein_abundance_study_variable
Definition: MzTab.h:225
std::map< Size, std::map< Size, MzTabDouble > > search_engine_score_ms_run
search_engine_score[index1]_ms_run[index2]
Definition: MzTab.h:214
MzTabString accession
The protein’s accession.
Definition: MzTab.h:206
MzTabStringList ambiguity_members
Alternative protein identifications.
Definition: MzTab.h:219
MzTabDouble coverage
(0-1) Amount of protein sequence identified.
Definition: MzTab.h:223
MzTabInteger reliability
Definition: MzTab.h:215
std::map< Size, MzTabInteger > num_psms_ms_run
Definition: MzTab.h:216
MzTabStringList go_terms
List of GO terms for the protein.
Definition: MzTab.h:222
std::map< Size, MzTabInteger > num_peptides_unique_ms_run
Definition: MzTab.h:218
std::map< Size, MzTabDouble > protein_abundance_stdev_study_variable
Definition: MzTab.h:226
std::vector< MzTabOptionalColumnEntry > opt_
Optional Columns must start with “opt_”
Definition: MzTab.h:228
MzTabParameterList search_engine
Search engine(s) identifying the protein.
Definition: MzTab.h:212
MzTabString species
Human readable name of the species.
Definition: MzTab.h:209
MzTabString database
Name of the protein database.
Definition: MzTab.h:210