35 #ifndef OPENMS_FORMAT_MZTABFILE_H 36 #define OPENMS_FORMAT_MZTABFILE_H 45 #include <boost/math/special_functions/fpclassify.hpp> 67 typedef std::map<std::pair<String, String>, std::vector<PeptideHit> >
MapAccPepType;
70 void store(
const String& filename,
const MzTab& mz_tab)
const;
73 void storeProteinReliabilityColumn(
bool store);
74 void storePeptideReliabilityColumn(
bool store);
75 void storePSMReliabilityColumn(
bool store);
76 void storeSmallMoleculeReliabilityColumn(
bool store);
77 void storeProteinUriColumn(
bool store);
78 void storePeptideUriColumn(
bool store);
79 void storePSMUriColumn(
bool store);
80 void storeSmallMoleculeUriColumn(
bool store);
81 void storeProteinGoTerms(
bool store);
101 String generateMzTabProteinHeader_(
const MzTabProteinSectionRow& reference_row,
const Size n_best_search_engine_scores,
const std::vector<String>& optional_columns)
const;
107 String generateMzTabPeptideHeader_(
Size search_ms_runs,
Size n_best_search_engine_scores,
Size n_search_engine_score,
Size assays,
Size study_variables,
const std::vector<String>& optional_columns)
const;
113 String generateMzTabPSMHeader_(
Size n_search_engine_scores,
const std::vector<String>& optional_columns)
const;
115 String generateMzTabPSMSectionRow_(
const MzTabPSMSectionRow& row,
const std::vector<String>& optional_columns)
const;
119 String generateMzTabSmallMoleculeHeader_(
Size search_ms_runs,
Size n_best_search_engine_scores,
Size n_search_engine_score,
Size assays,
Size study_variables,
const std::vector<String>& optional_columns)
const;
125 static std::pair<int, int> extractIndexPairsFromBrackets_(
const String& s);
127 static void sortPSM_(std::vector<PeptideIdentification>::iterator begin, std::vector<PeptideIdentification>::iterator end);
129 static void keepFirstPSM_(std::vector<PeptideIdentification>::iterator begin, std::vector<PeptideIdentification>::iterator end);
132 static void partitionIntoRuns_(
const std::vector<PeptideIdentification>& pep_ids,
133 const std::vector<ProteinIdentification>& pro_ids,
134 std::map<
String, std::vector<PeptideIdentification> >& map_run_to_pepids,
135 std::map<
String, std::vector<ProteinIdentification> >& map_run_to_proids
140 static void createProteinToPeptideLinks_(
const std::map<
String, std::vector<PeptideIdentification> >& map_run_to_pepids, MapAccPepType& map_run_accession_to_pephits);
149 static String mapSearchEngineToCvParam_(
const String& openms_search_engine_name);
151 static String mapSearchEngineScoreToCvParam_(
const String& openms_search_engine_name,
double score,
String score_type);
153 static String extractNumPeptides_(
const String& common_identifier,
const String& protein_accession,
154 const MapAccPepType& map_run_accession_to_peptides);
157 static String extractNumPeptidesDistinct_(
String common_identifier,
String protein_accession,
158 const MapAccPepType& map_run_accession_to_peptides);
161 static String extractNumPeptidesUnambiguous_(
String common_identifier,
String protein_accession,
162 const MapAccPepType& map_run_accession_to_peptides);
164 static std::map<String, Size> extractNumberOfSubSamples_(
const std::map<
String, std::vector<ProteinIdentification> >& map_run_to_proids);
166 static void writePeptideHeader_(
SVOutStream& output, std::map<String, Size> n_sub_samples);
168 static void writeProteinHeader_(
SVOutStream& output, std::map<String, Size> n_sub_samples);
175 const MapAccPepType& map_run_accession_to_peptides,
176 const std::map<String, Size>& map_run_to_num_sub
183 #endif // OPENMS_FORMAT_MZTABFILE_H Representation of a protein identification run.
Definition: ProteinIdentification.h:62
bool store_protein_reliability_
Definition: MzTabFile.h:87
A more convenient string class.
Definition: String.h:57
bool store_smallmolecule_uri_
Definition: MzTabFile.h:94
std::vector< MzTabSmallMoleculeSectionRow > MzTabSmallMoleculeSectionRows
Definition: MzTab.h:692
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool store_protein_goterms_
Definition: MzTabFile.h:95
bool store_protein_uri_
Definition: MzTabFile.h:91
std::vector< MzTabProteinSectionRow > MzTabProteinSectionRows
Definition: MzTab.h:689
bool store_peptide_reliability_
Definition: MzTabFile.h:88
bool store_peptide_uri_
Definition: MzTabFile.h:92
bool store_psm_reliability_
Definition: MzTabFile.h:89
Representation of a peptide hit.
Definition: PeptideHit.h:55
File adapter for MzTab files.
Definition: MzTabFile.h:59
std::vector< MzTabPeptideSectionRow > MzTabPeptideSectionRows
Definition: MzTab.h:690
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:74
bool store_psm_uri_
Definition: MzTabFile.h:93
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Stream class for writing to comma/tab/...-separated values files.
Definition: SVOutStream.h:55
std::vector< MzTabPSMSectionRow > MzTabPSMSectionRows
Definition: MzTab.h:691
bool store_smallmolecule_reliability_
Definition: MzTabFile.h:90
std::map< std::pair< String, String >, std::vector< PeptideHit > > MapAccPepType
Definition: MzTabFile.h:67
Data model of MzTab files. Please see the official MzTab specification at https://code.google.com/p/mztab/.
Definition: MzTab.h:700