Skip to main content
Figure 13 | BMC Bioinformatics

Figure 13

From: Fast index based algorithms and software for matching position specific scoring matrices

Figure 13

Probability computation using lazy evaluation ofthe DP matrix. In this example we use the same PSSM M, character distribution, and p-value threshold π = 1 8 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabigdaXaqaaiabiIda4aaaaaa@2EAA@ as in Figure 11. However, in each row of the PSSM the scores are sorted in descending order, and the rows are sorted with the most discriminant row coming first (see coloured PSSMs for this relationship). Observe that the LazyDistrib algorithm evaluates the DP vectors non-recursively top-down. Cells computed in the actual step are marked red. In step d = 0 the algorithm computes Q2(11) by evaluating paths through the PSSM contributing to Q2(ll), which is in this example only the high scoring path GGA. Intermediate results of Q0(4), Q1(7), and Q2(11) are collected in buffers Pbuf0(4), Pbuf1(7), and Pbuf2(11) first, and finally copied to the correponding cells in Q. See (A) for the situation after step d = 0 has been completed. In step d = 1, see (B), the algorithm computes Q2(10), starting in row k = 1 with the determination of Pbuf1(6) and Q1(6). That is, Q1(6) = Pbuf1(6) = Q0(4)·f(A) + Q0(4)·f(C) + Q0(4)·f(T) = 3 16 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabiodaZaqaaiabigdaXiabiAda2aaaaaa@2F9A@ . Analogously Q2(10) and Pbuf2(10) are computed based on Q1(7) and Q1(6). Additionally Pbuf2(9) is filled for further reuse in subsequent steps d + 1, d + 2,.... We compute Pbuf2(9) = Q1(6)·f(C) = 3 64 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabiodaZaqaaiabiAda2iabisda0aaaaaa@2FA0@ . The algorithm can directly start in row k = 1 with the computation of Q1(6) instead of Q0(3) since a score of 3 cannot be achieved by the first prefix PSSM M0. Only score 4 of M0 contributes to Q2(10), scores 2 and 1 do not. In step d = 2, see (C), the algorithm computes Q2(9), starting in row k = 0. Pbuf2(9) is computed reusing the partial sum calculated in previous steps, such that Pbuf2(9) = 3 64 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabiodaZaqaaiabiAda2iabisda0aaaaaa@2FA0@ + Q1(7)·f(T) + Pbuf1(5)·f(A) = 5 64 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabiwda1aqaaiabiAda2iabisda0aaaaaa@2FA4@ , and then copied to Q2(9). Pbuf1(4), Pbuf2(8), and Pbuf2(7) are filled based on Pbuf0(2), Q1(6), Pbuf1(5), and Q1(5) for further reuse. After step d = 2 the rest of the computation can be skipped since the cumulated probability Q2(11) + Q2(10) + Q2(9) = 5 32 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabiwda1aqaaiabiodaZiabikdaYaaaaaa@2F9A@ exceeds the given p-value π = 1 8 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacH8akY=wiFfYdH8Gipec8Eeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9s8qqaq=dirpe0xb9q8qiLsFr0=vr0=vr0dc8meaabaqaciaacaGaaeqabaqabeGadaaakeaadaWcaaqaaiabigdaXaqaaiabiIda4aaaaaa@2EAA@ and we obtain a score threshold of th = 10 corresponding to π.

Back to article page