util.conversions.implementations
Class DNA_AA_Conversion

java.lang.Object
  extended by util.conversions.implementations.DNA_AA_Conversion
All Implemented Interfaces:
Conversion

public class DNA_AA_Conversion
extends java.lang.Object
implements Conversion


Field Summary
static java.lang.String name
           
 
Constructor Summary
DNA_AA_Conversion()
           
 
Method Summary
 char[] getDifferentCharacters()
          This method returns all possible different characters that occur after the conversion of a sequence.
 java.lang.String getName()
          Returns the name of conversion.
 int getNumberOfDifferentCharacters()
          This method returns the number of different characters present in the final representation after a conversion on a sequence has occured (excluding the 'N' character).
 java.lang.String getParamName()
          Returns the parameter name of the conversion.
 java.lang.String makeConversion(java.lang.String s)
          This method performs the actual conversion from one string to another.
 boolean setOptions(java.lang.String[] args)
          This method sets the possible options for this conversion.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public static final java.lang.String name
See Also:
Constant Field Values
Constructor Detail

DNA_AA_Conversion

public DNA_AA_Conversion()
Method Detail

getName

public java.lang.String getName()
Returns the name of conversion. This name should be unique among all other conversionnames, active or not (just in case).

Specified by:
getName in interface Conversion
Returns:
The unique name of the conversion

makeConversion

public java.lang.String makeConversion(java.lang.String s)
This method performs the actual conversion from one string to another. This can for example be the translation from RNA to pyrimidine/purine sequence, or the translation from the primary structure to the secondary structure.

Specified by:
makeConversion in interface Conversion
Parameters:
s - The original sequence
Returns:
The translated string

setOptions

public boolean setOptions(java.lang.String[] args)
This method sets the possible options for this conversion. These options are of course dependend on the type of conversion, so this method is as general as possible.

Specified by:
setOptions in interface Conversion
Parameters:
args - The possible options (name+value)
Returns:
Whether setting the options succeeded (true) or not (false).

getParamName

public java.lang.String getParamName()
Returns the parameter name of the conversion. This is usefull for compatibility with gui's and other programs which rely on the parameter for identification.

Specified by:
getParamName in interface Conversion
Returns:
String with parametername (unique).

getNumberOfDifferentCharacters

public int getNumberOfDifferentCharacters()
This method returns the number of different characters present in the final representation after a conversion on a sequence has occured (excluding the 'N' character).

Specified by:
getNumberOfDifferentCharacters in interface Conversion
Returns:
The number of different characters

getDifferentCharacters

public char[] getDifferentCharacters()
This method returns all possible different characters that occur after the conversion of a sequence. This is of course a description of the alphabet used by the conversion. The 'N' character is excluded.

Specified by:
getDifferentCharacters in interface Conversion
Returns:
All posible characters used by the conversion