1.

size ← length [T ]  N

2.

Oligo allOligo [size]/* the data structure Oligo includes score and sequence*/

3.

for pos ← 1 to size

4.

do allOligo [pos].sequence ← T.substring (pos, pos + N)

5.

/* calculate the ANN score for each sliding oligo using the trained ANN */

6.

allOligo [pos].score = CalScoreByNN ^{c} (allOligo [pos ])

7.

sort the allOligo array into nondecreasing order by ANN score

8.

lowestSim ← 1.0

9.

for p ← 0 to(size • F^{d})

10.

do oligo ← allOligo [p].sequence

11.

similarity ← CalSimByBlast ^{e} (oligo)

12.

if
similarity < lowestSim

13.

then bestOligo ← oligo

14.

lowestSim ← similarity

15.

if lowestSim <TH_{
sim
}^{f}

16.

then
return
bestOligo

17.

return
bestOligo
