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