util.conversions
Interface Conversion

All Known Implementing Classes:
DNA_AA_Conversion, DNA_MK_Conversion, DNA_RY_Conversion, DNA_SW_Conversion, FibonacciSwitchConversion, Test_2_Conversion, TEST_Conversion

public interface Conversion

This interface describes the functionality that is offered by conversions/translations from one sequence to another. e.g. : DNA/RNA --> Pryrimidine&Purine This object oriented approach is needed to support the modularity that is needed.

Author:
Michiel Van Bel

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.
 

Method Detail

getName

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

Returns:
The unique name of the conversion

getParamName

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.

Returns:
String with parametername (unique).

makeConversion

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.

Parameters:
s - The original sequence
Returns:
The translated string

setOptions

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.

Parameters:
args - The possible options (name+value)
Returns:
Whether setting the options succeeded (true) or not (false).

getNumberOfDifferentCharacters

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).

Returns:
The number of different characters

getDifferentCharacters

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.

Returns:
All posible characters used by the conversion