OpenMS  2.5.0
Static Public Member Functions | Static Protected Member Functions | List of all members
IdentificationDataConverter Class Reference

#include <OpenMS/METADATA/ID/IdentificationDataConverter.h>

Static Public Member Functions

static void importIDs (IdentificationData &id_data, const std::vector< ProteinIdentification > &proteins, const std::vector< PeptideIdentification > &peptides)
 Import from legacy peptide/protein identifications. More...
 
static void exportIDs (const IdentificationData &id_data, std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides, bool export_oligonucleotides=false)
 Export to legacy peptide/protein identifications. More...
 
static MzTab exportMzTab (const IdentificationData &id_data)
 Export to mzTab format. More...
 
static void importSequences (IdentificationData &id_data, const std::vector< FASTAFile::FASTAEntry > &fasta, IdentificationData::MoleculeType type=IdentificationData::MoleculeType::PROTEIN, const String &decoy_pattern="")
 Import FASTA sequences as parent molecules. More...
 

Static Protected Member Functions

template<typename MzTabSectionRow >
static void exportParentMoleculeToMzTab_ (const IdentificationData::ParentMolecule &parent, std::vector< MzTabSectionRow > &output, std::map< IdentificationData::ScoreTypeRef, Size > &score_map)
 Export a parent molecule (protein or nucleic acid) to mzTab. More...
 
template<typename MzTabSectionRow , typename IdentSeq >
static void exportPeptideOrOligoToMzTab_ (const IdentSeq &identified, std::vector< MzTabSectionRow > &output, std::map< IdentificationData::ScoreTypeRef, Size > &score_map)
 Export an identified sequence (peptide or oligonucleotide, but not small molecule/compound) to mzTab. More...
 
template<typename MzTabSectionRow >
static void exportQueryMatchToMzTab_ (const String &sequence, const IdentificationData::MoleculeQueryMatch &match, double calc_mass, std::vector< MzTabSectionRow > &output, std::map< IdentificationData::ScoreTypeRef, Size > &score_map, std::map< IdentificationData::InputFileRef, Size > &file_map)
 Export a molecule-query match (peptide- or oligonucleotide-spectrum match) to mzTab. More...
 
static void exportStepsAndScoresToMzTab_ (const IdentificationData::AppliedProcessingSteps &steps_and_scores, MzTabParameterList &steps_out, std::map< Size, MzTabDouble > &scores_out, std::map< IdentificationData::ScoreTypeRef, Size > &score_map)
 Helper function to add processing steps (search engines) and their scores to MzTab. More...
 
static void addMzTabSEScores_ (const std::map< IdentificationData::ScoreTypeRef, Size > &scores, std::map< Size, MzTabParameter > &output)
 Helper function to add search engine score entries to MzTab's meta data section. More...
 
static void addMzTabMoleculeParentContext_ (const std::set< IdentificationData::MoleculeParentMatch > &matches, MzTabOligonucleotideSectionRow &row)
 Helper function for exportPeptideOrOligoToMzTab_() - oligonucleotide variant. More...
 
static void addMzTabMoleculeParentContext_ (const std::set< IdentificationData::MoleculeParentMatch > &matches, MzTabPeptideSectionRow &row)
 Helper function for exportPeptideOrOligoToMzTab_() - peptide variant. More...
 
static IdentificationData::SearchParamRef importDBSearchParameters_ (const ProteinIdentification::SearchParameters &pisp, IdentificationData &id_data)
 Helper function to import DB search parameters from legacy format. More...
 
static ProteinIdentification::SearchParameters exportDBSearchParameters_ (IdentificationData::SearchParamRef ref)
 Helper function to export DB search parameters to legacy format. More...
 
static void exportMSRunInformation_ (IdentificationData::ProcessingStepRef step_ref, ProteinIdentification &protein)
 Helper function to export (primary) MS run information to legacy format. More...
 

Member Function Documentation

◆ addMzTabMoleculeParentContext_() [1/2]

static void addMzTabMoleculeParentContext_ ( const std::set< IdentificationData::MoleculeParentMatch > &  matches,
MzTabOligonucleotideSectionRow row 
)
staticprotected

Helper function for exportPeptideOrOligoToMzTab_() - oligonucleotide variant.

◆ addMzTabMoleculeParentContext_() [2/2]

static void addMzTabMoleculeParentContext_ ( const std::set< IdentificationData::MoleculeParentMatch > &  matches,
MzTabPeptideSectionRow row 
)
staticprotected

Helper function for exportPeptideOrOligoToMzTab_() - peptide variant.

◆ addMzTabSEScores_()

static void addMzTabSEScores_ ( const std::map< IdentificationData::ScoreTypeRef, Size > &  scores,
std::map< Size, MzTabParameter > &  output 
)
staticprotected

Helper function to add search engine score entries to MzTab's meta data section.

◆ exportDBSearchParameters_()

static ProteinIdentification::SearchParameters exportDBSearchParameters_ ( IdentificationData::SearchParamRef  ref)
staticprotected

Helper function to export DB search parameters to legacy format.

◆ exportIDs()

static void exportIDs ( const IdentificationData id_data,
std::vector< ProteinIdentification > &  proteins,
std::vector< PeptideIdentification > &  peptides,
bool  export_oligonucleotides = false 
)
static

Export to legacy peptide/protein identifications.

Referenced by NucleicAcidSearchEngine::main_().

◆ exportMSRunInformation_()

static void exportMSRunInformation_ ( IdentificationData::ProcessingStepRef  step_ref,
ProteinIdentification protein 
)
staticprotected

Helper function to export (primary) MS run information to legacy format.

◆ exportMzTab()

static MzTab exportMzTab ( const IdentificationData id_data)
static

Export to mzTab format.

Referenced by NucleicAcidSearchEngine::main_().

◆ exportParentMoleculeToMzTab_()

static void exportParentMoleculeToMzTab_ ( const IdentificationData::ParentMolecule parent,
std::vector< MzTabSectionRow > &  output,
std::map< IdentificationData::ScoreTypeRef, Size > &  score_map 
)
inlinestaticprotected

◆ exportPeptideOrOligoToMzTab_()

static void exportPeptideOrOligoToMzTab_ ( const IdentSeq &  identified,
std::vector< MzTabSectionRow > &  output,
std::map< IdentificationData::ScoreTypeRef, Size > &  score_map 
)
inlinestaticprotected

Export an identified sequence (peptide or oligonucleotide, but not small molecule/compound) to mzTab.

◆ exportQueryMatchToMzTab_()

static void exportQueryMatchToMzTab_ ( const String sequence,
const IdentificationData::MoleculeQueryMatch match,
double  calc_mass,
std::vector< MzTabSectionRow > &  output,
std::map< IdentificationData::ScoreTypeRef, Size > &  score_map,
std::map< IdentificationData::InputFileRef, Size > &  file_map 
)
inlinestaticprotected

◆ exportStepsAndScoresToMzTab_()

static void exportStepsAndScoresToMzTab_ ( const IdentificationData::AppliedProcessingSteps steps_and_scores,
MzTabParameterList steps_out,
std::map< Size, MzTabDouble > &  scores_out,
std::map< IdentificationData::ScoreTypeRef, Size > &  score_map 
)
staticprotected

Helper function to add processing steps (search engines) and their scores to MzTab.

◆ importDBSearchParameters_()

static IdentificationData::SearchParamRef importDBSearchParameters_ ( const ProteinIdentification::SearchParameters pisp,
IdentificationData id_data 
)
staticprotected

Helper function to import DB search parameters from legacy format.

◆ importIDs()

static void importIDs ( IdentificationData id_data,
const std::vector< ProteinIdentification > &  proteins,
const std::vector< PeptideIdentification > &  peptides 
)
static

Import from legacy peptide/protein identifications.

◆ importSequences()

static void importSequences ( IdentificationData id_data,
const std::vector< FASTAFile::FASTAEntry > &  fasta,
IdentificationData::MoleculeType  type = IdentificationData::MoleculeType::PROTEIN,
const String decoy_pattern = "" 
)
static

Import FASTA sequences as parent molecules.

Referenced by NucleicAcidSearchEngine::main_().