Research Article

Efficient Haplotype Block Partitioning and Tag SNP Selection Algorithms under Various Constraints

Algorithm 3

The time and linear-space algorithm for haplotype blocking with constraints on diversity and the number of tag SNPs.
HBPTS Lis: List blocks covered by tag SNPs in with maximized total length.
Input: Interval and number of tag SNPs .
Output: The boundaries of blocks covered by tag SNPs.
Global variable: .      and are used to store the good partner pointers and
      which have been preprocessed dependent on diversity constraints ,
      is used to store the tag SNPs required for each feasible blocks,
     two dimensional array and are global temporary working storages.
(1) if     then
(2)  for     to  T  do
(3)   for     to     do
(4)    Directly compute according to recursion relation 3.
(5)  Trace back on array to output the boundaries of blocks covered by tag SNPs.
(6)  return
(7) for     to     do
   Compute .
(8)  for     to     do
(9)   Compute by formula 3.
(10) for     to     do
   Compute , .
(11)  for     down to     do
(12)   Compute by formula 3 with opposite direction.
(13) Find = arg .
   Pointer back tracking to find the , and
(14) HBPTS      recursive call to report blocks in interval [i, x*] with t* tags.
(15) HBPTS     recursive call to report blocks in interval with tags.