Package com.compomics.util.protein
Class ModificationFactory
java.lang.Object
com.compomics.util.protein.ModificationFactory
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.
Modification information is loaded from files or database, as specified in the two available constructors for this Factory.
- Author:
- Lennart Martens
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]This method returns all modification titles known to the Factory.static ModificationgetModification(String aTitle, int aLocation) This method will return a Modification instance from a title.static ModificationgetModification(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 StringReturns a String representation of the modification title to code mappings.static StringReturns a String representation of the modifications.static voidThis method can be used to refresh all data from the data store indicated in the ModificationFactory.properties file.
-
Method Details
-
getModification
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
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 modificationaResidue- 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
Returns a String representation of the modifications.- Returns:
- String with a String representation of the modification.
-
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
This method returns all modification titles known to the Factory.- Returns:
- String[] with all the modification titles.
-