Research Article
A Practical and Scalable Tool to Find Overlaps between Sequences
Algorithm 2
Constructing the tree without sorting the sequences.
| (1) Function Traversetree(node ) | | (2) for each branch in node do | | (3) Traversetree() | | (4) if is the first child then | | (5) update the lower bound of | | (6) else | | (7) update the upper bound of | | (8) end if | | (9) end for | | (10) if is a leaf then | | (11) temp = listlower bound of | | (12) sorted[counter] = lower bound of | | (13) lower bound of = counter | | (14) counter++ | | (15) for each item in temp do | | (16) sorted[counter] = | | (17) counter++ | | (18) end for | | (19) Upper bound of = counter-1 | | (20) end if | | (21) End Function |
|