Skip to main content

Table 1 Stage two algorithm

From: Optimal neighborhood indexing for protein similarity search

Algorithm 1 Stage 2

Ensure: reports if a matching key occurrence potentially belongs to an alignment

Require: query neighborhoods (leftquery and rightquery)

1: get database neighborhoods leftdb and rightdb

2: resultleft ← 0; highestleft ← 0

3: resultright ← 0; highestright ← 0

4: for i from 1 to L do

5:   resultleftresultleft + subst _score (leftdb [i], leftquery [i])

6:   if resultleft > highestleft then highestleftresultleft endif

7: end for

8: for i from 1 to L do

9:   resultrightresultright + subst _score(rightdb [i], rightquery [i])

10:   if resultright > highestright then highestrightresultright endif

11: end for

12: if highestleft + highestright ≥ threshold T MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfKttLearuWrP9MDH5MBPbIqV92AaeXatLxBI9gBaebbnrfifHhDYfgasaacPC6xNi=xH8viVGI8Gi=hEeeu0xXdbba9frFj0xb9qqpG0dXdb9aspeI8k8fiI+fsY=rqGqVepae9pg0db9vqaiVgFr0xfr=xfr=xc9adbaqaaeGaciGaaiaabeqaaeqabiWaaaGcbaWenfgDOvwBHrxAJfwnHbqeg0uy0HwzTfgDPnwy1aaceaGae83eXtfaaa@376F@ then return true endif

13: return false