1
// -*- mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
25
// $Authors: Marc Sturm $
26
// --------------------------------------------------------------------------
28
#ifndef OPENMS_ANALYSIS_MAPMATCHING_LABELEDPAIRFINDER_H
29
#define OPENMS_ANALYSIS_MAPMATCHING_LABELEDPAIRFINDER_H
31
#include <OpenMS/ANALYSIS/MAPMATCHING/BaseGroupFinder.h>
33
#include <boost/math/tr1.hpp>
39
@brief The LabeledPairFinder allows the matching of labeled features (features with a fixed distance).
41
Finds feature pairs that have a defined distance in RT and m/z in the same map.
43
@htmlinclude OpenMS_LabeledPairFinder.parameters
45
@todo Implement support for labled MRM experiments, Q1 m/z value and charges. (Andreas)
46
@todo Implement support for more than one mass delta, e.g. from missed cleavages and so on (Andreas)
48
@ingroup FeatureGrouping
50
class OPENMS_DLLAPI LabeledPairFinder
51
: public BaseGroupFinder
56
/// Default constructor
60
inline virtual ~LabeledPairFinder()
64
/// Returns an instance of this class
65
static BaseGroupFinder* create()
67
return new LabeledPairFinder();
70
/// Returns the name of this module
71
static const String getProductName()
73
return "labeled_pair_finder";
77
@brief Run the algorithm
79
@note Exactly one @em input map has to be provided.
80
@note The @em output map has to have two file descriptions, containing
81
the same file name. The file descriptions have to be labeled 'heavy' and 'light'.
83
@exception Exception::IllegalArgument is thrown if the input data is not valid.
85
virtual void run(const std::vector<ConsensusMap>& input_maps, ConsensusMap& result_map);
89
/// return the p-value at position x for the bi-Gaussian distribution with mean @p m and standard deviation @p sig1 (left) and @p sig2 (right)
90
inline DoubleReal PValue_(DoubleReal x, DoubleReal m, DoubleReal sig1, DoubleReal sig2)
94
return 1-boost::math::tr1::erf((x-m)/sig2/0.707106781);
98
return 1-boost::math::tr1::erf((m-x)/sig1/0.707106781);
103
/// Copy constructor not implemented => private
104
LabeledPairFinder(const LabeledPairFinder& source);
106
/// Assignment operator not implemented => private
107
LabeledPairFinder& operator=(const LabeledPairFinder& source);
109
}; // end of class LabeledPairFinder
111
} // end of namespace OpenMS
113
#endif // OPENMS_ANALYSIS_MAPMATCHER_LABELEDPAIRFINDER_H