Package edu.uchsc.ccp.nlp.ei.mutation
Class PointMutation
- java.lang.Object
-
- edu.uchsc.ccp.nlp.ei.mutation.Mutation
-
- edu.uchsc.ccp.nlp.ei.mutation.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 Summary
Constructors Constructor Description PointMutation(int position, String wtResidue, String mutResidue)Initialize the object and call the base class constructor.PointMutation(String position, String wtResidue, String mutResidue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PointMutationcreatePointMutationFrom_wNm(String wNm)Create PointMutation from wNm-format, single-letter abbreviated mention.booleanequals(Object obj)Two PointMutation objects are equal if their Position, WtResidue, and MutResidue values are all equal.chargetMutResidue()Return the mutant residue for this point mutation.chargetWtResidue()Return the wild-type residue for this point mutation.inthashCode()To be overridden by subclassescharnormalizeResidueIdentity(String residue)Normalize three-letter and full residue names to their one-letter abbreviations.protected Map<String,String>populateAminoAcidOneToOneLookupMap()StringtoString()Override toString(), returns mutation as a string in wNm format-
Methods inherited from class edu.uchsc.ccp.nlp.ei.mutation.Mutation
error, getPosition, updateMapping, warn
-
-
-
-
Constructor Detail
-
PointMutation
public PointMutation(int position, String wtResidue, String mutResidue) throws MutationExceptionInitialize the object and call the base class constructor.- Parameters:
position- the sequence position or start position of the mutationwtResidue- 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.
-
PointMutation
public PointMutation(String position, String wtResidue, String mutResidue) throws MutationException
- Throws:
MutationException
-
-
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.
-
hashCode
public int hashCode()
Description copied from class:MutationTo be overridden by subclasses
-
toString
public String toString()
Override toString(), returns mutation as a string in wNm format
-
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
-
-