Pairwise sequnce alignment result storage header. More...
Go to the source code of this file.
Macros | |
#define | MOVE_STOP 0 |
Stop move. More... | |
#define | MOVE_LEFT 2 |
Path insertion move. More... | |
#define | MOVE_UP 3 |
Path deletion move. More... | |
#define | MOVE_DIAG 1 |
Path alignment move. More... | |
Typedefs | |
typedef struct Alignment | Alignment |
Pairwise sequnce alignment result storage object. More... | |
Functions | |
Alignment * | alignmentCreate (Chain *query, int queryStart, int queryEnd, Chain *target, int targetStart, int targetEnd, int score, Scorer *scorer, char *path, int pathLen) |
Alignment object constructor. More... | |
void | alignmentDelete (Alignment *alignment) |
Alignment destructor. More... | |
char | alignmentGetMove (Alignment *alignment, int index) |
Move getter. More... | |
int | alignmentGetPathLen (Alignment *alignment) |
Path len getter. More... | |
Chain * | alignmentGetQuery (Alignment *alignment) |
Query getter. More... | |
int | alignmentGetQueryEnd (Alignment *alignment) |
Query end getter. More... | |
int | alignmentGetQueryStart (Alignment *alignment) |
Query start getter. More... | |
int | alignmentGetScore (Alignment *alignment) |
Score getter. More... | |
Scorer * | alignmentGetScorer (Alignment *alignment) |
Scorer getter. More... | |
Chain * | alignmentGetTarget (Alignment *alignment) |
Target getter. More... | |
int | alignmentGetTargetEnd (Alignment *alignment) |
Target end getter. More... | |
int | alignmentGetTargetStart (Alignment *alignment) |
Target start getter. More... | |
void | alignmentCopyPath (Alignment *alignment, char *dest) |
Copies path to the destination buffer. More... | |
Alignment * | alignmentDeserialize (char *bytes) |
Alignment deserialization method. More... | |
void | alignmentSerialize (char **bytes, int *bytesLen, Alignment *alignment) |
Alignment serialization method. More... | |
Pairwise sequnce alignment result storage header.
#define MOVE_DIAG 1 |
Path alignment move.
Named diagonal move because of the diagonal move in matrix done while backtracking.
#define MOVE_LEFT 2 |
Path insertion move.
Named diagonal move because of the up move in matrix done while backtracking.
#define MOVE_STOP 0 |
Stop move.
Stop move is not used in alignment path. However it is used internaly in sequnce alignment algorithms.
#define MOVE_UP 3 |
Path deletion move.
Named diagonal move because of the up move in matrix done while backtracking.
Pairwise sequnce alignment result storage object.
All off the pairwise sequnce alignment algorithms produce a similiar result. Input query and target sequences are stored as Chain object. Algorithm scoring system is stored as Scorer object. Alignment stores the query and target start and endpoints as well as the alignment score. Alignment path is stored as a character array. Every character represents one move and can be MOVE_LEFT, MOVE_UP or MOVE_DIAG. Alignment path is stored in format convinient for backtracking, in other words the moves are named by the matrix movement while backtracking.
void alignmentCopyPath | ( | Alignment * | alignment, |
char * | dest | ||
) |
Copies path to the destination buffer.
Method copies path to the destination buffer which should be at least long as the alignment path length.
alignment | alignment object |
dest | destination buffer |
Alignment* alignmentCreate | ( | Chain * | query, |
int | queryStart, | ||
int | queryEnd, | ||
Chain * | target, | ||
int | targetStart, | ||
int | targetEnd, | ||
int | score, | ||
Scorer * | scorer, | ||
char * | path, | ||
int | pathLen | ||
) |
Alignment object constructor.
Alignment object is constructed from the query and target sequence aligned and their coresponding start and stop positions, alignment score, scorer which was used for alignment and the alignment path. None of the input objects are copied via the constructor.
query | query sequnce |
queryStart | query start position |
queryEnd | query end position, inclusive |
target | target sequnce |
targetStart | target start position |
targetEnd | target end position, inclusive |
score | alignment score |
scorer | scorer object used for alignment |
path | alignment path |
pathLen | alignment path length |
void alignmentDelete | ( | Alignment * | alignment | ) |
Alignment destructor.
alignment | alignment object |
Alignment* alignmentDeserialize | ( | char * | bytes | ) |
Alignment deserialization method.
Method deserializes alignment object from a byte buffer.
bytes | byte buffer |
char alignmentGetMove | ( | Alignment * | alignment, |
int | index | ||
) |
Move getter.
Given index must be greater or equal to zero and less than alignment path length.
alignment | alignment object |
index | path move index |
int alignmentGetPathLen | ( | Alignment * | alignment | ) |
Path len getter.
alignment | alignment object |
Query getter.
alignment | alignment object |
int alignmentGetQueryEnd | ( | Alignment * | alignment | ) |
Query end getter.
alignment | alignment object |
int alignmentGetQueryStart | ( | Alignment * | alignment | ) |
Query start getter.
alignment | alignment object |
int alignmentGetScore | ( | Alignment * | alignment | ) |
Score getter.
alignment | alignment object |
Scorer getter.
alignment | alignment object |
Target getter.
alignment | alignment object |
int alignmentGetTargetEnd | ( | Alignment * | alignment | ) |
Target end getter.
alignment | alignment object |
int alignmentGetTargetStart | ( | Alignment * | alignment | ) |
Target start getter.
alignment | alignment object |
void alignmentSerialize | ( | char ** | bytes, |
int * | bytesLen, | ||
Alignment * | alignment | ||
) |
Alignment serialization method.
Method serializes alignment object to a byte buffer.
bytes | output byte buffer |
bytesLen | output byte buffer length |
alignment | alignment object |