Proteome Informatics Group > Java Proteomic Library
 

Recipe 2.2. Creating modifications

Problem

You want to create new modifications.

Solution

Modifications can be created mainly from molecular formulae or from masses. Some molecular groups may be ionizable.

Here is a list of examples:

import org.expasy.jpl.core.mol.modif.*;

// create a modification from a formula
ModificationFactory.valueOf("CH3");

// create a modification from a double		
ModificationFactory.valueOf("15.0349");

// with a label and a molecule
ModificationFactory.withLabel("MSO",
	ChemicalFacade.getMolecule("O2"));

// also exists loss modification	
LossModification.valueOf(ModificationFactory.valueOf(-23)
LossModification.valueOf(ModificationFactory
	.valueOf(ChemicalFacade.getMolecule("C-1H-4")));

// or ionizable modification
IonizableModification.newInstance(
	ModificationFactory.withLabel("phosphorylation", ChemicalFacade.getMolecule("H2PO3")),
		new IonizableGroup.Builder(7.21, NeutralMoleculeType.ACID)
			.addPKa(12.67).build());