Research Article

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

Algorithm 2

The time and linear space algorithm for haplotype blocking.
LIS( )   Lis: List blocks in with maximized total length.
Input: Interval and number of blocks .
Output: 's blocks and their boundaries.
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
      results of LIS( ), are global temporary working storages.
(1) if     then
(2) Append the boundaries of the longest block in to
(3) return
(4) for     to     do Initiate the boundary condition of .
(5)     
(6) for     to     do Compute , .
(7)  for     to     do
(8)   if     then
(9)    
(10)   else
(11)    
(12)    if     then       , exceeding the boundary region.
(13)    
(14)    else
(15)    
(16)   
(17)   copy to for next iteration of    is used to store the temporary results of .
(18) for     to     do Initiate the boundary condition of .
(19)  
(20) for     to     do Compute .
(21)   for     downto     do
(22)   if     then
(23)    
(24)   else
(25)    
(26)   if     then      , exceeding the boundary region.
(27)    
(28)   else
(29)    
(30)   
(31)   copy to for next iteration of    is used to store the temporary results of .
(32)
(33) for     to     do Find .
(34)  if     then
(35)   
(36)   
(37) LIS     recursive call.
(38) LIS    recursive call.