edu.mssm.crover.webapps.dimlib.util
Class MutationParser

java.lang.Object
  |
  +--edu.mssm.crover.webapps.dimlib.util.MutationParser

public class MutationParser
extends java.lang.Object


Constructor Summary
MutationParser()
           
 
Method Summary
static java.lang.String getMutationString(java.lang.String[] args)
           
 void illegalCharacterSearch()
           
 boolean isNumber(java.lang.String c)
          Returns whether the String is parseable as an Integer or not.
 boolean isValidResidue(char c)
          Returns whether the Character is a valid residue or not.
static void main(java.lang.String[] args)
           
 int parseAbsPos()
          Returns the absolute position, when it is not enclosed in brackets.
 int parseBracketAbsPos()
          Parses the absolute position between brackets.
 java.lang.String parseEndResidues()
          Finds all the residues at the end of the mutation string, and validates them.
 GenericPosition parseGenericPosition()
          Returns the parsed GenericPosition, if it exists, and if it doesn't, returns the default.
 Mutation parseMutation(java.lang.String mutation)
           
 java.lang.String parseStartResidues()
          Finds all the residues at the start of the mutation string, and validates them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutationParser

public MutationParser()
Method Detail

parseMutation

public Mutation parseMutation(java.lang.String mutation)
                       throws InvalidMutationException
InvalidMutationException

illegalCharacterSearch

public void illegalCharacterSearch()
                            throws InvalidResidueException
InvalidResidueException

parseGenericPosition

public GenericPosition parseGenericPosition()
                                     throws InvalidMutationException
Returns the parsed GenericPosition, if it exists, and if it doesn't, returns the default.

InvalidMutationException

parseBracketAbsPos

public int parseBracketAbsPos()
                       throws InvalidMutationException
Parses the absolute position between brackets. Throws an InvalidMutationException if the number between the brackets is unparseable.

InvalidMutationException

parseAbsPos

public int parseAbsPos()
                throws InvalidMutationException
Returns the absolute position, when it is not enclosed in brackets.

InvalidMutationException

parseStartResidues

public java.lang.String parseStartResidues()
                                    throws InvalidResidueException,
                                           InvalidMutationException
Finds all the residues at the start of the mutation string, and validates them.

InvalidResidueException
InvalidMutationException

parseEndResidues

public java.lang.String parseEndResidues()
                                  throws InvalidResidueException,
                                         InvalidMutationException
Finds all the residues at the end of the mutation string, and validates them.

InvalidResidueException
InvalidMutationException

isNumber

public boolean isNumber(java.lang.String c)
Returns whether the String is parseable as an Integer or not.


isValidResidue

public boolean isValidResidue(char c)
                       throws InvalidResidueException
Returns whether the Character is a valid residue or not. First it checks to see if it is a letter, and then if it is one of the disallowed letters, returns false, else returns true.

InvalidResidueException

main

public static void main(java.lang.String[] args)

getMutationString

public static java.lang.String getMutationString(java.lang.String[] args)


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.