org.aisb.bio.tools
Class PSSMFitnessFunction

java.lang.Object
  extended byorg.aisb.bio.tools.PSSMFitnessFunction
All Implemented Interfaces:
FitnessFunction

public class PSSMFitnessFunction
extends Object
implements FitnessFunction

This class implements a fitness function based on a PSSM.

The PSSM must be in a plain text file formatted as discussed in assignment B3.

Author:
Doug DeJulio

Constructor Summary
PSSMFitnessFunction()
           
 
Method Summary
 int fitness(Sequence inputSequence)
          Calculate the fitness of this sequence.
 int getMaximumScore()
          Calculate and return the maximum score.
 void loadFromFile(File pssmFile)
           
 void loadFromFile(String pssmFileName)
          Load the PSSM from a file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSSMFitnessFunction

public PSSMFitnessFunction()
Method Detail

fitness

public int fitness(Sequence inputSequence)
Description copied from interface: FitnessFunction
Calculate the fitness of this sequence.

Specified by:
fitness in interface FitnessFunction
Parameters:
inputSequence - The sequence under consideration.
Returns:
An integer representing the fitness.

getMaximumScore

public int getMaximumScore()
Calculate and return the maximum score.

Returns:
The maximum score.

loadFromFile

public void loadFromFile(String pssmFileName)
                  throws IOException
Load the PSSM from a file.

Parameters:
pssmFileName - The name of the PSSM file.
Throws:
IOException

loadFromFile

public void loadFromFile(File pssmFile)
                  throws IOException
Throws:
IOException