Package org.biojava.nbio.alignment
Class SimpleGapPenalty
java.lang.Object
org.biojava.nbio.alignment.SimpleGapPenalty
- All Implemented Interfaces:
- Serializable,- GapPenalty
Implements a data structure for the gap penalties used during a sequence alignment routine.
- Author:
- Mark Chapman
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.biojava.nbio.alignment.template.GapPenaltyGapPenalty.Type
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new set of gap penalties using the defaults.SimpleGapPenalty(int gop, int gep) Creates a new set of gap penalties.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the negative of the extension penalty passed to the constructor.intReturns the negative of the opening penalty passed to the constructor.getType()ReturnsGapPenalty.Typestored.static voidsetDefaultExtensionPenalty(int gep) Sets the default gap extension penalty.static voidsetDefaultOpenPenalty(int gop) Sets the default gap open penalty.voidsetExtensionPenalty(int gep) Sets penalty given when an already open gap elongates by a single elementvoidsetOpenPenalty(int gop) Sets penalty given when a deletion or insertion gap first opens
- 
Constructor Details- 
SimpleGapPenaltypublic SimpleGapPenalty()Creates a new set of gap penalties using the defaults.
- 
SimpleGapPenaltyCreates a new set of gap penalties.- Parameters:
- gop- the gap open penalty; should be nonnegative
- gep- the gap extension penalty; should be nonnegative
 
 
- 
- 
Method Details- 
setDefaultExtensionPenaltySets the default gap extension penalty.- Parameters:
- gep- the default gap extension penalty
 
- 
setDefaultOpenPenaltySets the default gap open penalty.- Parameters:
- gop- the default gap open penalty
 
- 
getExtensionPenaltyReturns the negative of the extension penalty passed to the constructor.- Specified by:
- getExtensionPenaltyin interface- GapPenalty
- Returns:
- gap extension penalty
 
- 
getOpenPenaltyReturns the negative of the opening penalty passed to the constructor.- Specified by:
- getOpenPenaltyin interface- GapPenalty
- Returns:
- gap open penalty
 
- 
getTypeDescription copied from interface:GapPenaltyReturnsGapPenalty.Typestored.- Specified by:
- getTypein interface- GapPenalty
- Returns:
- gap penalty type
 
- 
setExtensionPenaltyDescription copied from interface:GapPenaltySets penalty given when an already open gap elongates by a single element- Specified by:
- setExtensionPenaltyin interface- GapPenalty
- Parameters:
- gep- Should be nonnegative
 
- 
setOpenPenaltyDescription copied from interface:GapPenaltySets penalty given when a deletion or insertion gap first opens- Specified by:
- setOpenPenaltyin interface- GapPenalty
- Parameters:
- gop- Should be nonnegative
 
 
-