Victor
 All Data Structures Functions Variables Friends Pages
NWAlignNoTermGaps Class Reference

Implement Needleman-Wunsch global alignment with no penalty for the terminal hangouts of the sequence. More...

+ Inheritance diagram for NWAlignNoTermGaps:
+ Collaboration diagram for NWAlignNoTermGaps:

Public Types

enum  
 Numeric value used to identify invalid alignment positions.
 

Public Member Functions

 NWAlignNoTermGaps (AlignmentData *ad, GapFunction *gf, ScoringScheme *ss)
 Default constructor. More...
 
 NWAlignNoTermGaps (AlignmentData *ad, GapFunction *gf, ScoringScheme *ss, const vector< unsigned int > &v1, const vector< unsigned int > &v2)
 Constructor with weighted alignment positions. More...
 
 NWAlignNoTermGaps (const NWAlignNoTermGaps &orig)
 Copy constructor. More...
 
virtual ~NWAlignNoTermGaps ()
 Destructor.
 
virtual void copy (const NWAlignNoTermGaps &orig)
 Copy orig object to this object ("deep copy"). More...
 
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 NWAlignNoTermGapsnewCopy ()
 Construct a new "deep copy" of this object.
 
virtual Traceback next (const Traceback &tb) const
 Return next Traceback element.
 
NWAlignNoTermGapsoperator= (const NWAlignNoTermGaps &orig)
 Assignment operator. More...
 
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 Needleman-Wunsch global alignment with no penalty for the terminal hangouts of the sequence.

Constructor & Destructor Documentation

Default constructor.

Parameters
ad
gf
ss
NWAlignNoTermGaps ( AlignmentData ad,
GapFunction gf,
ScoringScheme ss,
const vector< unsigned int > &  v1,
const vector< unsigned int > &  v2 
)

Constructor with weighted alignment positions.

Parameters
ad
gf
ss
v1
v2

Copy constructor.

Parameters
orig

Member Function Documentation

void copy ( const NWAlignNoTermGaps orig)
virtual

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

Parameters
orig
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
NWAlignNoTermGaps & operator= ( const NWAlignNoTermGaps orig)

Assignment operator.

Parameters
orig
Returns
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: