Proteome Informatics Group > Java Proteomic Library
 

Recipe 3.8. Getting MS annotated peak list from peptide matching a peak list

Problem

You want to compute the alignment between a peak list against theoretical peptide fragments and report annotations in the experimental one.

Solution

The object MSPeptideMatchFactory is making all the steps for you, from the generation of the theoretical spectrum to the matching:

import org.expasy.jpl.msmatch.MSPeptideMatchFactory;

// the experimental peak list that we want to match against the theoretical fragments
PeakList expPeakList = ...

// the peptide precursor that will be fragmented by the renderer
JPLIonizedPeptide peptide =
	JPLIonizedPeptide.newInstance(new Peptide.Builder(
		"EQVQSC({57})GPPPELLNGNVK").build(), 2);

// The builder defines the settings for:
// 1. the fragmentation of precursor (fragmenter, condition)
// 2. the matching of spectra (tolerance)
MSPeptideMatchFactory factory =
	new MSPeptideMatchFactory.Builder().fragmenter(
		new PeptideFragmenter.Builder(EnumSet.of(
			FragmentationType.AX, FragmentationType.BY,
		    FragmentationType.CZ)).enableLoss().build())
		    .tolerance(0.1).build();

// process the computation
factory.process(peptide, expPeakList);

// get the updated experimental spectrum (with peak annotations reported)
factory.getUpdatedPeakList();

// get the annotated peaks only
factory.getAnnotatedPeakList();

// get the non-annotated peaks only
factory.getNonAnnotatedPeakList();

Discussion

See also the recipe about rendering the aligned spectra.

See Also