org.biojava3.alignment.template
Class AbstractProfileProfileAligner<S extends Sequence<C>,C extends Compound>

java.lang.Object
  extended by org.biojava3.alignment.template.AbstractScorer
      extended by org.biojava3.alignment.template.AbstractMatrixAligner<S,C>
          extended by org.biojava3.alignment.template.AbstractProfileProfileAligner<S,C>
Type Parameters:
S - each Sequence in the pair of alignment Profiles is of type S
C - each element of an AlignedSequence is a Compound of type C
All Implemented Interfaces:
Aligner<S,C>, MatrixAligner<S,C>, ProfileProfileAligner<S,C>, ProfileProfileScorer<S,C>, Scorer
Direct Known Subclasses:
SimpleProfileProfileAligner

public abstract class AbstractProfileProfileAligner<S extends Sequence<C>,C extends Compound>
extends AbstractMatrixAligner<S,C>
implements ProfileProfileAligner<S,C>

Implements common code for an Aligner for a pair of Profiles.

Author:
Mark Chapman

Field Summary
protected  ProfilePair<S,C> pair
           
 
Fields inherited from class org.biojava3.alignment.template.AbstractMatrixAligner
anchors, cutsPerSection, gapPenalty, max, min, profile, score, scores, time, xyMax, xyStart
 
Constructor Summary
protected AbstractProfileProfileAligner()
          Before running a profile-profile alignment, data must be sent in via calls to setQuery(Profile), setTarget(Profile), AbstractMatrixAligner.setGapPenalty(GapPenalty), and AbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).
protected AbstractProfileProfileAligner(Future<ProfilePair<S,C>> query, Future<ProfilePair<S,C>> target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)
          Prepares for a profile-profile alignment run concurrently.
protected AbstractProfileProfileAligner(Future<ProfilePair<S,C>> query, Profile<S,C> target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)
          Prepares for a profile-profile alignment run concurrently.
protected AbstractProfileProfileAligner(Profile<S,C> query, Future<ProfilePair<S,C>> target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)
          Prepares for a profile-profile alignment run concurrently.
protected AbstractProfileProfileAligner(Profile<S,C> query, Profile<S,C> target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)
          Prepares for a profile-profile alignment.
 
Method Summary
protected  CompoundSet<C> getCompoundSet()
           
protected  List<C> getCompoundsOfQuery()
           
protected  List<C> getCompoundsOfTarget()
           
 ProfilePair<S,C> getPair()
          Returns alignment profile pair.
 Profile<S,C> getQuery()
          Returns the first profile of the pair.
protected  int[] getScoreMatrixDimensions()
           
protected  short getSubstitutionScore(int queryColumn, int targetColumn)
           
 Profile<S,C> getTarget()
          Returns the second profile of the pair.
protected  boolean isReady()
           
protected  void reset()
           
 void setQuery(Profile<S,C> query)
          Sets the query Profile.
 void setTarget(Profile<S,C> target)
          Sets the target Profile.
 
Methods inherited from class org.biojava3.alignment.template.AbstractMatrixAligner
align, getComputationTime, getGapPenalty, getMaxScore, getMinScore, getProfile, getScore, getScoreMatrix, getScoreMatrixAsString, getSubstitutionMatrix, getSubstitutionScoreVector, getSubstitutionScoreVector, isLocal, isStoringScoreMatrix, resetAnchors, setGapPenalty, setProfile, setStoringScoreMatrix, setSubstitutionMatrix
 
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.Aligner
getComputationTime, getProfile
 
Methods inherited from interface org.biojava3.alignment.template.Scorer
getDistance, getDistance, getMaxScore, getMinScore, getScore, getSimilarity, getSimilarity
 

Field Detail

pair

protected ProfilePair<S extends Sequence<C>,C extends Compound> pair
Constructor Detail

AbstractProfileProfileAligner

protected AbstractProfileProfileAligner()
Before running a profile-profile alignment, data must be sent in via calls to setQuery(Profile), setTarget(Profile), AbstractMatrixAligner.setGapPenalty(GapPenalty), and AbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).


AbstractProfileProfileAligner

protected AbstractProfileProfileAligner(Profile<S,C> query,
                                        Profile<S,C> target,
                                        GapPenalty gapPenalty,
                                        SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment.

Parameters:
query - the first Profile of the pair to align
target - the second Profile of the pair to align
gapPenalty - the gap penalties used during alignment
subMatrix - the set of substitution scores used during alignment

AbstractProfileProfileAligner

protected AbstractProfileProfileAligner(Future<ProfilePair<S,C>> query,
                                        Future<ProfilePair<S,C>> target,
                                        GapPenalty gapPenalty,
                                        SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment run concurrently.

Parameters:
query - the first Profile of the pair to align, still to be calculated
target - the second Profile of the pair to align, still to be calculated
gapPenalty - the gap penalties used during alignment
subMatrix - the set of substitution scores used during alignment

AbstractProfileProfileAligner

protected AbstractProfileProfileAligner(Profile<S,C> query,
                                        Future<ProfilePair<S,C>> target,
                                        GapPenalty gapPenalty,
                                        SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment run concurrently.

Parameters:
query - the first Profile of the pair to align
target - the second Profile of the pair to align, still to be calculated
gapPenalty - the gap penalties used during alignment
subMatrix - the set of substitution scores used during alignment

AbstractProfileProfileAligner

protected AbstractProfileProfileAligner(Future<ProfilePair<S,C>> query,
                                        Profile<S,C> target,
                                        GapPenalty gapPenalty,
                                        SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment run concurrently.

Parameters:
query - the first Profile of the pair to align, still to be calculated
target - the second Profile of the pair to align
gapPenalty - the gap penalties used during alignment
subMatrix - the set of substitution scores used during alignment
Method Detail

setQuery

public void setQuery(Profile<S,C> query)
Sets the query Profile.

Parameters:
query - the first Profile of the pair to align

setTarget

public void setTarget(Profile<S,C> target)
Sets the target Profile.

Parameters:
target - the second Profile of the pair to align

getPair

public ProfilePair<S,C> getPair()
Description copied from interface: ProfileProfileAligner
Returns alignment profile pair.

Specified by:
getPair in interface ProfileProfileAligner<S extends Sequence<C>,C extends Compound>
Returns:
alignment profile pair

getQuery

public Profile<S,C> getQuery()
Description copied from interface: ProfileProfileScorer
Returns the first profile of the pair.

Specified by:
getQuery in interface ProfileProfileScorer<S extends Sequence<C>,C extends Compound>
Returns:
the first profile of the pair

getTarget

public Profile<S,C> getTarget()
Description copied from interface: ProfileProfileScorer
Returns the second profile of the pair.

Specified by:
getTarget in interface ProfileProfileScorer<S extends Sequence<C>,C extends Compound>
Returns:
the second profile of the pair

getCompoundSet

protected CompoundSet<C> getCompoundSet()
Specified by:
getCompoundSet in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>

getCompoundsOfQuery

protected List<C> getCompoundsOfQuery()
Specified by:
getCompoundsOfQuery in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>

getCompoundsOfTarget

protected List<C> getCompoundsOfTarget()
Specified by:
getCompoundsOfTarget in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>

getScoreMatrixDimensions

protected int[] getScoreMatrixDimensions()
Specified by:
getScoreMatrixDimensions in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>

getSubstitutionScore

protected short getSubstitutionScore(int queryColumn,
                                     int targetColumn)
Specified by:
getSubstitutionScore in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>

isReady

protected boolean isReady()
Specified by:
isReady in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>

reset

protected void reset()
Overrides:
reset in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>