| OpenMS 2.5.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
MzTab Class Reference
Format » File IO

Data model of MzTab files. Please see the official MzTab specification at https://code.google.com/p/mztab/. More...

`#include <OpenMS/FORMAT/MzTab.h>`

## Public Member Functions

| MzTab ()
| Default constructor. More...
virtual | ~MzTab ()
| Destructor. More...
const MzTabMetaData & | getMetaData () const
void | setMetaData (const MzTabMetaData &md)
const MzTabProteinSectionRows & | getProteinSectionRows () const
void | setProteinSectionRows (const MzTabProteinSectionRows &psd)
const MzTabPeptideSectionRows & | getPeptideSectionRows () const
void | setPeptideSectionRows (const MzTabPeptideSectionRows &psd)
const MzTabPSMSectionRows & | getPSMSectionRows () const
void | setPSMSectionRows (const MzTabPSMSectionRows &psd)
const MzTabSmallMoleculeSectionRows & | getSmallMoleculeSectionRows () const
void | setSmallMoleculeSectionRows (const MzTabSmallMoleculeSectionRows &smsd)
const MzTabNucleicAcidSectionRows & | getNucleicAcidSectionRows () const
void | setNucleicAcidSectionRows (const MzTabNucleicAcidSectionRows &nasd)
const MzTabOligonucleotideSectionRows & | getOligonucleotideSectionRows () const
void | setOligonucleotideSectionRows (const MzTabOligonucleotideSectionRows &onsd)
const MzTabOSMSectionRows & | getOSMSectionRows () const
void | setOSMSectionRows (const MzTabOSMSectionRows &osd)
void | setCommentRows (const std::map< Size, String > &com)
void | setEmptyRows (const std::vector< Size > &empty)
const std::vector< Size > & | getEmptyRows () const
const std::map< Size, String > & | getCommentRows () const
std::vector< String > | getProteinOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...
std::vector< String > | getPeptideOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...
std::vector< String > | getPSMOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...
std::vector< String > | getSmallMoleculeOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...
std::vector< String > | getNucleicAcidOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...
std::vector< String > | getOligonucleotideOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...
std::vector< String > | getOSMOptionalColumnNames () const
| Extract opt_ (custom, optional column names) More...

## Static Public Member Functions

static void | addPepEvidenceToRows (const std::vector< PeptideEvidence > &peptide_evidences, MzTabPSMSectionRow &row, MzTabPSMSectionRows &rows)
| Gets peptide_evidences with data from internal structures adds their info to an MzTabPSMSectionRow (pre- or unfilled) More...
static void | addMetaInfoToOptionalColumns (const std::set< String > &keys, std::vector< MzTabOptionalColumnEntry > &opt, const String &id, const MetaInfoInterface &meta)
static std::map< Size, MzTabModificationMetaData > | generateMzTabStringFromModifications (const std::vector< String > &mods)
static std::map< Size, MzTabModificationMetaData > | generateMzTabStringFromVariableModifications (const std::vector< String > &mods)
static std::map< Size, MzTabModificationMetaData > | generateMzTabStringFromFixedModifications (const std::vector< String > &mods)
static MzTab | exportFeatureMapToMzTab (const FeatureMap &feature_map, const String &filename)
static MzTab | exportIdentificationsToMzTab (const std::vector< ProteinIdentification > &prot_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &filename, bool first_run_inference_only, std::map< std::pair< size_t, size_t >, size_t > &map_run_fileidx_2_msfileidx, std::map< String, size_t > &idrun_2_run_index, bool export_empty_pep_ids=false)
| Export peptide and protein identifications to mzTab. More...
static MzTabModificationList | extractModificationListFromAASequence (const AASequence &aas, const std::vector< String > &fixed_mods=std::vector< String >())
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 String &title="ConsensusMap export from OpenMS")
| export linked peptide features aka consensus map More...

## Protected Member Functions

template<typename SectionRows >
std::vector< String > | getOptionalColumnNames_ (const SectionRows &rows) const
| Helper function for "get...OptionalColumnNames" functions. More...

## Static Protected Member Functions

static void | checkSequenceUniqueness_ (const std::vector< PeptideIdentification > &curr_pep_ids)

## Protected Attributes

MzTabMetaData | meta_data_
MzTabProteinSectionRows | protein_data_
MzTabPeptideSectionRows | peptide_data_
MzTabPSMSectionRows | psm_data_
MzTabSmallMoleculeSectionRows | small_molecule_data_
MzTabNucleicAcidSectionRows | nucleic_acid_data_
MzTabOligonucleotideSectionRows | oligonucleotide_data_
MzTabOSMSectionRows | osm_data_
| / oligonucleotide-spectrum matches More...
std::vector< Size > | empty_rows_
| index of empty rows More...
std::map< Size, String > | comment_rows_
| comments More...

## Detailed Description

Data model of MzTab files. Please see the official MzTab specification at https://code.google.com/p/mztab/.

## Constructor & Destructor Documentation

## ◆ MzTab()

MzTab | ( |  | ) |

Default constructor.

## ◆ ~MzTab()

virtual ~MzTab | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## ◆ addMetaInfoToOptionalColumns()

static void addMetaInfoToOptionalColumns | ( | const std::set< String > & | keys,
|  | std::vector< MzTabOptionalColumnEntry > & | opt,
|  | const String & | id,
|  | const MetaInfoInterface & | meta
| ) |  |

static

## ◆ addPepEvidenceToRows()

static void addPepEvidenceToRows | ( | const std::vector< PeptideEvidence > & | peptide_evidences,
|  | MzTabPSMSectionRow & | row,
|  | MzTabPSMSectionRows & | rows
| ) |  |

static

Gets peptide_evidences with data from internal structures adds their info to an MzTabPSMSectionRow (pre- or unfilled)

Parameters

  peptide_evidences | Vector of PeptideEvidence holding internal data.
  row | Pre- or unfilled MzTabPSMSectionRow to be filled with the data.
  rows | Vector of MzTabPSMSectionRow to add the differently updated rows to.

## ◆ checkSequenceUniqueness_()

static void checkSequenceUniqueness_ | ( | const std::vector< PeptideIdentification > & | curr_pep_ids | ) |

static protected

## ◆ exportConsensusMapToMzTab()

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 String & | title = `"ConsensusMap export from OpenMS"`
| ) |  |

static

export linked peptide features aka consensus map

Parameters

  consensus_map | data structure of the linked peptide features
  filename | input consensusXML file name
  export_unidentified_features | Should not identified peptide features be exported?
  export_unassigned_ids | Should unassigned identifications be exported?
  export_subfeatures | The position of the consensus feature will always be exported. Should the individual subfeatures be exported as well?

Returns
  mzTab object

Referenced by UTILProteomicsLFQ::main_().

## ◆ exportFeatureMapToMzTab()

static MzTab exportFeatureMapToMzTab | ( | const FeatureMap & | feature_map,
|  | const String & | filename
| ) |  |

static

## ◆ exportIdentificationsToMzTab()

static MzTab exportIdentificationsToMzTab | ( | const std::vector< ProteinIdentification > & | prot_ids,
|  | const std::vector< PeptideIdentification > & | peptide_ids,
|  | const String & | filename,
|  | bool | first_run_inference_only,
|  | std::map< std::pair< size_t, size_t >, size_t > & | map_run_fileidx_2_msfileidx,
|  | std::map< String, size_t > & | idrun_2_run_index,
|  | bool | export_empty_pep_ids = `false`
| ) |  |

static

Export peptide and protein identifications to mzTab.

Additionally this function fills two std::maps with mappings for external usage.

Parameters

  [in] | prot_ids | Data structure containing protein identifications
  [in] | peptide_ids | Data structure containing peptide identifications
  [in] | filename | Input idXML file name
  [in] | first_run_inference_only | Is all protein inference information stored in the first run?
  [out] | map_run_fileidx_2_msfileidx | Mapping from (run index, input file index) to experimental design file index. The experimental design file index is either given, or a simplified version created from the input file index on the fly.
  [out] | idrun_2_run_index | Mapping from protein identification identifier (search engine + date) to run index, i.e. for storing file origins from different runs

Returns
  mzTab object

## ◆ extractModificationListFromAASequence()

static MzTabModificationList extractModificationListFromAASequence | ( | const AASequence & | aas,
|  | const std::vector< String > & | fixed_mods = `std::vector< String >()`
| ) |  |

static

Generate MzTab style list of PTMs from AASequence object. All passed fixed modifications are not reported (as suggested by the standard for the PRT and PEP section). In contrast, all modifications are reported in the PSM section (see standard document for details).

## ◆ generateMzTabStringFromFixedModifications()

static std::map<Size, MzTabModificationMetaData> generateMzTabStringFromFixedModifications | ( | const std::vector< String > & | mods | ) |

static

## ◆ generateMzTabStringFromModifications()

static std::map<Size, MzTabModificationMetaData> generateMzTabStringFromModifications | ( | const std::vector< String > & | mods | ) |

static

## ◆ generateMzTabStringFromVariableModifications()

static std::map<Size, MzTabModificationMetaData> generateMzTabStringFromVariableModifications | ( | const std::vector< String > & | mods | ) |

static

## ◆ getCommentRows()

const std::map<Size, String>& getCommentRows | ( |  | ) | const

## ◆ getEmptyRows()

const std::vector<Size>& getEmptyRows | ( |  | ) | const

## ◆ getMetaData()

const MzTabMetaData& getMetaData | ( |  | ) | const

## ◆ getNucleicAcidOptionalColumnNames()

std::vector<String> getNucleicAcidOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getNucleicAcidSectionRows()

const MzTabNucleicAcidSectionRows& getNucleicAcidSectionRows | ( |  | ) | const

Referenced by NucleicAcidSearchEngine::main_().

## ◆ getOligonucleotideOptionalColumnNames()

std::vector<String> getOligonucleotideOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getOligonucleotideSectionRows()

const MzTabOligonucleotideSectionRows& getOligonucleotideSectionRows | ( |  | ) | const

Referenced by NucleicAcidSearchEngine::main_().

## ◆ getOptionalColumnNames_()

std::vector<String> getOptionalColumnNames_ | ( | const SectionRows & | rows | ) | const

inline protected

Helper function for "get...OptionalColumnNames" functions.

References seqan::find().

## ◆ getOSMOptionalColumnNames()

std::vector<String> getOSMOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getOSMSectionRows()

const MzTabOSMSectionRows& getOSMSectionRows | ( |  | ) | const

Referenced by NucleicAcidSearchEngine::main_().

## ◆ getPeptideOptionalColumnNames()

std::vector<String> getPeptideOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getPeptideSectionRows()

const MzTabPeptideSectionRows& getPeptideSectionRows | ( |  | ) | const

## ◆ getProteinOptionalColumnNames()

std::vector<String> getProteinOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getProteinSectionRows()

const MzTabProteinSectionRows& getProteinSectionRows | ( |  | ) | const

## ◆ getPSMOptionalColumnNames()

std::vector<String> getPSMOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getPSMSectionRows()

const MzTabPSMSectionRows& getPSMSectionRows | ( |  | ) | const

## ◆ getSmallMoleculeOptionalColumnNames()

std::vector<String> getSmallMoleculeOptionalColumnNames | ( |  | ) | const

Extract opt_ (custom, optional column names)

## ◆ getSmallMoleculeSectionRows()

const MzTabSmallMoleculeSectionRows& getSmallMoleculeSectionRows | ( |  | ) | const

## ◆ setCommentRows()

void setCommentRows | ( | const std::map< Size, String > & | com | ) |

## ◆ setEmptyRows()

void setEmptyRows | ( | const std::vector< Size > & | empty | ) |

## ◆ setMetaData()

void setMetaData | ( | const MzTabMetaData & | md | ) |

## ◆ setNucleicAcidSectionRows()

void setNucleicAcidSectionRows | ( | const MzTabNucleicAcidSectionRows & | nasd | ) |

## ◆ setOligonucleotideSectionRows()

void setOligonucleotideSectionRows | ( | const MzTabOligonucleotideSectionRows & | onsd | ) |

## ◆ setOSMSectionRows()

void setOSMSectionRows | ( | const MzTabOSMSectionRows & | osd | ) |

## ◆ setPeptideSectionRows()

void setPeptideSectionRows | ( | const MzTabPeptideSectionRows & | psd | ) |

## ◆ setProteinSectionRows()

void setProteinSectionRows | ( | const MzTabProteinSectionRows & | psd | ) |

## ◆ setPSMSectionRows()

void setPSMSectionRows | ( | const MzTabPSMSectionRows & | psd | ) |

## ◆ setSmallMoleculeSectionRows()

void setSmallMoleculeSectionRows | ( | const MzTabSmallMoleculeSectionRows & | smsd | ) |

## Member Data Documentation

## ◆ comment_rows_

std::map<Size, String> comment_rows_

protected

comments

## ◆ empty_rows_

std::vector<Size> empty_rows_

protected

index of empty rows

## ◆ meta_data_

MzTabMetaData meta_data_

protected

## ◆ nucleic_acid_data_

MzTabNucleicAcidSectionRows nucleic_acid_data_

protected

## ◆ oligonucleotide_data_

MzTabOligonucleotideSectionRows oligonucleotide_data_

protected

## ◆ osm_data_

MzTabOSMSectionRows osm_data_

protected

/ oligonucleotide-spectrum matches

## ◆ peptide_data_

MzTabPeptideSectionRows peptide_data_

protected

## ◆ protein_data_

MzTabProteinSectionRows protein_data_

protected

## ◆ psm_data_

MzTabPSMSectionRows psm_data_

protected

## ◆ small_molecule_data_

MzTabSmallMoleculeSectionRows small_molecule_data_

protected