Proteome Informatics Group > Java Proteomic Library
 

Recipe 2.7. Splitting a peptide

Problem

You want to split a peptide in a list of biological elements.

Solution

PeptideResidueManager can extract each bio-elements such as N/C termini and its residues in a list:

import org.expasy.jpl.core.mol.polymer.pept.PeptideResidueManager;

// get the manager unique instance
PeptideResidueManager manager =
	PeptideResidueManager.getInstance();

// create a peptide
Peptide peptide =
	new Peptide.Builder(
		"H_A({128.10})CHUHEUHU({11.90})RHE_OH(P)").build();
		
// split the peptide in a list of molecules
List<Molecule> l = manager.split(peptide);

// list of residues + N/C terminus
Assert.assertEquals(peptide.length() + 2, l.size());

Assert.assertTrue(l.get(0) instanceof NTerminus);
Assert.assertTrue(l.get(1) instanceof ModifiedMolecule);
Assert.assertTrue(l.get(2) instanceof AminoAcid);

Discussion

See Also