Proteome Informatics Group > Java Proteomic Library
 

Recipe 2.6. Fragmenting a peptide

Problem

You want to fragments a peptide and generate an MS2 spectrum.

Solution

// build your custom fragmenter
PeptideFragmenter fragmenter =
	new PeptideFragmenter.Builder(EnumSet.of(
		FragmentationType.BY, FragmentationType.PRECURSOR,
		FragmentationType.IMMONIUM)).build();

// the peptide to fragment
Peptide aas = new Peptide.Builder("MQRSTATGCFKL").build();

// set the precursor peptide with its charge
fragmenter.setFragmentablePrecursor(aas, 1);

// just make the job
fragmenter.generateFragments();

// get the fragment list
PeakList pl = fragmenter.getPeakList();

Discussion

See Also