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
// --------------------------------------------------------------------------
24
// $Maintainer: Clemens Groepl $
25
// $Authors: Marc Sturm, Clemens Groepl $
26
// --------------------------------------------------------------------------
28
#include <OpenMS/ANALYSIS/MAPMATCHING/MapAlignmentAlgorithmSpectrumAlignment.h>
29
#include <OpenMS/APPLICATIONS/MapAlignerBase.h>
31
using namespace OpenMS;
34
//-------------------------------------------------------------
36
//-------------------------------------------------------------
39
@page TOPP_MapAlignerSpectrum MapAlignerSpectrum
41
@brief Corrects retention time distortions between maps by aligning spectra.
46
<td ALIGN = "center" BGCOLOR="#EBEBEB"> potential predecessor tools </td>
47
<td VALIGN="middle" ROWSPAN=2> \f$ \longrightarrow \f$ MapAlignerSpectrumAlignment \f$ \longrightarrow \f$</td>
48
<td ALIGN = "center" BGCOLOR="#EBEBEB"> potential successor tools </td>
51
<td VALIGN="middle" ALIGN = "center" ROWSPAN=1> @ref TOPP_FileConverter </td>
52
<td VALIGN="middle" ALIGN = "center" ROWSPAN=1> @ref TOPP_FeatureFinderCentroided @n (or another feature finding algorithm) </td>
57
This tool provides an algorithm to align the retention time scales of multiple input files, correcting shifts and distortions between them. Retention time adjustment may be necessary to correct for chromatography differences e.g. before data from multiple LC-MS runs can be combined (feature grouping), or when one run should be annotated with peptide identifications obtained in a different run.
59
All map alignment tools (MapAligner...) collect retention time data from the input files and - by fitting a model to this data - compute transformations that map all runs to a common retention time scale. They can apply the transformations right away and return output files with aligned time scales (parameter @p out), and/or return descriptions of the transformations in trafoXML format (parameter @p trafo_out). Transformations stored as trafoXML can be applied to arbitrary files with the @ref TOPP_MapRTTransformer tool.
61
The map alignment tools differ in how they obtain retention time data for the modeling of transformations, and consequently what types of data they can be applied to. Here, an experimental algorithm based on spectrum alignment is implemented. It is only applicable to peak maps (mzML format).
62
For more details and algorithm-specific parameters (set in the INI file) see "Detailed Description" in the @ref OpenMS::MapAlignmentAlgorithmSpectrumAlignment "algorithm documentation".
64
@see @ref TOPP_MapAlignerIdentification @ref TOPP_MapAlignerPoseClustering @ref TOPP_MapRTTransformer
66
Since %OpenMS 1.8, the extraction of data for the alignment has been separate from the modeling of RT transformations based on that data. It is now possible to use different models independently of the chosen algorithm. This algorithm has been tested mostly with the "interpolated" model. The different available models are:
67
- @ref OpenMS::TransformationModelLinear "linear": Linear model.
68
- @ref OpenMS::TransformationModelBSpline "b_spline": Smoothing spline (non-linear).
69
- @ref OpenMS::TransformationModelInterpolated "interpolated": Different types of interpolation.
71
The following parameters control the modeling of RT transformations (they can be set in the "model" section of the INI file):
72
@htmlinclude OpenMS_MapAlignerSpectrumModel.parameters @n
74
<B>The command line parameters of this tool are:</B> @n
75
@verbinclude TOPP_MapAlignerSpectrum.cli
79
// We do not want this class to show up in the docu:
82
class TOPPMapAlignerSpectrum
83
: public TOPPMapAlignerBase
87
TOPPMapAlignerSpectrum()
88
: TOPPMapAlignerBase("MapAlignerSpectrum", "Corrects retention time distortions between maps by spectrum alignment.")
93
void registerOptionsAndFlags_()
95
String formats = "mzML";
96
TOPPMapAlignerBase::registerOptionsAndFlags_(formats);
97
// no support for a reference file yet
98
registerSubsection_("algorithm", "Algorithm parameters section");
99
registerSubsection_("model", "Options to control the modeling of retention time transformations from data");
102
Param getSubsectionDefaults_(const String& section) const
104
if (section == "algorithm")
106
MapAlignmentAlgorithmSpectrumAlignment algo;
107
return algo.getParameters();
109
if (section == "model")
111
return getModelDefaults("interpolated");
113
return Param(); // shouldn't happen
116
ExitCodes main_(int, const char**)
118
MapAlignmentAlgorithmSpectrumAlignment algorithm;
119
return TOPPMapAlignerBase::commonMain_(&algorithm);
124
int main(int argc, const char** argv)
126
TOPPMapAlignerSpectrum tool;
127
return tool.main(argc, argv);