|
MASA-Core
|
Interface that manages the MASA extension execution.
The MASA framework has an implementation of the IManager interface, that is responsible to receive commands from the Aligner. These commands are classified in the following types:
In order to test these conditional requirements, each aligner is associated with an instance of the IManager interface (see setManager() function). Besides the conditional requirement tests, the Manager also provides all the parameters necessary to customize the alignment, for example the sequences, the partitions coordinates. The AbstractAligner hides the IManager invocation using some delegate methods with protected visibility.
Definition at line 90 of file IManager.hpp.
#include <IManager.hpp>
Public Member Functions | |
| virtual int | getRecurrenceType () const =0 |
| virtual int | getSpecialRowInterval () const =0 |
| virtual int | getSpecialColumnInterval () const =0 |
| virtual int | getFirstColumnInitType ()=0 |
| Returns the initialization type of the first column. | |
| virtual int | getFirstRowInitType ()=0 |
| Returns the initialization type of the first row. | |
| virtual Partition | getSuperPartition ()=0 |
| Returns the super partition that includes all sub partitions being aligned. | |
| virtual void | receiveFirstRow (cell_t *buffer, int len)=0 |
| Receives the first row of the partition. | |
| virtual void | receiveFirstColumn (cell_t *buffer, int len)=0 |
| Receives the first column of the partition. | |
| virtual void | dispatchColumn (int j, const cell_t *buffer, int len)=0 |
| Notifies to the MASA framework that some cells of a column has been processed. | |
| virtual void | dispatchRow (int i, const cell_t *buffer, int len)=0 |
| Notifies to the MASA framework that some cells of a row has been processed. | |
| virtual void | dispatchScore (score_t score, int bx=-1, int by=-1)=0 |
| Notifies to the MASA framework that a new score has been computed. | |
| virtual bool | mustContinue ()=0 |
| virtual bool | mustDispatchLastCell ()=0 |
| virtual bool | mustDispatchLastRow ()=0 |
| virtual bool | mustDispatchLastColumn ()=0 |
| virtual bool | mustDispatchSpecialRows ()=0 |
| virtual bool | mustDispatchSpecialColumns ()=0 |
| virtual bool | mustDispatchScores ()=0 |
| virtual bool | mustPruneBlocks ()=0 |
Protected Member Functions | |
| ~IManager () | |
| IManager () | |
| IManager::~IManager | ( | ) | [inline, protected] |
Definition at line 317 of file IManager.hpp.
| IManager::IManager | ( | ) | [inline, protected] |
Definition at line 318 of file IManager.hpp.
| virtual void IManager::dispatchColumn | ( | int | j, |
| const cell_t * | buffer, | ||
| int | len | ||
| ) | [pure virtual] |
Notifies to the MASA framework that some cells of a column has been processed.
This function must be called serially for each column. For example, the invocation of dispatchColumn(50000, vector, 100) will dispatch the first 100 cells of the column 50000 to MASA, and the cells are read from the vector[0..99] elements. After this, a call to dispatchColumn(50000, vector, 50) will dispatch the next 50 cells of the same column 5000, and the cells are read from the vector[0..49] elements.
| j | the column to be dispatched. |
| buffer | the vector containing the data (starting from cell 0). |
| len | the number of cells that will be read from the vector. |
Implemented in AlignerManager.
| virtual void IManager::dispatchRow | ( | int | i, |
| const cell_t * | buffer, | ||
| int | len | ||
| ) | [pure virtual] |
Notifies to the MASA framework that some cells of a row has been processed.
This function must be called serially for each row, analogous to the AbstractAligner::dispatchLastColumn method.
| i | the row to be dispatched. |
| buffer | the vector containing the data (starting from cell 0). |
| len | the number of cells that will be read from the vector. |
Implemented in AlignerManager.
| virtual void IManager::dispatchScore | ( | score_t | score, |
| int | bx = -1, |
||
| int | by = -1 |
||
| ) | [pure virtual] |
Notifies to the MASA framework that a new score has been computed.
This method may be called as many times it is necessary, and the best score will be calculated among all calls of this method.
If the Aligner supports the aligner_capabilities_t::dispatch_block_scores capability, them it must dispatch the score with the bx, by parameters set to the block indices and this method must be called only once for each block.
| score | the score to be dispatched |
| bx | the block position in the horizontal direction, starting from 0 up to AbstractAligner::getGridWidth() minus 1. |
| by | the block position in the vertical direction, starting from 0 up to AbstractAligner::getGridHeight() minus 1. |
Implemented in AlignerManager.
| virtual int IManager::getFirstColumnInitType | ( | ) | [pure virtual] |
Returns the initialization type of the first column.
Possible values are
INIT_WITH_CUSTOM_DATA: the first column must be initialized with custom data that can only be obtained by the AbstractAligner::receiveFirstColumn method.
INIT_WITH_GAPS: the first column must be initialized considering gaps. The initialization equation is:
INIT_WITH_GAPS_OPENED: the first column must be initialized considering gaps, but without gap opening penalty. The initialization equation is:
INIT_WITH_ZEROES: the first column must be initialized considering zero values. The initialization equation is:
The initialization data of all types may be obtained by the AbstractAligner::receiveFirstColumn method, but the subclass of AbstractAligner may implement the initialization functions using some architectural dependent code (for example, using vectorial hardware instructions).
Implemented in AlignerManager.
| virtual int IManager::getFirstRowInitType | ( | ) | [pure virtual] |
Returns the initialization type of the first row.
Possible values are
INIT_WITH_CUSTOM_DATA: the first row must be initialized with custom data that can only be obtained by the AbstractAligner::receiveFirstRow method.
INIT_WITH_GAPS: the first column must be initialized considering gaps. The initialization equation is:
INIT_WITH_GAPS_OPENED: the first column must be initialized considering gaps, but without gap opening penalty. The initialization equation is:
INIT_WITH_ZEROES: the first row must be initialized considering zero values. The initialization equation is:
The initialization data of all types may be obtained by the AbstractAligner::receiveFirstRow method, but the subclass of AbstractAligner may implement the initialization functions using some architectural dependent code (for example, using vectorial hardware instructions).
Implemented in AlignerManager.
| virtual int IManager::getRecurrenceType | ( | ) | const [pure virtual] |
Implemented in AlignerManager.
| virtual int IManager::getSpecialColumnInterval | ( | ) | const [pure virtual] |
Implemented in AlignerManager.
| virtual int IManager::getSpecialRowInterval | ( | ) | const [pure virtual] |
Implemented in AlignerManager.
| virtual Partition IManager::getSuperPartition | ( | ) | [pure virtual] |
Returns the super partition that includes all sub partitions being aligned.
This method must be used only by block pruning algorithms in order to obtain the corner coordinates of the matrix.
A super partition is a set of many smaller partitions and this occurs in two situations. The first is when we are running stage1 in a multiprocess environment, where we have one sub partition for each process. The second situation happens when the aligner cannot handle the full size of the matrix, so the partition is split in parts smaller than the max sequence size capability of the aligner.
Implemented in AlignerManager.
| virtual bool IManager::mustContinue | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustDispatchLastCell | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustDispatchLastColumn | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustDispatchLastRow | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustDispatchScores | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustDispatchSpecialColumns | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustDispatchSpecialRows | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual bool IManager::mustPruneBlocks | ( | ) | [pure virtual] |
Implemented in AlignerManager.
| virtual void IManager::receiveFirstColumn | ( | cell_t * | buffer, |
| int | len | ||
| ) | [pure virtual] |
Receives the first column of the partition.
This function may block until all the requested data is ready. So prefer to read data in chunks instead of reading the full first row. The data will be stored from 0 to len-1 positions of the vector passed in the parameters.
| buffer | the vector where the first column data will be stored. |
| len | the number of cells that will be read. |
Implemented in AlignerManager.
| virtual void IManager::receiveFirstRow | ( | cell_t * | buffer, |
| int | len | ||
| ) | [pure virtual] |
Receives the first row of the partition.
This function may block until all the requested data is ready. So prefer to read data in chunks instead of reading the full first row. The data will be stored from 0 to len-1 positions of the vector passed in the parameters.
| buffer | the vector where the first row data will be stored. |
| len | the number of cells that will be read. |
Implemented in AlignerManager.
1.7.6.1