Class ProteinModificationRegistry

java.lang.Object
org.biojava.nbio.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 Details

    • ProteinModificationRegistry

      public ProteinModificationRegistry()
  • Method Details

    • 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.