Recipe 3.6. Matching MS peak lists
Problem
You want to compare peak lists.
Solution
You need an object to configure and handle the matching. PeakListMatcherImpl
PeakList pl1 = new PeakListImpl.Builder(new double[] {1, 1.2, 2, 2.9, 3, 3.3, 4}) .intensities(new double[] {98, 133, 254, 100, 296, 90, 350}) .build(); PeakList pl2 = new PeakListImpl.Builder(new double[] {1.1, 3, 3.1, 4}) .intensities(new double[] {66, 148, 45, 175}).build(); PeakListMatcher matcher = PeakListMatcherImpl.withTol(0.1); matcher.computeMatch(pl1, pl2);
Discussion
See Also