CPU implementations of common functions. More...
Go to the source code of this file.
Functions | |
void | alignPairCpu (Alignment **alignment, int type, Chain *query, Chain *target, Scorer *scorer) |
Pairwise alignment function. More... | |
void | alignScoredPairCpu (Alignment **alignment, int type, Chain *query, Chain *target, Scorer *scorer, int score) |
Pairwise alignment function. More... | |
void | nwFindScoreCpu (int *queryStart, int *targetStart, Chain *query, Chain *target, Scorer *scorer, int score) |
Score finding function. More... | |
void | nwReconstructCpu (char **path, int *pathLen, int *outScore, Chain *query, int queryFrontGap, int queryBackGap, Chain *target, int targetFrontGap, int targetBackGap, Scorer *scorer, int score) |
Needleman-Wunsch reconstruction implementation. More... | |
void | ovFindScoreCpu (int *queryStart, int *targetStart, Chain *query, Chain *target, Scorer *scorer, int score) |
Implementation of score finding function. More... | |
int | scorePairCpu (int type, Chain *query, Chain *target, Scorer *scorer) |
Pairwise scoring function. More... | |
CPU implementations of common functions.
void alignScoredPairCpu | ( | Alignment ** | alignment, |
int | type, | ||
Chain * | query, | ||
Chain * | target, | ||
Scorer * | scorer, | ||
int | score | ||
) |
Pairwise alignment function.
Function aligns previously score query and the target chain with the scorer object. If the score isn't valid for the produced alignment an error will occur. Function is primaraly provided to get alignments after calling scorePairCpu function.
void nwFindScoreCpu | ( | int * | queryStart, |
int * | targetStart, | ||
Chain * | query, | ||
Chain * | target, | ||
Scorer * | scorer, | ||
int | score | ||
) |
Score finding function.
Method uses Needleman-Wunsch algorithm with all of the start conditions set to infinity. This assures path contains the first cell and does not start with gaps. If the score is found it return the coordinates of the cell with the provided score, (-1, -1) otherwise.
queryStart | output, if found query index of found cell, -1 otherwise |
targetStart | output, if found target index of found cell, -1 otherwise |
query | query chain |
target | target chain |
scorer | scorer object used for alignment |
score | input alignment score |
void nwReconstructCpu | ( | char ** | path, |
int * | pathLen, | ||
int * | outScore, | ||
Chain * | query, | ||
int | queryFrontGap, | ||
int | queryBackGap, | ||
Chain * | target, | ||
int | targetFrontGap, | ||
int | targetBackGap, | ||
Scorer * | scorer, | ||
int | score | ||
) |
Needleman-Wunsch reconstruction implementation.
If the score is provided function uses Ukkonen's banded optimization. QueryFrontGap and targetFrontGap arguments can't both be not equal to 0. QueryBackGap and targetBackGap arguments can't both be not equal to 0. For path format see Alignment.
path | output path |
pathLen | output path length |
outScore | output score |
query | query chain |
queryFrontGap | if not equal to 0, force that path starts in MOVE_UP |
queryBackGap | if not equal to 0, force that path ends in MOVE_UP |
target | target chain |
targetFrontGap | if not equal to 0, force that path starts in MOVE_LEFT |
targetBackGap | if not equal to 0, force that path ends in MOVE_LEFT |
scorer | scorer object used for alignment |
score | input alignment score if known, otherwise NO_SCORE |
void ovFindScoreCpu | ( | int * | queryStart, |
int * | targetStart, | ||
Chain * | query, | ||
Chain * | target, | ||
Scorer * | scorer, | ||
int | score | ||
) |
Implementation of score finding function.
Method uses Needleman-Wunsch algorithm. If the score is found and the indicies of the coresponding cell are on the border of the solving matrix, functions returns the coordinates of the cell with the provided score, (-1, -1) otherwise.
queryStart | output, if found query index of found cell, -1 otherwise |
targetStart | output, if found target index of found cell, -1 otherwise |
query | query chain |
target | target chain |
scorer | scorer object used for alignment |
score | input alignment score |
Pairwise scoring function.
Function provides only the alignment score without any other information. Scoring types are equivalent to aligning types.