org.biojava3.protmod
Class ProteinModificationRegistry

java.lang.Object
  extended by org.biojava3.protmod.ProteinModificationRegistry

public class ProteinModificationRegistry
extends Object

This class serves as a instance registry by maintaining a pool of ProteinModification instances. A list of common protein modifications were preloaded from an XML file.

Since:
3.0
Author:
Jianjiong Gao

Constructor Summary
ProteinModificationRegistry()
           
 
Method Summary
static Set<Component> allComponents()
           
static Set<String> allIds()
           
static Set<String> allKeywords()
           
static Set<ProteinModification> allModifications()
           
static Set<String> allPdbccIds()
           
static Set<String> allPsimodIds()
           
static Set<String> allResidIds()
           
static Set<ProteinModification> getByCategory(ModificationCategory cat)
           
static Set<ProteinModification> getByComponent(Component comp1, Component... comps)
          Get ProteinModifications that involves one or more components.
static ProteinModification getById(String id)
           
static Set<ProteinModification> getByKeyword(String keyword)
           
static Set<ProteinModification> getByOccurrenceType(ModificationOccurrenceType occ)
           
static Set<ProteinModification> getByPdbccId(String pdbccId)
           
static Set<ProteinModification> getByPsimodId(String psimodId)
           
static Set<ProteinModification> getByResidId(String residId)
           
static void init()
          Initialization the static variables and register common modifications.
static void init(InputStream inStream)
          Initialization the static variables and register common modifications.
static void register(ProteinModification modification)
          Register a new ProteinModification.
static void unregister(ProteinModification modification)
          Remove a modification from registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProteinModificationRegistry

public ProteinModificationRegistry()
Method Detail

init

public static void init()
Initialization the static variables and register common modifications.


init

public static void init(InputStream inStream)
Initialization the static variables and register common modifications. Allows external user to provide alternative ptm_list.xml file instead of the one contained in this jar file.

Parameters:
inStream - InputStream to a XML file containing the list of PTMs (as in ptm_list.xml)

register

public static void register(ProteinModification modification)
Register a new ProteinModification.


unregister

public static void unregister(ProteinModification modification)
Remove a modification from registry.

Parameters:
mod -

getById

public static ProteinModification getById(String id)
Parameters:
id - modification ID.
Returns:
ProteinModification that has the corresponding ID.

getByResidId

public static Set<ProteinModification> getByResidId(String residId)
Parameters:
residId - RESID ID.
Returns:
a set of ProteinModifications that have the RESID ID.

getByPsimodId

public static Set<ProteinModification> getByPsimodId(String psimodId)
Parameters:
psimodId - PSI-MOD ID.
Returns:
a set of ProteinModifications that have the PSI-MOD ID.

getByPdbccId

public static Set<ProteinModification> getByPdbccId(String pdbccId)
Parameters:
pdbccId - Protein Data Bank Chemical Component ID.
Returns:
a set of ProteinModifications that have the PDBCC ID.

getByKeyword

public static Set<ProteinModification> getByKeyword(String keyword)
Parameters:
keyword - a keyword.
Returns:
a set of ProteinModifications that have the keyword.

getByComponent

public static Set<ProteinModification> getByComponent(Component comp1,
                                                      Component... comps)
Get ProteinModifications that involves one or more components.

Parameters:
comp1 - a Component.
comps - other Components.
Returns:
a set of ProteinModifications that involves all the components.

allModifications

public static Set<ProteinModification> allModifications()
Returns:
set of all registered ProteinModifications.

getByCategory

public static Set<ProteinModification> getByCategory(ModificationCategory cat)
Parameters:
cat - ModificationCategory.
Returns:
set of registered ProteinModifications in a particular category.

getByOccurrenceType

public static Set<ProteinModification> getByOccurrenceType(ModificationOccurrenceType occ)
Parameters:
occ - ModificationOccurrenceType.
Returns:
set of registered ProteinModifications of a particular occurrence type.

allIds

public static Set<String> allIds()
Returns:
set of IDs of all registered ProteinModifications.

allPdbccIds

public static Set<String> allPdbccIds()
Returns:
set of PDBCC IDs of all registered ProteinModifications.

allResidIds

public static Set<String> allResidIds()
Returns:
set of RESID IDs of all registered ProteinModifications.

allPsimodIds

public static Set<String> allPsimodIds()
Returns:
set of PSI-MOD IDs of all registered ProteinModifications.

allComponents

public static Set<Component> allComponents()
Returns:
set of components involved in all registered ProteinModifications.

allKeywords

public static Set<String> allKeywords()
Returns:
set of keywords of all registered ProteinModifications.