MASA-Core
Public Member Functions | Public Attributes
crosspoint_t Struct Reference

Detailed Description

Represents a crosspoint between the optimal alignment and a special row.

A crosspoint is a coordinate of the optimal alignment that crosses some special row or special column. A crosspoint is represented by a tuple (i, j, score, type), where score is the score of the alignment in position (i,j) and type is the type of the alignment in this position. Type can be TYPE_MATCH in case of match or mismatch, TYPE_GAP_1 if there is a gap in sequence S_0 and TYPE_GAP_2 if there is a gap in sequence S_1.

Definition at line 37 of file Crosspoint.hpp.

#include <Crosspoint.hpp>

List of all members.

Public Member Functions

crosspoint_t reverse (int seq0_len, int seq1_len)
 Reverse the crosspoint considering the reversed sequences.
bool operator== (const crosspoint_t &other) const
bool operator!= (const crosspoint_t &other) const

Public Attributes

int i
 vertical coordinate
int j
 horizontal coordinate
int type
 type of the crosspoint.
int score
 The score of this crosspoint considering since the start of the alignment.

Member Function Documentation

bool crosspoint_t::operator!= ( const crosspoint_t other) const [inline]

Definition at line 84 of file Crosspoint.hpp.

bool crosspoint_t::operator== ( const crosspoint_t other) const [inline]

Definition at line 80 of file Crosspoint.hpp.

crosspoint_t crosspoint_t::reverse ( int  seq0_len,
int  seq1_len 
) [inline]

Reverse the crosspoint considering the reversed sequences.

The reverse procedure changes the original (i,j) coordinates to new (i', j') coordinates using the following equations:

\begin{eqnarray*} i' &=& |S_1|-j \\ j' &=& |S_0|-i \end{eqnarray*}

The type of the crosspoint is changed between TYPE_GAP_1 and TYPE_GAP_2. The score is not changed.

Parameters:
seq0_lenThe length $|S_0|$ of the sequence 0 (related to the i coordinate).
seq1_lenThe length $|S_1|$ of the sequence 1 (related to the j coordinate).
Returns:
the new crosspoint with the reversed sequences.

Definition at line 65 of file Crosspoint.hpp.


Member Data Documentation

vertical coordinate

Definition at line 39 of file Crosspoint.hpp.

horizontal coordinate

Definition at line 42 of file Crosspoint.hpp.

The score of this crosspoint considering since the start of the alignment.

Definition at line 48 of file Crosspoint.hpp.

type of the crosspoint.

It can be TYPE_MATCH, TYPE_GAP_1 or TYPE_GAP_2.

Definition at line 45 of file Crosspoint.hpp.


The documentation for this struct was generated from the following file: