org.biojava3.protmod
Class ProteinModificationRegistry

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

public class ProteinModificationRegistry
extends java.lang.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 java.util.Set<Component> allComponents()
           
static java.util.Set<java.lang.String> allIds()
           
static java.util.Set<java.lang.String> allKeywords()
           
static java.util.Set<ProteinModification> allModifications()
           
static java.util.Set<java.lang.String> allPdbccIds()
           
static java.util.Set<java.lang.String> allPsimodIds()
           
static java.util.Set<java.lang.String> allResidIds()
           
static java.util.Set<ProteinModification> getByCategory(ModificationCategory cat)
           
static java.util.Set<ProteinModification> getByComponent(Component comp1, Component... comps)
          Get ProteinModifications that involves one or more components.
static ProteinModification getById(java.lang.String id)
           
static java.util.Set<ProteinModification> getByKeyword(java.lang.String keyword)
           
static java.util.Set<ProteinModification> getByOccurrenceType(ModificationOccurrenceType occ)
           
static java.util.Set<ProteinModification> getByPdbccId(java.lang.String pdbccId)
           
static java.util.Set<ProteinModification> getByPsimodId(java.lang.String psimodId)
           
static java.util.Set<ProteinModification> getByResidId(java.lang.String residId)
           
static void init()
          Initialization the static variables and register common modifications.
static void init(java.io.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(java.io.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(java.lang.String id)
Parameters:
id - modification ID.
Returns:
ProteinModification that has the corresponding ID.

getByResidId

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

getByPsimodId

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

getByPdbccId

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

getByKeyword

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

getByComponent

public static java.util.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 java.util.Set<ProteinModification> allModifications()
Returns:
set of all registered ProteinModifications.

getByCategory

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

getByOccurrenceType

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

allIds

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

allPdbccIds

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

allResidIds

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

allPsimodIds

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

allComponents

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

allKeywords

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