OpenMS  2.5.0
SequestInfile.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-2020.
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: Martin Langwisch $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
38 
39 #include <map>
40 
41 
42 namespace OpenMS
43 {
51  class OPENMS_DLLAPI SequestInfile
52  {
53 public:
55  SequestInfile();
56 
58  SequestInfile(const SequestInfile & sequest_infile);
59 
61  virtual ~SequestInfile();
62 
64  SequestInfile & operator=(const SequestInfile & sequest_infile);
65 
67  bool operator==(const SequestInfile & sequest_infile) const;
68 
73  void store(const String & filename);
74 
76  const String getEnzymeInfoAsString() const;
77 
79  const String & getDatabase() const;
81  void setDatabase(const String & database);
82 
84  const String & getNeutralLossesForIons() const;
86  void setNeutralLossesForIons(const String & neutral_losses_for_ions);
87 
89  const String & getIonSeriesWeights() const;
91  void setIonSeriesWeights(const String & ion_series_weights);
92 
94  const String & getPartialSequence() const;
96  void setPartialSequence(const String & partial_sequence);
97 
99  const String & getSequenceHeaderFilter() const;
101  void setSequenceHeaderFilter(const String & sequence_header_filter);
102 
104  const String & getProteinMassFilter() const;
106  void setProteinMassFilter(const String & protein_mass_filter);
107 
108 
110  float getPeakMassTolerance() const;
112  void setPeakMassTolerance(float peak_mass_tolerance);
113 
115  float getPrecursorMassTolerance() const;
117  void setPrecursorMassTolerance(float precursor_mass_tolerance);
118 
120  float getMatchPeakTolerance() const;
122  void setMatchPeakTolerance(float match_peak_tolerance);
123 
125  float getIonCutoffPercentage() const;
127  void setIonCutoffPercentage(float ion_cutoff_percentage);
128 
130  Size getPeptideMassUnit() const;
132  void setPeptideMassUnit(Size peptide_mass_unit);
133 
135  Size getOutputLines() const;
137  void setOutputLines(Size output_lines);
138 
140  Size getEnzymeNumber() const;
142  String getEnzymeName() const;
144  Size setEnzyme(String enzyme_name);
145 
147  Size getMaxAAPerModPerPeptide() const;
149  void setMaxAAPerModPerPeptide(Size max_aa_per_mod_per_peptide);
150 
152  Size getMaxModsPerPeptide() const;
154  void setMaxModsPerPeptide(Size max_mods_per_peptide);
155 
157  Size getNucleotideReadingFrame() const;
169  void setNucleotideReadingFrame(Size nucleotide_reading_frame);
170 
172  Size getMaxInternalCleavageSites() const;
174  void setMaxInternalCleavageSites(Size max_internal_cleavage_sites);
175 
177  Size getMatchPeakCount() const;
179  void setMatchPeakCount(Size match_peak_count);
180 
182  Size getMatchPeakAllowedError() const;
184  void setMatchPeakAllowedError(Size match_peak_allowed_error);
185 
186 
188  bool getShowFragmentIons() const;
190  void setShowFragmentIons(bool show_fragments);
191 
193  bool getPrintDuplicateReferences() const;
195  void setPrintDuplicateReferences(bool print_duplicate_references);
196 
198  bool getRemovePrecursorNearPeaks() const;
200  void setRemovePrecursorNearPeaks(bool remove_precursor_near_peaks);
201 
203  bool getMassTypeParent() const;
205  void setMassTypeParent(bool mass_type_parent);
206 
208  bool getMassTypeFragment() const;
210  void setMassTypeFragment(bool mass_type_fragment);
211 
213  bool getNormalizeXcorr() const;
215  void setNormalizeXcorr(bool normalize_xcorr);
216 
218  bool getResiduesInUpperCase() const;
220  void setResiduesInUpperCase(bool residues_in_upper_case);
221 
225  void addEnzymeInfo(std::vector<String> & enzyme_info);
226 
228  const std::map<String, std::vector<String> > & getModifications() const;
229 
241  void handlePTMs(const String & modification_line, const String & modifications_filename, const bool monoisotopic);
242 
243 protected:
245  const std::map<String, std::vector<String> > & getEnzymeInfo_() const;
246 
248  void setStandardEnzymeInfo_();
249 
250  std::map<String, std::vector<String> > enzyme_info_;
258 
263 
270  Size max_internal_cleavage_sites_;
283 
284 
292 
293  std::map<String, std::vector<String> > PTMname_residues_mass_type_;
294  };
295 
296 } // namespace OpenMS
297 
LogStream.h
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:144
OpenMS::SequestInfile::precursor_mass_tolerance_
float precursor_mass_tolerance_
tolerance for matching a theoretical to an experimental peptide
Definition: SequestInfile.h:259
double
OpenMS::SequestInfile::match_peak_tolerance_
float match_peak_tolerance_
minimum distance between two experimental peaks
Definition: SequestInfile.h:261
OpenMS::SequestInfile::sequence_header_filter_
String sequence_header_filter_
space-delimited list of sequences that have to occur or be absent (preceded by a tilde) in a protein ...
Definition: SequestInfile.h:256
OpenMS::FASTAFile
This class serves for reading in and writing FASTA files.
Definition: FASTAFile.h:64
OpenMS::SequestInfile::mass_type_fragment_
bool mass_type_fragment_
mass type of fragment peaks (0 - monoisotopic; 1 - average)
Definition: SequestInfile.h:289
OpenMS::Constants::k
const double k
OpenMS::SequestInfile::snd_database_
String snd_database_
second database used
Definition: SequestInfile.h:252
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
IdXMLFile.h
OpenMS::SequestInfile::normalize_xcorr_
bool normalize_xcorr_
whether to display normalized xcorr values
Definition: SequestInfile.h:290
OpenMS::SequestInfile::database_
String database_
database used
Definition: SequestInfile.h:251
OpenMS::SequestInfile::ion_series_weights_
String ion_series_weights_
weights for the a-; b-; c-; d-; v-; w-; x-; y- and z-ion series; space delimited
Definition: SequestInfile.h:254
OpenMS::SequestInfile::match_peak_allowed_error_
Size match_peak_allowed_error_
number of peaks that may lack this test
Definition: SequestInfile.h:282
OpenMS::ProteinIdentification
Representation of a protein identification run.
Definition: ProteinIdentification.h:71
OpenMS::SequestInfile::neutral_losses_for_ions_
String neutral_losses_for_ions_
whether neutral losses are considered for the a-; b- and y-ions (e.g. 011 for b- and y-ions)
Definition: SequestInfile.h:253
OpenMS::String::hasSubstring
bool hasSubstring(const String &string) const
true if String contains the string, false otherwise
OpenMS::SequestInfile::partial_sequence_
String partial_sequence_
space-delimited list of sequence parts that have to occur in the theoretical spectra
Definition: SequestInfile.h:255
OpenMS::IdXMLFile::load
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
OpenMS::SequestInfile::peak_mass_tolerance_
float peak_mass_tolerance_
tolerance for matching a theoretical to an experimental peak
Definition: SequestInfile.h:260
OpenMS::SequestInfile::mass_type_parent_
bool mass_type_parent_
mass type of the parent peak (0 - monoisotopic; 1 - average)
Definition: SequestInfile.h:288
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::SequestInfile::enzyme_info_
std::map< String, std::vector< String > > enzyme_info_
an endline-delimited list of enzymes; each with cutting direction 0 (N to C) /1; cuts after (list of ...
Definition: SequestInfile.h:250
OpenMS::SequestInfile::PTMname_residues_mass_type_
std::map< String, std::vector< String > > PTMname_residues_mass_type_
the modification names map to the affected residues, the mass change and the type
Definition: SequestInfile.h:293
FASTAFile.h
OpenMS::SequestInfile::nucleotide_reading_frame_
Size nucleotide_reading_frame_
Definition: SequestInfile.h:269
ProteinIdentification.h
OpenMS::SequestInfile::print_duplicate_references_
bool print_duplicate_references_
whether all proteins containing a found peptide should be displayed
Definition: SequestInfile.h:286
OpenMS::SequestInfile::remove_precursor_near_peaks_
bool remove_precursor_near_peaks_
whether peaks near (15 amu) the precursor peak are removed
Definition: SequestInfile.h:287
OpenMS::SequestInfile::peptide_mass_unit_
Size peptide_mass_unit_
peptide mass unit (0 = amu; 1 = mmu; 2 = ppm)
Definition: SequestInfile.h:264
OpenMS::SequestInfile
Sequest input file adapter.
Definition: SequestInfile.h:51
OpenMS::SequestInfile::max_mods_per_peptide_
Size max_mods_per_peptide_
maximum number of modifications per peptide
Definition: SequestInfile.h:268
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
OpenMS::SequestInfile::output_lines_
Size output_lines_
number of peptides to be displayed
Definition: SequestInfile.h:265
OpenMS::StringConversions::toString
String toString(const T &i)
fallback template for general purpose using Boost::Karma; more specializations below
Definition: StringUtils.h:85
KDTree::operator==
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
OPENMS_LOG_ERROR
#define OPENMS_LOG_ERROR
Macro to be used if non-fatal error are reported (processing continues)
Definition: LogStream.h:455
OpenMS::FASTAFile::load
static void load(const String &filename, std::vector< FASTAEntry > &data)
loads a FASTA file given by 'filename' and stores the information in 'data'
OpenMS::PeptideIdentification::getReferencingHits
static std::vector< PeptideHit > getReferencingHits(const std::vector< PeptideHit > &, const std::set< String > &accession)
returns all peptide hits which reference to a given protein accession (i.e. filter by protein accessi...
OpenMS::SequestInfile::max_AA_per_mod_per_peptide_
Size max_AA_per_mod_per_peptide_
maximum number of amino acids containing the same modification in a peptide
Definition: SequestInfile.h:267
OpenMS::SequestInfile::ion_cutoff_percentage_
float ion_cutoff_percentage_
cutoff of the ratio matching theoretical peaks/theoretical peaks
Definition: SequestInfile.h:262
OpenMS::OpenMS_Log_info
Logger::LogStream OpenMS_Log_info
Global static instance of a LogStream to capture messages classified as information....
OpenMS::TOPPBase::ExitCodes
ExitCodes
Exit codes.
Definition: TOPPBase.h:149
String.h
OpenMS::SequestInfile::show_fragment_ions_
bool show_fragment_ions_
whether to display fragment ions
Definition: SequestInfile.h:285
OpenMS::SequestInfile::match_peak_count_
Size match_peak_count_
number of the top abundant peaks to match with theoretical one
Definition: SequestInfile.h:281
OpenMS::SequestInfile::residues_in_upper_case_
bool residues_in_upper_case_
whether residues are in upper case
Definition: SequestInfile.h:291
OpenMS::SequestInfile::enzyme_number_
Size enzyme_number_
number of the enzyme used for cleavage
Definition: SequestInfile.h:266
OpenMS::SequestInfile::protein_mass_filter_
String protein_mass_filter_
Definition: SequestInfile.h:257
TOPPBase.h
OpenMS::IdXMLFile
Used to load and store idXML files.
Definition: IdXMLFile.h:63