MTK++ Latest version: 0.2.0

Public Member Functions | Protected Member Functions | Protected Attributes
MTKpp::seqAlign Class Reference

Sequence Alignment. More...

#include <mtkpp/src/Molecule/seqAlign.h>

Collaboration diagram for MTKpp::seqAlign:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 seqAlign ()
 seqAlign Constructor
virtual ~seqAlign ()
 seqAlign Destructor.
int run ()
 Align Query onto Template.
int setTemplate (molecule *pMolecule)
 Set the template molecule.
int setQuery (molecule *pMolecule)
 Set the query molecule.
void setPAMFile (std::string pam)
 Set the PAM matrix to be used.
void setPAMSize (int s)
 Set the PAM matrix size.
void setPAMType (int i, std::string s)
 Set a PAM type.
void setPAMValue (int i, int j, double v)
 Set the value of the PAM matrix.
void printPAM ()
 Print PAM matrix.
void setAlgorithmType (int i)
 Set the Gap Penalty Type.
void setGapPenaltyType (int i)
 Set the Gap Penalty Type.
void setGapOpen (double d)
 Set the Gap-Open Parameter.
void setGapExtend (double d)
 Set the Gap-Entend Parameter.
int * getCorrMap ()
 Get the correspondence map.
void printResults ()
 Print the results.
double getSimScore (std::string i, std::string j)
 Get the PAM Score given two characters.

Protected Member Functions

int initMatchMatrix ()
 Initial Match Matrix.
int traceBack ()
 Trace back the Match Matrix.

Protected Attributes

moleculetMol
 Template molecule.
int tNRes
 Number of residues in template.
char * tCSeq
 Template character sequence.
int * tISeq
 Template int sequence.
moleculeqMol
 Query molecule.
int qNRes
 Number of residues in template.
char * qCSeq
 Query character sequence.
int * qISeq
 Template int sequence.
int algorithmType
 Algorith type.
int gapPenaltyType
 gap penalty type g = gap size d = gapOpen e = gapExtend
double gapOpen
 gap-open parameter
double gapExtend
 gap-extend parameter
int maxGap
 maximum gap size
int gapSize
 current gap size
std::string pamFile
 PAM Matrix File.
int pamSize
 PAM Size.
char * pamTypes
 PAM Size.
double * pam
 PAM Matrix.
double * matchMatrix
 Match Matrix.
int * maxIndices
 Index to max value in matchMatrix for current cell.
int bestI
 Row index of largest match matrix value.
int bestJ
 Column index of largest match matrix value.
double bestMatchMatrixValue
 Best Match Matrix value.
std::string alignmentA
 Alignment of the template.
std::string alignmentB
 Alignment of the query.
int * corrMap
 Residues of the query mapped onto the residue of the template.

Detailed Description

Sequence Alignment.


Constructor & Destructor Documentation

MTKpp::seqAlign::seqAlign ( )
MTKpp::seqAlign::~seqAlign ( ) [virtual]

seqAlign Destructor.

References corrMap, matchMatrix, maxIndices, pam, pamTypes, qCSeq, qISeq, tCSeq, and tISeq.


Member Function Documentation

int MTKpp::seqAlign::run ( )

Align Query onto Template.

Returns:
success

References MTKpp::errorLogger, initMatchMatrix(), printResults(), MTKpp::errorHandler::throwError(), and traceBack().

Referenced by main().

int MTKpp::seqAlign::setTemplate ( molecule pMolecule)

Set the template molecule.

Parameters:
pMoleculemolecule pointer
Returns:
success

References MTKpp::errorLogger, MTKpp::molecule::getNumSubMolecules(), MTKpp::molecule::getRes1LSymbols(), MTKpp::INFO, pamSize, pamTypes, tCSeq, MTKpp::errorHandler::throwError(), tISeq, tMol, and tNRes.

Referenced by main().

int MTKpp::seqAlign::setQuery ( molecule pMolecule)

Set the query molecule.

Parameters:
pMoleculemolecule pointer
Returns:
success

References corrMap, MTKpp::errorLogger, MTKpp::molecule::getNumSubMolecules(), MTKpp::molecule::getRes1LSymbols(), MTKpp::INFO, pamSize, pamTypes, qCSeq, qISeq, qMol, qNRes, and MTKpp::errorHandler::throwError().

Referenced by main().

void MTKpp::seqAlign::setPAMFile ( std::string  pam)

Set the PAM matrix to be used.

Parameters:
pamPAM matrix file

PAM: Point Accepted Mutation

References pamFile.

Referenced by MTKpp::pamParser::Read().

void MTKpp::seqAlign::setPAMSize ( int  s)

Set the PAM matrix size.

Parameters:
ssize

References MTKpp::errorLogger, pam, pamSize, pamTypes, and MTKpp::errorHandler::throwError().

Referenced by MTKpp::pamParser::Read().

void MTKpp::seqAlign::setPAMType ( int  i,
std::string  s 
)

Set a PAM type.

Parameters:
irow index
spam type

References pamSize, and pamTypes.

Referenced by MTKpp::pamParser::Read().

void MTKpp::seqAlign::setPAMValue ( int  i,
int  j,
double  v 
)

Set the value of the PAM matrix.

Parameters:
irow index
jcolumn index
vvalue

References MTKpp::errorLogger, pam, pamSize, and MTKpp::errorHandler::throwError().

Referenced by MTKpp::pamParser::Read().

void MTKpp::seqAlign::printPAM ( )
void MTKpp::seqAlign::setAlgorithmType ( int  i)

Set the Gap Penalty Type.

Parameters:
itype

References algorithmType.

Referenced by main().

void MTKpp::seqAlign::setGapPenaltyType ( int  i)

Set the Gap Penalty Type.

Parameters:
itype

References gapPenaltyType.

Referenced by main().

void MTKpp::seqAlign::setGapOpen ( double  d)

Set the Gap-Open Parameter.

Parameters:
dgap-open parameter

References gapOpen.

Referenced by main().

void MTKpp::seqAlign::setGapExtend ( double  d)

Set the Gap-Entend Parameter.

Parameters:
dgap-extend parameter

References gapExtend.

Referenced by main().

int * MTKpp::seqAlign::getCorrMap ( )

Get the correspondence map.

Returns:
correspondence map

References corrMap.

Referenced by main().

void MTKpp::seqAlign::printResults ( )
double MTKpp::seqAlign::getSimScore ( std::string  i,
std::string  j 
)

Get the PAM Score given two characters.

Parameters:
ifirst residue
jsecond residue
Returns:
pam score

References pam, pamSize, and pamTypes.

Referenced by main(), and printResults().

int MTKpp::seqAlign::initMatchMatrix ( ) [protected]
int MTKpp::seqAlign::traceBack ( ) [protected]

Trace back the Match Matrix.

Returns:
success

References algorithmType, alignmentA, alignmentB, bestI, bestJ, corrMap, MTKpp::errorLogger, maxGap, maxIndices, qCSeq, qNRes, tCSeq, and MTKpp::errorHandler::throwError().

Referenced by run().


Member Data Documentation

Template molecule.

Referenced by seqAlign(), and setTemplate().

int MTKpp::seqAlign::tNRes [protected]

Number of residues in template.

Referenced by initMatchMatrix(), seqAlign(), and setTemplate().

char* MTKpp::seqAlign::tCSeq [protected]

Template character sequence.

Referenced by seqAlign(), setTemplate(), traceBack(), and ~seqAlign().

int* MTKpp::seqAlign::tISeq [protected]

Template int sequence.

Referenced by initMatchMatrix(), seqAlign(), setTemplate(), and ~seqAlign().

Query molecule.

Referenced by seqAlign(), and setQuery().

int MTKpp::seqAlign::qNRes [protected]

Number of residues in template.

Referenced by initMatchMatrix(), seqAlign(), setQuery(), and traceBack().

char* MTKpp::seqAlign::qCSeq [protected]

Query character sequence.

Referenced by seqAlign(), setQuery(), traceBack(), and ~seqAlign().

int* MTKpp::seqAlign::qISeq [protected]

Template int sequence.

Referenced by initMatchMatrix(), seqAlign(), setQuery(), and ~seqAlign().

Algorith type.

  • 1 Needleman-Wunsch
  • 2 Smith-Waterman

Referenced by initMatchMatrix(), printResults(), seqAlign(), setAlgorithmType(), and traceBack().

gap penalty type g = gap size d = gapOpen e = gapExtend

  • 1 Constant gap penalty (gapPenalty = d)
  • 2 Linear gap penalty (gapPenalty = -g*d)
  • 3 Affine gap penalty (gapPenalty = -d - (g-1) * e, where e < d)

Referenced by initMatchMatrix(), printResults(), seqAlign(), and setGapPenaltyType().

double MTKpp::seqAlign::gapOpen [protected]

gap-open parameter

Referenced by initMatchMatrix(), printResults(), seqAlign(), and setGapOpen().

double MTKpp::seqAlign::gapExtend [protected]

gap-extend parameter

Referenced by initMatchMatrix(), printResults(), seqAlign(), and setGapExtend().

int MTKpp::seqAlign::maxGap [protected]

maximum gap size

Referenced by initMatchMatrix(), printResults(), seqAlign(), and traceBack().

int MTKpp::seqAlign::gapSize [protected]

current gap size

Referenced by initMatchMatrix(), and seqAlign().

std::string MTKpp::seqAlign::pamFile [protected]

PAM Matrix File.

Referenced by initMatchMatrix(), printResults(), seqAlign(), and setPAMFile().

int MTKpp::seqAlign::pamSize [protected]
char* MTKpp::seqAlign::pamTypes [protected]
double* MTKpp::seqAlign::pam [protected]
double* MTKpp::seqAlign::matchMatrix [protected]

Match Matrix.

Referenced by initMatchMatrix(), seqAlign(), and ~seqAlign().

int* MTKpp::seqAlign::maxIndices [protected]

Index to max value in matchMatrix for current cell.

Referenced by initMatchMatrix(), seqAlign(), traceBack(), and ~seqAlign().

int MTKpp::seqAlign::bestI [protected]

Row index of largest match matrix value.

Referenced by initMatchMatrix(), seqAlign(), and traceBack().

int MTKpp::seqAlign::bestJ [protected]

Column index of largest match matrix value.

Referenced by initMatchMatrix(), seqAlign(), and traceBack().

Best Match Matrix value.

Referenced by initMatchMatrix(), and seqAlign().

std::string MTKpp::seqAlign::alignmentA [protected]

Alignment of the template.

Referenced by printResults(), and traceBack().

std::string MTKpp::seqAlign::alignmentB [protected]

Alignment of the query.

Referenced by printResults(), and traceBack().

int* MTKpp::seqAlign::corrMap [protected]

Residues of the query mapped onto the residue of the template.

Referenced by getCorrMap(), seqAlign(), setQuery(), traceBack(), and ~seqAlign().


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

Generated on Fri Dec 23 2011 09:28:57 for MTK++ by Doxygen 1.7.5.1