Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Map alignment

OpenMS offers a number of map alignment algorithms. The take several peak or feature maps and transform the retention time axis so that peak/feature positions become comparable.

The classes described in this section can be found in the ANALYSIS/MAPMATCHING folder.

All map alignment algorithms are derived from the common base class MapAlignmentAlgorithm and, thus, share a common interface. That is why only one example (Tutorial_MapAlignment.cpp) is shown here. Other algorithms can be work accordingly.

First, we load two feature maps:

int main(int argc, const char** argv)
{
if (argc < 2) return 1;
// the path to the data should be given on the command line
String tutorial_data_path(argv[1]);
FeatureMap reference;
FeatureMap toAlign;
FeatureXMLFile xml_file;
xml_file.load(tutorial_data_path + "/data/Tutorial_MapAlignment_1.featureXML", reference);
xml_file.load(tutorial_data_path + "/data/Tutorial_MapAlignment_2.featureXML", toAlign);

Then, we instantiate the algorithm and align the feature maps:

Finally, the aligned maps are written to files:

As an additional output the algorithms return one TransformationDescription per input file. This TransformationDescription describes the transformation that was applied to the retention times.

Note
In order to align peak maps the method alignPeakMaps has to be used.

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:05 using doxygen 1.8.13