Superposition phase: In the first step of the superpositon phase, an approximation of the transformation is estimated which is used to determine reliable landmarks in the two maps. These landmarks enable in the second step the evaluation of a more precise transformation. For both steps, different classes can be chosen. Using the PoseClusteringSuperimposerAffine, an affine transformation can be estimated and the PoseClusteringSuperimposerShift estimates a transformation consisting of only a translation in rt and m/z. Given a first approximation of the underlying warp, the SimplePairFinder or the DelaunayPairFinder can be used to determine landmarks in the two maps which represent potential corresponding elements. These landmarks are used by the MapMatcherRegression to improve the inital transformation. The following example (Tutorial_PairwiseAlignment.C) shows how to use the PoseClusteringPairwiseMapMatcher and the MapMatcherRegression for the pairwise alignment of two maps. The PoseClusteringPairwiseMapMatcher is based on the PoseClusteringSuperimposerAffine, and a DelaunayPairFinder. The initial as well as the final transformation is stored in gridXML format.
We load two feature maps and instantiate a PoseClusteringPairwiseMapMatcher object. The PoseClusteringPairwiseMapMatcher gets references to both maps and a Param object which defines the type of transformation and pairfinder. Additionally, the value of mz_bucket_size
is set, which represents the maximum deviation in m/z of two corresponding elements.
Int main() { FeatureMap<> exp_feature_1; FeatureMap<> exp_feature_2; FeatureXMLFile featurexml_file; featurexml_file.load("../TEST/TOPP/MapAlignmentFeatureMap1.xml",exp_feature_1); featurexml_file.load("../TEST/TOPP/MapAlignmentFeatureMap2.xml",exp_feature_2); Param param; param.setValue("superimposer:type","poseclustering_affine"); param.setValue("superimposer:tuple_search:mz_bucket_size",0.3); param.setValue("pairfinder:type","DelaunayPairFinder"); std::vector < ElementPair<Feature> > landmarks; PoseClusteringPairwiseMapMatcher< FeatureMap<> > pcpm; pcpm.setParameters(param); pcpm.setElementMap(0,exp_feature_1); pcpm.setElementMap(1,exp_feature_2); pcpm.run();
GridFile grid_file;
grid_file.store("FirstAffineTransformation.gridXML",pcpm.getGrid());
MapMatcherRegression< Feature > lr;
lr.setElementPairs(pcpm.getElementPairs());
lr.setGrid(pcpm.getGrid());
lr.estimateTransform(); grid_file.store("SecondAffineTransformation.gridXML",lr.getGrid()); return 0; } //end of main
Generated Tue Apr 1 15:36:40 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |