Victor
 All Data Structures Functions Variables Friends Pages
SWAlign Class Reference

Implement Smith-Waterman local alignment. More...

+ Inheritance diagram for SWAlign:
+ Collaboration diagram for SWAlign:

Public Types

enum  
 Numeric value used to identify invalid alignment positions.
 

Public Member Functions

 SWAlign (AlignmentData *ad, GapFunction *gf, ScoringScheme *ss)
 Default constructor. More...
 
 SWAlign (AlignmentData *ad, GapFunction *gf, ScoringScheme *ss, const vector< unsigned int > &v1, const vector< unsigned int > &v2)
 Constructor with weighted alignment positions.
 
 SWAlign (const SWAlign &orig)
 Copy constructor.
 
virtual ~SWAlign ()
 Destructor.
 
virtual void copy (const SWAlign &orig)
 Copy orig object to this object ("deep copy").
 
virtual void copy (const Align &orig)
 Copy orig object to this object ("deep copy"). More...
 
virtual void doMatch (ostream &os) const
 Output of alignment result.
 
virtual void doMatchPlusHeader (ostream &os, string headerTarget, string headerTemplate) const
 Output of alignment result (including headers of the two sequences).
 
virtual vector< AlignmentgenerateMultiMatch (unsigned int num=1)
 Generate and return an ensemble of suboptimal alignments. More...
 
virtual vector< double > generateMultiMatchScore (unsigned int num=10)
 Generate and return scores of an ensemble of suboptimal alignments. More...
 
AlignmentDatagetAlignmentData ()
 Return AlignmentData pointer.
 
GapFunctiongetGapFunction ()
 Return GapFunction pointer.
 
virtual vector< string > getMatch () const
 Return two-element array containing an alignment with maximal score.
 
virtual vector< vector< int > > getMatchSubset ()
 Return subset corresponding to match.
 
virtual void getMultiMatch ()
 Return two-element array containing an alignment with maximal score.
 
virtual vector< double > getMultiMatchScore (unsigned int num=10)
 Return alignment scores of an ensemble of suboptimal alignments.
 
virtual double getScore () const
 Return alignment score.
 
ScoringSchemegetScoringScheme ()
 Return ScoringScheme pointer.
 
virtual SWAlignnewCopy ()
 Construct a new "deep copy" of this object. More...
 
virtual Traceback next (const Traceback &tb) const
 Return next Traceback element.
 
SWAlignoperator= (const SWAlign &orig)
 Assignment operator.
 
virtual void outputMultiMatch (ostream &os, unsigned int num=10, bool fasta=false)
 Generate and output an ensemble of suboptimal alignments.
 
virtual void pCalculateMatrix (bool update=true)
 Update/create matrix values. More...
 
virtual void pCalculateMatrix (const vector< unsigned int > &v1, const vector< unsigned int > &v2, bool update=true)
 Update/create weighted matrix values. More...
 
void pModifyMatrix (int i, int j)
 Modify matrix during suboptimal alignment generation. More...
 
virtual void recalculateMatrix ()
 Recalculate the alignment matrix.
 
void setPenalties (double mul, double add)
 Set penalties for suboptimal alignments. More...
 
virtual vector< int > shiftMatchSubset (vector< int > inputVector, int newStartPos)
 Return vector with positions shifted depending on new position.
 

Data Fields

AlignmentDataad
 Pointer to AlignmentData.
 
vector< vector< Traceback > > B
 Traceback matrix.
 
Traceback B0
 Starting point of the traceback.
 
vector< vector< double > > F
 Score matrix.
 
GapFunctiongf
 Pointer to GapFunction.
 
unsigned int m
 Length of template sequence.
 
unsigned int n
 Length of target sequence.
 
double penaltyAdd
 Additive penalty for suboptimal alignment.
 
double penaltyMul
 Multiplicative penalty for suboptimal alignment.
 
vector< int > res1Pos
 Aligned positions for target sequence.
 
vector< int > res2Pos
 Aligned positions for template sequence.
 
ScoringSchemess
 Pointer to ScoringScheme.
 

Detailed Description

Implement Smith-Waterman local alignment.

Constructor & Destructor Documentation

SWAlign ( AlignmentData ad,
GapFunction gf,
ScoringScheme ss 
)

Default constructor.

Parameters
ad
gf
ss

Member Function Documentation

void copy ( const Align orig)
virtualinherited

Copy orig object to this object ("deep copy").

Parameters
orig
vector< Alignment > generateMultiMatch ( unsigned int  num = 1)
virtualinherited

Generate and return an ensemble of suboptimal alignments.

Parameters
num
Returns
vector< double > generateMultiMatchScore ( unsigned int  num = 10)
virtualinherited

Generate and return scores of an ensemble of suboptimal alignments.

Parameters
num
Returns
SWAlign * newCopy ( )
virtual

Construct a new "deep copy" of this object.

Returns

Implements Align.

void pCalculateMatrix ( bool  update = true)
virtual

Update/create matrix values.

Parameters
update

Implements Align.

void pCalculateMatrix ( const vector< unsigned int > &  v1,
const vector< unsigned int > &  v2,
bool  update = true 
)
virtual

Update/create weighted matrix values.

Parameters
v1
v2
update

Implements Align.

void pModifyMatrix ( int  i,
int  j 
)
inherited

Modify matrix during suboptimal alignment generation.

Parameters
i
j
void setPenalties ( double  mul,
double  add 
)
inherited

Set penalties for suboptimal alignments.

Parameters
mul
add

The documentation for this class was generated from the following files: