Research Article

A Novel Partial Sequence Alignment Tool for Finding Large Deletions

Algorithm 2

BinaryPartialAlign pseudocode.
Input
reference sequence: r,
query pattern: q,
minimum sequence length: m,
threshold similarity ratio: t
Output
location(index) of deletion: f
sr = SWSR of 𝑟 and q
//SWSR stands for Smith-Waterman similarity ratio of 𝑟 and q
l is length of the query pattern;
if  sr  >  t  then
exit ;   // no deletion
else
i = 1;   // iteration
f = 1/2;
repeat
  sr1 = SWSR of 𝑟 and [ 𝑞 0 , 𝑞 𝑓 ];
  sr2 = SWSR of 𝑟 and [ 𝑞 𝑓 + 1 , 𝑞 𝑙 ];
   𝑘 = 1 × ( 1 / 2 ) ( 𝑖 + 1 ) ;
  if sr1 > t and sr2 < t then
   f = f + k;
  else if sr1 < t and sr2 > t then
   f = f - k;
  else if sr1 < t and sr2 > t then
   exit ;
  end if
  i++;
until (sr1 t and sr2 t)
return  f;
end if