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: resultleft ← resultleft + subst _score (leftdb [i], leftquery [i]) |
6: if resultleft > highestleft then highestleft ← resultleft endif |
7: end for |
8: for i from 1 to L do |
9: resultright ← resultright + subst _score(rightdb [i], rightquery [i]) |
10: if resultright > highestright then highestright ← resultright endif |
11: end for |
12: if highestleft + highestright ≥ threshold then return true endif |
13: return false |