org.biojava3.alignment
Class SimpleGapPenalty

java.lang.Object
  extended by org.biojava3.alignment.SimpleGapPenalty
All Implemented Interfaces:
GapPenalty

public class SimpleGapPenalty
extends Object
implements GapPenalty

Implements a data structure for the gap penalties used during a sequence alignment routine.

Author:
Mark Chapman

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava3.alignment.template.GapPenalty
GapPenalty.Type
 
Constructor Summary
SimpleGapPenalty()
          Creates a new set of gap penalties using the defaults.
SimpleGapPenalty(short gop, short gep)
          Creates a new set of gap penalties.
 
Method Summary
 short getExtensionPenalty()
          Returns penalty given when an already open gap elongates by a single element
 short getOpenPenalty()
          Returns penalty given when a deletion or insertion gap first opens
 GapPenalty.Type getType()
          Returns GapPenalty.Type stored.
static void setDefaultExtensionPenalty(short gep)
          Sets the default gap extension penalty.
static void setDefaultOpenPenalty(short gop)
          Sets the default gap open penalty.
 void setExtensionPenalty(short gep)
          Sets penalty given when an already open gap elongates by a single element
 void setOpenPenalty(short gop)
          Sets penalty given when a deletion or insertion gap first opens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleGapPenalty

public SimpleGapPenalty()
Creates a new set of gap penalties using the defaults.


SimpleGapPenalty

public SimpleGapPenalty(short gop,
                        short gep)
Creates a new set of gap penalties.

Parameters:
gop - the gap open penalty
gep - the gap extension penalty
Method Detail

setDefaultExtensionPenalty

public static void setDefaultExtensionPenalty(short gep)
Sets the default gap extension penalty.

Parameters:
gep - the default gap extension penalty

setDefaultOpenPenalty

public static void setDefaultOpenPenalty(short gop)
Sets the default gap open penalty.

Parameters:
gop - the default gap open penalty

getExtensionPenalty

public short getExtensionPenalty()
Description copied from interface: GapPenalty
Returns penalty given when an already open gap elongates by a single element

Specified by:
getExtensionPenalty in interface GapPenalty
Returns:
gap extension penalty

getOpenPenalty

public short getOpenPenalty()
Description copied from interface: GapPenalty
Returns penalty given when a deletion or insertion gap first opens

Specified by:
getOpenPenalty in interface GapPenalty
Returns:
gap open penalty

getType

public GapPenalty.Type getType()
Description copied from interface: GapPenalty
Returns GapPenalty.Type stored.

Specified by:
getType in interface GapPenalty
Returns:
gap penalty type

setExtensionPenalty

public void setExtensionPenalty(short gep)
Description copied from interface: GapPenalty
Sets penalty given when an already open gap elongates by a single element

Specified by:
setExtensionPenalty in interface GapPenalty
Parameters:
gep - gap extension penalty

setOpenPenalty

public void setOpenPenalty(short gop)
Description copied from interface: GapPenalty
Sets penalty given when a deletion or insertion gap first opens

Specified by:
setOpenPenalty in interface GapPenalty
Parameters:
gop - gap open penalty