com.compomics.util.protein
Class ModificationFactory

java.lang.Object
  extended by com.compomics.util.protein.ModificationFactory

public class ModificationFactory
extends Object

This class can be used to generate a Modification instance from a code or title.
Modification information is loaded from files or database, as specified in the two available constructors for this Factory.

Author:
Lennart Martens

Method Summary
static String[] getAllModificationTitles()
          This method returns all modification titles known to the Factory.
static Modification getModification(String aTitle, int aLocation)
          This method will return a Modification instance from a title.
static Modification getModification(String aCode, String aResidue, int aLocation)
          This method takes a code and a residue (the residue for the N-terminus is NTERMINUS and for the C-terminus CTERMINUS!) and converts this into a Modification instance if possible.
static String modificationConversionToString()
          Returns a String representation of the modification title to code mappings.
static String modificationsToString()
          Returns a String representation of the modifications.
static void reLoadAllData()
          This method can be used to refresh all data from the data store indicated in the ModificationFactory.properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getModification

public static Modification getModification(String aTitle,
                                           int aLocation)
This method will return a Modification instance from a title.

Parameters:
aTitle - String with the title for a modification.
aLocation - int with the location for the modification.
Returns:
Modification with the corresponding modification, or 'null' when the modification was not found.

getModification

public static Modification getModification(String aCode,
                                           String aResidue,
                                           int aLocation)
This method takes a code and a residue (the residue for the N-terminus is NTERMINUS and for the C-terminus CTERMINUS!) and converts this into a Modification instance if possible.

Parameters:
aCode - String with the code for the modification
aResidue - String with the residue carrying the modification (the residue for the N-terminus is defined in the constant NTERMINUS and for the C-terminus in the constant CTERMINUS!).
aLocation - int with the location for the modification.
Returns:
Modification with the corresponding modification, or 'null' when the modification was not found.

modificationsToString

public static String modificationsToString()
Returns a String representation of the modifications.

Returns:
String with a String representation of the modification.

modificationConversionToString

public static String modificationConversionToString()
Returns a String representation of the modification title to code mappings.

Returns:
String with a String representation of the code tot title mappings.

reLoadAllData

public static void reLoadAllData()
This method can be used to refresh all data from the data store indicated in the ModificationFactory.properties file.


getAllModificationTitles

public static String[] getAllModificationTitles()
This method returns all modification titles known to the Factory.

Returns:
String[] with all the modification titles.


Copyright © 2012. All Rights Reserved.