Class PointMutation


  • public class PointMutation
    extends Mutation
    A class for storing information about protein point mutations
    Version:
    1.0
    Author:
    William A. Baumgartner, Jr.
    william.baumgartner@uchsc.edu
    • Constructor Detail

      • PointMutation

        public PointMutation​(int position,
                             String wtResidue,
                             String mutResidue)
                      throws MutationException
        Initialize the object and call the base class constructor.
        Parameters:
        position - the sequence position or start position of the mutation
        wtResidue - the wild-type (pre-mutation) residue identity (a string)
        mutResidue - the mutant (post-mutation) residue identity (a string)
        Throws:
        MutationException - Residues identities are validated to ensure that they are within the canonical set of amino acid residues are normalized to their one-letter abbreviations.
    • Method Detail

      • normalizeResidueIdentity

        public char normalizeResidueIdentity​(String residue)
                                      throws MutationException
        Normalize three-letter and full residue names to their one-letter abbreviations. If a residue identity is passed in which does not fall into the set of canonical amino acids a MutationError is raised.
        Parameters:
        residue -
        Returns:
        Throws:
        MutationException
      • populateAminoAcidOneToOneLookupMap

        protected Map<String,​String> populateAminoAcidOneToOneLookupMap()
      • getMutResidue

        public char getMutResidue()
        Return the mutant residue for this point mutation.
        Returns:
      • getWtResidue

        public char getWtResidue()
        Return the wild-type residue for this point mutation.
        Returns:
      • equals

        public boolean equals​(Object obj)
        Two PointMutation objects are equal if their Position, WtResidue, and MutResidue values are all equal.
        Overrides:
        equals in class Mutation
        Returns:
      • hashCode

        public int hashCode()
        Description copied from class: Mutation
        To be overridden by subclasses
        Overrides:
        hashCode in class Mutation
      • toString

        public String toString()
        Override toString(), returns mutation as a string in wNm format
        Overrides:
        toString in class Mutation
        Returns:
      • createPointMutationFrom_wNm

        public static PointMutation createPointMutationFrom_wNm​(String wNm)
                                                         throws MutationException
        Create PointMutation from wNm-format, single-letter abbreviated mention. This wrapper function creates a PointMutation object from a mutation mention formatted in wNm-format, where w and m are the wild-type and mutant amino acids in their SINGLE-LETTER abbreviations, and N is an integer representing the sequence position.
        Parameters:
        wNm - a 3-character String representing a mutation mention in the wNm format
        Returns:
        Throws:
        MutationException