OpenMS  2.5.0
DBSearchParam.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: Hendrik Weisser $
32 // $Authors: Hendrik Weisser $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
39 
40 namespace OpenMS
41 {
42  namespace IdentificationDataInternal
43  {
47  {
50 
54 
55  std::set<Int> charges;
56 
57  std::set<String> fixed_mods;
58  std::set<String> variable_mods;
59 
64 
65  // allow for either "DigestionEnzymeProtein" or "DigestionEnzymeRNA":
70 
72  molecule_type(MoleculeType::PROTEIN),
73  mass_type(MassType::MONOISOTOPIC),
74  precursor_mass_tolerance(0.0), fragment_mass_tolerance(0.0),
75  precursor_tolerance_ppm(false), fragment_tolerance_ppm(false),
76  digestion_enzyme(0), missed_cleavages(0), min_length(0), max_length(0)
77  {
78  }
79 
80  DBSearchParam(const DBSearchParam& other) = default;
81 
82  bool operator<(const DBSearchParam& other) const
83  {
84  return (std::tie(molecule_type, mass_type, database,
85  database_version, taxonomy, charges, fixed_mods,
86  variable_mods, fragment_mass_tolerance,
87  precursor_mass_tolerance, fragment_tolerance_ppm,
88  precursor_tolerance_ppm, digestion_enzyme,
89  missed_cleavages, min_length, max_length) <
90  std::tie(other.molecule_type, other.mass_type,
91  other.database, other.database_version, other.taxonomy,
92  other.charges, other.fixed_mods, other.variable_mods,
98  other.min_length, other.max_length));
99  }
100 
101  bool operator==(const DBSearchParam& other) const
102  {
103  return (std::tie(molecule_type, mass_type, database,
104  database_version, taxonomy, charges, fixed_mods,
105  variable_mods, fragment_mass_tolerance,
106  precursor_mass_tolerance, fragment_tolerance_ppm,
107  precursor_tolerance_ppm, digestion_enzyme,
108  missed_cleavages, min_length, max_length) ==
109  std::tie(other.molecule_type, other.mass_type,
110  other.database, other.database_version, other.taxonomy,
111  other.charges, other.fixed_mods, other.variable_mods,
116  other.digestion_enzyme, other.missed_cleavages,
117  other.min_length, other.max_length));
118  }
119  };
120 
121  typedef std::set<DBSearchParam> DBSearchParams;
123  typedef std::map<ProcessingStepRef, SearchParamRef> DBSearchSteps;
124 
125  }
126 }
std::set< String > variable_mods
Definition: DBSearchParam.h:58
MassType
Definition: MetaData.h:72
const DigestionEnzyme * digestion_enzyme
Definition: DBSearchParam.h:66
String taxonomy
Definition: DBSearchParam.h:53
std::map< ProcessingStepRef, SearchParamRef > DBSearchSteps
Definition: DBSearchParam.h:123
bool operator==(const DBSearchParam &other) const
Definition: DBSearchParam.h:101
Size min_length
Definition: DBSearchParam.h:68
bool precursor_tolerance_ppm
Definition: DBSearchParam.h:62
std::set< String > fixed_mods
Definition: DBSearchParam.h:57
String database_version
Definition: DBSearchParam.h:52
enum MassType mass_type
Definition: DBSearchParam.h:49
Parameters specific to a database search step.
Definition: DBSearchParam.h:46
double precursor_mass_tolerance
Definition: DBSearchParam.h:60
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Abstract base class for digestion enzymes.
Definition: DigestionEnzyme.h:52
Wrapper that adds operator< to iterators, so they can be used as (part of) keys in maps/sets or multi...
Definition: MetaData.h:43
MoleculeType
Definition: MetaData.h:63
double fragment_mass_tolerance
Definition: DBSearchParam.h:61
enum MoleculeType molecule_type
Definition: DBSearchParam.h:48
bool fragment_tolerance_ppm
Definition: DBSearchParam.h:63
Size max_length
Definition: DBSearchParam.h:69
String database
Definition: DBSearchParam.h:51
bool operator<(const DBSearchParam &other) const
Definition: DBSearchParam.h:82
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:60
std::set< DBSearchParam > DBSearchParams
Definition: DBSearchParam.h:121
A more convenient string class.
Definition: String.h:58
std::set< Int > charges
Definition: DBSearchParam.h:55
Size missed_cleavages
Definition: DBSearchParam.h:67
DBSearchParam()
Definition: DBSearchParam.h:71
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
IteratorWrapper< DBSearchParams::iterator > SearchParamRef
Definition: DBSearchParam.h:122