public class SoftAlignmentSamplingAlgorithm extends AbstractGapAlignmentAlgorithm<SoftPathModel.SoftMatrixEntry,PathList>
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULTBETA |
static int |
DEFAULTPATHLIMIT |
Constructor and Description |
---|
SoftAlignmentSamplingAlgorithm(AlignmentSpecification alignmentSpecification)
This sets up an AlignmentAlgorithm instance according to the given
specification.
|
Modifier and Type | Method and Description |
---|---|
SoftPathModel.SoftMatrixEntry |
createDelInitial(SoftPathModel.SoftMatrixEntry delOld,
int i,
double delLocal)
This method should not be called from outside!
The subclass specifies the entry (i+1,0) of the alignment matrix with
this method given the entry (i,0).
|
SoftPathModel.SoftMatrixEntry |
createInitial()
This method should not be called from outside!
The subclass specifies the entry (0,0) of the alignment matrix with this
method.
|
SoftPathModel.SoftMatrixEntry |
createInsInitial(SoftPathModel.SoftMatrixEntry insOld,
int j,
double insLocal)
This method should not be called from outside!
The subclass specifies the entry (0,j+1) of the alignment matrix with
this method given the entry (0,j).
|
SoftPathModel.SoftMatrixEntry |
createNewEntry(SoftPathModel.SoftMatrixEntry delOld,
SoftPathModel.SoftMatrixEntry insOld,
SoftPathModel.SoftMatrixEntry repOld,
int i,
int j,
double delLocal,
double insLocal,
double repLocal)
This method should not be called from outside!
The subclass specifies the entry (i+1,j+1) of the alignment matrix with
this method given the entries (i,j+1) (deletion), (i+1,j) (insertion) and
(i,j) (replacement).
|
double |
getApproxThreshold()
Returns the threshold for which exponents within the softmin function
will be disregarded.
|
double |
getBeta() |
int |
getPathLimit()
Returns the the number of paths that shall be sampled.
|
void |
setApproxThreshold(double approxThreshold)
Sets the threshold for which exponents within the softmin function will
be disregarded.
|
void |
setBeta(double beta) |
void |
setPathLimit(int pathLimit)
This sets the number of paths that shall be sampled.
|
PathList |
transformToResult(SoftPathModel.SoftMatrixEntry[][] alignmentMatrix,
Sequence a,
Sequence b)
This method should not be called from outside!
The subclass uses this method to transform the alignment matrix and the
input sequences to the actual alignment result.
|
calculateAlignment, createGenericArray, createGenericMatrix, getEntryClass, getLastAlignmentMatrix, getResultClass, getSpecification, getWeightThreshold, setWeightThreshold
public static final double DEFAULTBETA
public static final int DEFAULTPATHLIMIT
public SoftAlignmentSamplingAlgorithm(AlignmentSpecification alignmentSpecification)
alignmentSpecification
- an AlignmentSpecification.public void setBeta(double beta)
beta
- The parameter defining the "softness" of the alignment. For
beta towards infinity this alignment becomes closer to the strict
alignment. For beta = 0 all possible alignments are equally considered
and softmin returns the average. Please note that a low beta value might
lead to a very rough approximation and that for higher sequence lengths
beta has to be higher, too.public double getBeta()
public int getPathLimit()
public void setPathLimit(int pathLimit)
pathLimit
- the number of paths that shall be sampled.public void setApproxThreshold(double approxThreshold)
approxThreshold
- the threshold for which exponents within the
softmin function will be disregarded.public double getApproxThreshold()
public SoftPathModel.SoftMatrixEntry createInitial()
createInitial
in class AbstractGapAlignmentAlgorithm<SoftPathModel.SoftMatrixEntry,PathList>
public SoftPathModel.SoftMatrixEntry createDelInitial(SoftPathModel.SoftMatrixEntry delOld, int i, double delLocal)
createDelInitial
in class AbstractGapAlignmentAlgorithm<SoftPathModel.SoftMatrixEntry,PathList>
delOld
- the matrix entry (i,0)i
- i+1delLocal
- the local deletion cost, defined as the weighted sum over
all comparator deletion costs.public SoftPathModel.SoftMatrixEntry createInsInitial(SoftPathModel.SoftMatrixEntry insOld, int j, double insLocal)
createInsInitial
in class AbstractGapAlignmentAlgorithm<SoftPathModel.SoftMatrixEntry,PathList>
insOld
- the matrix entry (0,j+1)j
- j+1insLocal
- the local insertion cost, defined as the weighted sum
over all comparator insertion costs.public SoftPathModel.SoftMatrixEntry createNewEntry(SoftPathModel.SoftMatrixEntry delOld, SoftPathModel.SoftMatrixEntry insOld, SoftPathModel.SoftMatrixEntry repOld, int i, int j, double delLocal, double insLocal, double repLocal)
createNewEntry
in class AbstractGapAlignmentAlgorithm<SoftPathModel.SoftMatrixEntry,PathList>
delOld
- the matrix entry (i,j+1)insOld
- the matrix entry (i+1,j)repOld
- the matrix entry (i,j)i
- i+1j
- j+1delLocal
- the local deletion cost, defined as the weighted sum over
all comparator deletion costs.insLocal
- the local insertion cost, defined as the weighted sum
over all comparator insertion costs.repLocal
- the local replacement cost, defined as the weighted sum
over all comparator replacement costs.public PathList transformToResult(SoftPathModel.SoftMatrixEntry[][] alignmentMatrix, Sequence a, Sequence b)
transformToResult
in class AbstractGapAlignmentAlgorithm<SoftPathModel.SoftMatrixEntry,PathList>
alignmentMatrix
- the alignment matrix.a
- the first sequence.b
- th second sequence.Copyright (C) 2013-2015 Benjamin Paaßen, Georg Zentgraf, AG Theoretical Computer Science, Centre of Excellence Cognitive Interaction Technology (CITEC), University of Bielefeld, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/tcs . This documentation is licensed under the conditions of CC-BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/