|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.biojava3.alignment.template.AbstractScorer
org.biojava3.alignment.template.AbstractMatrixAligner<S,C>
S - each element of the alignment Profile is of type SC - each element of an AlignedSequence is a Compound of type Cpublic abstract class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>
Implements common code for an Aligner which builds a score matrix during computation.
| Field Summary | |
|---|---|
protected int[] |
anchors
|
protected int |
cutsPerSection
|
protected GapPenalty |
gapPenalty
|
protected short |
max
|
protected short |
min
|
protected Profile<S,C> |
profile
|
protected short |
score
|
protected short[][][] |
scores
|
protected long |
time
|
protected int[] |
xyMax
|
protected int[] |
xyStart
|
| Constructor Summary | |
|---|---|
protected |
AbstractMatrixAligner()
Before running an alignment, data must be sent in via calls to setGapPenalty(GapPenalty) and
setSubstitutionMatrix(SubstitutionMatrix). |
protected |
AbstractMatrixAligner(GapPenalty gapPenalty,
SubstitutionMatrix<C> subMatrix)
Prepares for an alignment. |
protected |
AbstractMatrixAligner(GapPenalty gapPenalty,
SubstitutionMatrix<C> subMatrix,
boolean local)
Prepares for an alignment. |
| Method Summary | |
|---|---|
protected void |
align()
|
protected abstract CompoundSet<C> |
getCompoundSet()
|
protected abstract List<C> |
getCompoundsOfQuery()
|
protected abstract List<C> |
getCompoundsOfTarget()
|
long |
getComputationTime()
Returns the computation time needed for an alignment computed in nanoseconds. |
GapPenalty |
getGapPenalty()
Returns the gap penalties. |
int |
getMaxScore()
Returns maximum possible score. |
int |
getMinScore()
Returns minimum possible score. |
Profile<S,C> |
getProfile()
Returns the alignment Profile produced by this alignment algorithm. |
int |
getScore()
Returns score resulting from algorithm. |
short[][][] |
getScoreMatrix()
Returns the entire score matrix built during alignment. |
String |
getScoreMatrixAsString()
Returns a depiction of the score matrix as a String. |
protected abstract int[] |
getScoreMatrixDimensions()
|
SubstitutionMatrix<C> |
getSubstitutionMatrix()
Returns the substitution matrix. |
protected abstract short |
getSubstitutionScore(int queryColumn,
int targetColumn)
|
protected short[] |
getSubstitutionScoreVector(int queryColumn)
|
protected short[] |
getSubstitutionScoreVector(int queryColumn,
int[] subproblem)
|
boolean |
isLocal()
Returns whether alignment finds a region of similarity rather than aligning every compound. |
protected abstract boolean |
isReady()
|
boolean |
isStoringScoreMatrix()
Returns choice to cache the score matrix or to save memory by deleting score matrix after alignment. |
protected void |
reset()
|
protected void |
resetAnchors()
|
void |
setGapPenalty(GapPenalty gapPenalty)
Sets the gap penalties. |
protected abstract void |
setProfile(List<AlignedSequence.Step> sx,
List<AlignedSequence.Step> sy)
|
void |
setStoringScoreMatrix(boolean storingScoreMatrix)
Sets choice to cache the score matrix or to save memory by deleting score matrix after alignment. |
void |
setSubstitutionMatrix(SubstitutionMatrix<C> subMatrix)
Sets the substitution matrix. |
| Methods inherited from class org.biojava3.alignment.template.AbstractScorer |
|---|
getDistance, getDistance, getSimilarity, getSimilarity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojava3.alignment.template.Scorer |
|---|
getDistance, getDistance, getSimilarity, getSimilarity |
| Field Detail |
|---|
protected GapPenalty gapPenalty
protected int[] anchors
protected int cutsPerSection
protected Profile<S extends Sequence<C>,C extends Compound> profile
protected int[] xyMax
protected int[] xyStart
protected short max
protected short min
protected short score
protected short[][][] scores
protected long time
| Constructor Detail |
|---|
protected AbstractMatrixAligner()
setGapPenalty(GapPenalty) and
setSubstitutionMatrix(SubstitutionMatrix).
protected AbstractMatrixAligner(GapPenalty gapPenalty,
SubstitutionMatrix<C> subMatrix)
gapPenalty - the gap penalties used during alignmentsubMatrix - the set of substitution scores used during alignment
protected AbstractMatrixAligner(GapPenalty gapPenalty,
SubstitutionMatrix<C> subMatrix,
boolean local)
gapPenalty - the gap penalties used during alignmentsubMatrix - the set of substitution scores used during alignmentlocal - if true, find a region of similarity rather than aligning every compound| Method Detail |
|---|
public GapPenalty getGapPenalty()
public SubstitutionMatrix<C> getSubstitutionMatrix()
public boolean isLocal()
public boolean isStoringScoreMatrix()
public void setGapPenalty(GapPenalty gapPenalty)
gapPenalty - the gap penalties used during alignmentpublic void setSubstitutionMatrix(SubstitutionMatrix<C> subMatrix)
subMatrix - the set of substitution scores used during alignmentpublic void setStoringScoreMatrix(boolean storingScoreMatrix)
storingScoreMatrix - choice to cache the score matrixpublic short[][][] getScoreMatrix()
MatrixAlignerSequence.
getScoreMatrix in interface MatrixAligner<S extends Sequence<C>,C extends Compound>public String getScoreMatrixAsString()
MatrixAlignerString. This may include additional description such as
labels for each dimension: element from query sequence, element from target sequence, and meaning of each score.
getScoreMatrixAsString in interface MatrixAligner<S extends Sequence<C>,C extends Compound>public long getComputationTime()
Aligner
getComputationTime in interface Aligner<S extends Sequence<C>,C extends Compound>public Profile<S,C> getProfile()
AlignerProfile produced by this alignment algorithm.
getProfile in interface Aligner<S extends Sequence<C>,C extends Compound>public int getMaxScore()
Scorer
getMaxScore in interface Scorerpublic int getMinScore()
Scorer
getMinScore in interface Scorerpublic int getScore()
ScorerScorer.getScore() - Scorer.getMinScore()) / (Scorer.getMaxScore() - Scorer.getMinScore()).
getScore in interface Scorerprotected void align()
protected short[] getSubstitutionScoreVector(int queryColumn)
protected short[] getSubstitutionScoreVector(int queryColumn,
int[] subproblem)
protected void reset()
protected void resetAnchors()
protected abstract CompoundSet<C> getCompoundSet()
protected abstract List<C> getCompoundsOfQuery()
protected abstract List<C> getCompoundsOfTarget()
protected abstract int[] getScoreMatrixDimensions()
protected abstract short getSubstitutionScore(int queryColumn,
int targetColumn)
protected abstract boolean isReady()
protected abstract void setProfile(List<AlignedSequence.Step> sx,
List<AlignedSequence.Step> sy)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||