Proteome Informatics Group > Java Proteomic Library
 

Chemical Modifications

A label and a mass

By default a modification has a label corresponding to the string representation of its mass.

Anyway, sometimes, a real label may be required. It is the case when adding peptide terminal modifications at building time with explicit label (see below).

Static Factory methods

We only provide static factory methods to build a modification.

We adhere to the common naming convention valueOf that is a type-conversion method given a molecule or a mass. The withLabel() method defines a label for the created instance.

Modif Container and Containing

Each entered modif can be extract by label. In the extended version of localized container modif can also been extracted by position.

BioSequence are able to contain modifs extractable by position. Extended JPLPeptide are JPLPolymer and contains potential modifs for each termini extractable by their label N_TERM_TOKEN and C_TERM_TOKEN defined in configuration files.

Biological Sequences contain Localized Modifs

There is one way to store modifications (modif containers).

There are two ways to add modifications:

  • at building time given the required sequence string with modifs or with specific addModif(At) builder methods
  • by using the Modif Container Manager, that can add and get modifs from an object containing modifs

Examples

The Modif Container Manager can handle modifs on a modif container:

	// a bioseq is a modif container
	JPLPolymer<JPLAminoAcid> peptide = 
	  new JPLPeptideBuilder("MQRSTATGCFKL").build();
	
	JPLModifContainerManager manager =
	    JPLModifContainerManager.getInstance();

	manager.addModifAt(peptide, JPLModification.valueOf(134), 5);
      

Modifs may be defined and extracted from a private parser (embedded in JPLPolymer contructor):

	String seq = "MQR(O2)STAT({12.0})GCFKL(AminoAcid:R)X";

	JPLLocModifParser parser = JPLLocModifParser.getInstance();
	parser.parse(seq);

	JPLLocModifContainer modifs = parser.getBuilder().build();
	String nakedSeq = parser.getNakedContent();

	for (JPLIModification modif : modifs.getSet()) {
	    logger.info(modif.getLabel() + ": " + modif.getMass());
	}
	logger.info(parser.getNakedContent());
	
	// display
	# 12.0: 12.0
	# Arg: 156.101111026
	# O[16]2: 31.989829244
	# MQRSTATGCFKLX
      

When building a JPLPeptide, potential terminal modifications have to be added with builder method add[Nt|Ct]Modif() and not from the sequence string (not by now):

	peptide =
	    new JPLPeptideBuilder("M({16})QRSTA({134})TGCFKL")
	        .addNtModif(4).addCtModif(18).build();
	
	System.out.println(peptide);
	
	// display
	# H({4.0})-M({16.0})QRSTA({134.0})TGCFKL-OH({18.0})
      

Modifications can be extracted thanks to the modif manager:

	JPLModifContainerManager manager =
            JPLModifContainerManager.getInstance();

	manager.