public class SmithWaterman extends AlignmentAlgorithm
pairwiseAlignment
of this class. It
uses affine gap penalties if and only if the expenses of a delete or insert
operation are unequal to the expenses of gap extension. This uses
significantly more memory (four times as much) and increases the runtime if
swapping is performed.Constructor and Description |
---|
SmithWaterman()
Default constructor.
|
SmithWaterman(short match,
short replace,
short insert,
short delete,
short gapExtend,
SubstitutionMatrix matrix)
Constructs the new SmithWaterman alignment object.
|
Modifier and Type | Method and Description |
---|---|
short |
getDelete() |
short |
getGapExt() |
short |
getInsert() |
short |
getMatch() |
short |
getReplace() |
SubstitutionMatrix |
getSubMatrix() |
AlignmentPair |
pairwiseAlignment(SymbolList query,
SymbolList subject)
Overrides the method inherited from the NeedlemanWunsch and performs only
a local alignment.
|
void |
setDelete(short del)
Overrides the method inherited from the NeedlemanWunsch and sets the
penalty for a delete operation to the specified value.
|
void |
setGapExt(short ge)
Overrides the method inherited from the NeedlemanWunsch and sets the
penalty for an extension of any gap (insert or delete) to the specified
value.
|
void |
setInsert(short ins)
Overrides the method inherited from the NeedlemanWunsch and sets the
penalty for an insert operation to the specified value.
|
void |
setMatch(short ma)
Overrides the method inherited from the NeedlemanWunsch and sets the
penalty for a match operation to the specified value.
|
void |
setReplace(short rep)
Overrides the method inherited from the NeedlemanWunsch and sets the
penalty for a replace operation to the specified value.
|
void |
setSubMatrix(SubstitutionMatrix subMatrix) |
alignAll
public SmithWaterman()
public SmithWaterman(short match, short replace, short insert, short delete, short gapExtend, SubstitutionMatrix matrix)
SubstitutionMatrix
equals the alphabet of both the query and the target
Sequence
. The alignment parameters here are expenses and not
scores as they are in the NeedlemanWunsch
object. scores are
just given by multiplying the expenses with (-1)
. For
example you could use parameters like "-2, 5, 3, 3, 0". If the expenses
for gap extension are equal to the cost of starting a gap (delete or
insert), no affine gap penalties are used, which saves memory.match
- expenses for a matchreplace
- expenses for a replace operationinsert
- expenses for a gap opening in the query sequencedelete
- expenses for a gap opening in the target sequencegapExtend
- expenses for the extension of a gap which was started earlier.matrix
- the SubstitutionMatrix
object to use.public short getDelete()
public short getGapExt()
public short getInsert()
public short getMatch()
public short getReplace()
public SubstitutionMatrix getSubMatrix()
public AlignmentPair pairwiseAlignment(SymbolList query, SymbolList subject) throws BioRuntimeException
pairwiseAlignment
in class AlignmentAlgorithm
BioRuntimeException
AlignmentAlgorithm.pairwiseAlignment(org.biojava.bio.symbol.SymbolList,
org.biojava.bio.symbol.SymbolList)
public void setDelete(short del)
del
- costs for a single deletion operationpublic void setGapExt(short ge)
ge
- costs for any gap extensionpublic void setInsert(short ins)
ins
- costs for a single insert operationpublic void setMatch(short ma)
ma
- costs for a single match operationpublic void setReplace(short rep)
rep
- costs for a single replace operationpublic void setSubMatrix(SubstitutionMatrix subMatrix)
subMatrix
- the subMatrix to setCopyright © 2014 BioJava. All rights reserved.