~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to include/OpenMS/ANALYSIS/MAPMATCHING/PoseClusteringShiftSuperimposer.h

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2012-11-12 15:58:12 UTC
  • Revision ID: package-import@ubuntu.com-20121112155812-vr15wtg9b50cuesg
Tags: upstream-1.9.0
ImportĀ upstreamĀ versionĀ 1.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: C++; tab-width: 2; -*-
 
2
// vi: set ts=2:
 
3
//
 
4
// --------------------------------------------------------------------------
 
5
//                   OpenMS Mass Spectrometry Framework
 
6
// --------------------------------------------------------------------------
 
7
//  Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
 
8
//
 
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.
 
13
//
 
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.
 
18
//
 
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
 
22
//
 
23
// --------------------------------------------------------------------------
 
24
// $Maintainer: Clemens Groepl $
 
25
// $Authors: Eva Lange, Clemens Groepl $
 
26
// --------------------------------------------------------------------------
 
27
 
 
28
 
 
29
#ifndef OPENMS_ANALYSIS_MAPMATCHING_POSECLUSTERINGSHIFTSUPERIMPOSER_H
 
30
#define OPENMS_ANALYSIS_MAPMATCHING_POSECLUSTERINGSHIFTSUPERIMPOSER_H
 
31
 
 
32
#include <OpenMS/ANALYSIS/MAPMATCHING/BaseSuperimposer.h>
 
33
 
 
34
namespace OpenMS
 
35
{
 
36
 
 
37
  /**
 
38
   @brief  A superimposer that uses a voting scheme, also known as pose clustering,
 
39
   to find a good shift transformation.
 
40
 
 
41
   This algorithm works on two consensus maps.  It computes an shift
 
42
   transformation that maps the elements of second map as near as possible
 
43
   to the elements in the first map.
 
44
 
 
45
   The voting scheme hashes shift transformations between features in
 
46
   map one and features in map two.  Each such pair defines a
 
47
   (potential) "pose" of the second map relative to the first.
 
48
   Then it finds a cluster in the parameter space of these poses.
 
49
   The shift transformation is then computed from this
 
50
   cluster of potential poses, hence the name pose clustering.
 
51
 
 
52
   @sa PoseClusteringAffineSuperimposer
 
53
 
 
54
   @htmlinclude OpenMS_PoseClusteringShiftSuperimposer.parameters
 
55
 
 
56
   @ingroup MapAlignment
 
57
   */
 
58
  class OPENMS_DLLAPI PoseClusteringShiftSuperimposer : public BaseSuperimposer
 
59
  {
 
60
  public:
 
61
 
 
62
    /// Default ctor
 
63
    PoseClusteringShiftSuperimposer();
 
64
 
 
65
    /// Destructor
 
66
    virtual
 
67
    ~PoseClusteringShiftSuperimposer()
 
68
    {
 
69
    }
 
70
 
 
71
    /**
 
72
     @brief Estimates the transformation and fills the given mapping function. (Has a precondition!)
 
73
 
 
74
     @note Exactly two input maps must be given.
 
75
 
 
76
     @pre  For performance reasons, we trust that (the equivalent of:) <code>maps[0].updateRanges(); maps[1].updateRanges();</code> has been done <i>before</i> calling this.  You have been warned!
 
77
 
 
78
     @exception IllegalArgument is thrown if the input maps are invalid.
 
79
     */
 
80
    virtual void
 
81
    run(const std::vector<ConsensusMap>& maps, std::vector<TransformationDescription>& transformations);
 
82
 
 
83
    /// Returns an instance of this class
 
84
    static BaseSuperimposer*
 
85
    create()
 
86
    {
 
87
      return new PoseClusteringShiftSuperimposer();
 
88
    }
 
89
 
 
90
    /// Returns the name of this module
 
91
    static const String
 
92
    getProductName()
 
93
    {
 
94
      return "poseclustering_shift";
 
95
    }
 
96
 
 
97
  };
 
98
 
 
99
} // namespace OpenMS
 
100
 
 
101
#endif  // OPENMS_ANALYSIS_MAPMATCHING_POSECLUSTERINGSHIFTSUPERIMPOSER_H