Skip to main content
Fig. 2 | BMC Bioinformatics

Fig. 2

From: Introducing difference recurrence relations for faster semi-global alignment of long sequences

Fig. 2

a A schematic view of vectors, coordinates, and an adaptive band in the proposed algorithm: Vectors have parallelisms in the antidiagonal direction. W denotes the band width in adaptive banded DP. A set of four vectors, \(\Delta H_{G_{V}}\), \(\Delta V_{G_{V}}\), \(\Delta E'_{G_{V}}\), and \(\Delta F'_{G_{V}}\), retains the forefront vectors in the four difference DP matrices ΔH G , ΔV G , ΔEG′, and ΔFG′. Two additional coordinates, p and q, are introduced to index vectors and vector lanes in addition to the horizontal and vertical coordinates, i and j, in the DP matrix. The p coordinate, defined as p=i+j, specifies the location of the vectors, whereas q is a local position within a vector; the upper rightmost lane has an index number 0, and the lower leftmost lane W−1. The advancing direction is determined by comparing the values of the two edge cells, S V [ 0] and S V [W−1], such that the difference of the two cells is kept smaller, where the vectorized original S matrix is denoted as S V . See our article [25] for further details about the adaptive banded DP algorithm. b Data structure for reconstructing the absolute values in the original DP matrices from difference DP matrices, and a schematic view of prefetching a part of the sequences: Each block consists of a set of 32 vectors (or 1024 cells) and is indexed by a block number, k. The absolute value of a cell can be calculated as the sum of 64-bit large offset L[ k], constant 16-bit value (middle delta) D[ q], and 8-bit small delta d[ p,q] of the cell. Input sequences are converted to a 2-bit encoded string before processing of a block. Subsequences of 32 bases are loaded from the buffers using an unaligned vector load instruction

Back to article page