OpenMS
SequestOutfile.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Martin Langwisch $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
15 #include <map>
16 #include <vector>
17 #include <cmath>
18 
19 namespace OpenMS
20 {
21  class ProteinIdentification;
22  class DateTime;
23 
35  class OPENMS_DLLAPI SequestOutfile
36  {
37 public:
40 
42  SequestOutfile(const SequestOutfile & sequest_outfile);
43 
45  virtual ~SequestOutfile();
46 
48  SequestOutfile & operator=(const SequestOutfile & sequest_outfile);
49 
51  bool operator==(const SequestOutfile & sequest_outfile) const;
52 
71  void load(const String & result_filename, std::vector<PeptideIdentification> & peptide_identifications, ProteinIdentification & protein_identification, const double p_value_threshold, std::vector<double> & pvalues, const String & database = "", const bool ignore_proteins_per_peptide = false);
72 
73 // /// retrieve the p-values from the out files
74 // void getPValuesFromOutFiles(vector< pair < String, vector< double > > >& filenames_and_pvalues) throw (Exception::FileNotFound&, Exception::ParseError);
75 
77  bool getColumns(const String & line, std::vector<String> & substrings, Size number_of_columns, Size reference_column);
78 
87  void getSequences(const String & database_filename, const std::map<String, Size> & ac_position_map, std::vector<String> & sequences, std::vector<std::pair<String, Size> > & found, std::map<String, Size> & not_found);
88 
91  void getACAndACType(String line, String & accession, String & accession_type);
92 
98  void readOutHeader(const String & result_filename, DateTime & datetime, double & precursor_mz_value, Int & charge, Size & precursor_mass_type, Size & ion_mass_type, Size & displayed_peptides, String & sequest, String & sequest_version, String & database_type, Int & number_column, Int & rank_sp_column, Int & id_column, Int & mh_column, Int & delta_cn_column, Int & xcorr_column, Int & sp_column, Int & sf_column, Int & ions_column, Int & reference_column, Int & peptide_column, Int & score_column, Size & number_of_columns);
99 
100 private:
101 
102  static double const_weights_[];
103  static double xcorr_weights_[];
104  static double delta_cn_weights_[];
105  static double rank_sp_weights_[];
106  static double delta_mass_weights_[];
107  static Size max_pep_lens_[];
108  static Size num_frags_[];
109  };
110 
111 } //namespace OpenMS
112 
DateTime Class.
Definition: DateTime.h:33
Representation of a protein identification run.
Definition: ProteinIdentification.h:50
Representation of a Sequest output file.
Definition: SequestOutfile.h:36
bool operator==(const SequestOutfile &sequest_outfile) const
equality operator
void getSequences(const String &database_filename, const std::map< String, Size > &ac_position_map, std::vector< String > &sequences, std::vector< std::pair< String, Size > > &found, std::map< String, Size > &not_found)
SequestOutfile()
Constructor.
void readOutHeader(const String &result_filename, DateTime &datetime, double &precursor_mz_value, Int &charge, Size &precursor_mass_type, Size &ion_mass_type, Size &displayed_peptides, String &sequest, String &sequest_version, String &database_type, Int &number_column, Int &rank_sp_column, Int &id_column, Int &mh_column, Int &delta_cn_column, Int &xcorr_column, Int &sp_column, Int &sf_column, Int &ions_column, Int &reference_column, Int &peptide_column, Int &score_column, Size &number_of_columns)
bool getColumns(const String &line, std::vector< String > &substrings, Size number_of_columns, Size reference_column)
retrieve columns from a Sequest outfile line
SequestOutfile(const SequestOutfile &sequest_outfile)
copy constructor
virtual ~SequestOutfile()
destructor
void getACAndACType(String line, String &accession, String &accession_type)
void load(const String &result_filename, std::vector< PeptideIdentification > &peptide_identifications, ProteinIdentification &protein_identification, const double p_value_threshold, std::vector< double > &pvalues, const String &database="", const bool ignore_proteins_per_peptide=false)
loads data from a Sequest outfile
SequestOutfile & operator=(const SequestOutfile &sequest_outfile)
assignment operator
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19