<s>
The	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
performs	O
local	O
sequence	B-Algorithm
alignment	I-Algorithm
;	O
that	O
is	O
,	O
for	O
determining	O
similar	O
regions	O
between	O
two	O
strings	O
of	O
nucleic	O
acid	O
sequences	O
or	O
protein	O
sequences	O
.	O
</s>
<s>
Instead	O
of	O
looking	O
at	O
the	O
entire	B-Algorithm
sequence	O
,	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
compares	O
segments	O
of	O
all	O
possible	O
lengths	O
and	O
optimizes	O
the	O
similarity	O
measure	O
.	O
</s>
<s>
Like	O
the	O
Needleman	B-Algorithm
–	I-Algorithm
Wunsch	I-Algorithm
algorithm	I-Algorithm
,	O
of	O
which	O
it	O
is	O
a	O
variation	O
,	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
is	O
a	O
dynamic	B-Algorithm
programming	I-Algorithm
algorithm	O
.	O
</s>
<s>
As	O
such	O
,	O
it	O
has	O
the	O
desirable	O
property	O
that	O
it	O
is	O
guaranteed	O
to	O
find	O
the	O
optimal	O
local	B-Algorithm
alignment	I-Algorithm
with	O
respect	O
to	O
the	O
scoring	O
system	O
being	O
used	O
(	O
which	O
includes	O
the	O
substitution	B-Algorithm
matrix	I-Algorithm
and	O
the	O
gap-scoring	O
scheme	O
)	O
.	O
</s>
<s>
The	O
main	O
difference	O
to	O
the	O
Needleman	B-Algorithm
–	I-Algorithm
Wunsch	I-Algorithm
algorithm	I-Algorithm
is	O
that	O
negative	O
scoring	O
matrix	O
cells	O
are	O
set	O
to	O
zero	O
,	O
which	O
renders	O
the	O
(	O
thus	O
positively	O
scoring	O
)	O
local	B-Algorithm
alignments	I-Algorithm
visible	O
.	O
</s>
<s>
Traceback	O
procedure	O
starts	O
at	O
the	O
highest	O
scoring	O
matrix	O
cell	O
and	O
proceeds	O
until	O
a	O
cell	O
with	O
score	O
zero	O
is	O
encountered	O
,	O
yielding	O
the	O
highest	O
scoring	O
local	B-Algorithm
alignment	I-Algorithm
.	O
</s>
<s>
In	O
1970	O
,	O
Saul	B-Algorithm
B	I-Algorithm
.	I-Algorithm
Needleman	I-Algorithm
and	O
Christian	B-Algorithm
D	I-Algorithm
.	I-Algorithm
Wunsch	I-Algorithm
proposed	O
a	O
heuristic	O
homology	O
algorithm	O
for	O
sequence	B-Algorithm
alignment	I-Algorithm
,	O
also	O
referred	O
to	O
as	O
the	O
Needleman	B-Algorithm
–	I-Algorithm
Wunsch	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
In	O
1981	O
,	O
Smith	O
and	O
Waterman	O
published	O
their	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
for	O
calculating	O
local	B-Algorithm
alignment	I-Algorithm
.	O
</s>
<s>
The	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
is	O
fairly	O
demanding	O
of	O
time	O
:	O
To	O
align	O
two	O
sequences	O
of	O
lengths	O
and	O
,	O
time	O
is	O
required	O
.	O
</s>
<s>
Sequence	B-Algorithm
alignment	I-Algorithm
shows	O
the	O
relations	O
between	O
genes	O
or	O
between	O
proteins	O
,	O
leading	O
to	O
a	O
better	O
understanding	O
of	O
their	O
homology	O
and	O
functionality	O
.	O
</s>
<s>
Sequence	B-Algorithm
alignment	I-Algorithm
can	O
also	O
reveal	O
conserved	O
domains	O
and	O
motifs	O
.	O
</s>
<s>
One	O
motivation	O
for	O
local	B-Algorithm
alignment	I-Algorithm
is	O
the	O
difficulty	O
of	O
obtaining	O
correct	O
alignments	O
in	O
regions	O
of	O
low	O
similarity	O
between	O
distantly	O
related	O
biological	O
sequences	O
,	O
because	O
mutations	O
have	O
added	O
too	O
much	O
'	O
noise	O
 '	O
over	O
evolutionary	O
time	O
to	O
allow	O
for	O
a	O
meaningful	O
comparison	O
of	O
those	O
regions	O
.	O
</s>
<s>
Local	B-Algorithm
alignment	I-Algorithm
avoids	O
such	O
regions	O
altogether	O
and	O
focuses	O
on	O
those	O
with	O
a	O
positive	O
score	O
,	O
i.e.	O
</s>
<s>
A	O
prerequisite	O
for	O
local	B-Algorithm
alignment	I-Algorithm
is	O
a	O
negative	O
expectation	O
score	O
.	O
</s>
<s>
The	O
expectation	O
score	O
is	O
defined	O
as	O
the	O
average	O
score	O
that	O
the	O
scoring	O
system	O
(	O
substitution	B-Algorithm
matrix	I-Algorithm
and	O
gap	O
penalties	O
)	O
would	O
yield	O
for	O
a	O
random	O
sequence	O
.	O
</s>
<s>
Another	O
motivation	O
for	O
using	O
local	B-Algorithm
alignments	I-Algorithm
is	O
that	O
there	O
is	O
a	O
reliable	O
statistical	O
model	O
(	O
developed	O
by	O
Karlin	O
and	O
Altschul	O
)	O
for	O
optimal	O
local	B-Algorithm
alignments	I-Algorithm
.	O
</s>
<s>
The	O
alignment	O
of	O
unrelated	O
sequences	O
tends	O
to	O
produce	O
optimal	O
local	B-Algorithm
alignment	I-Algorithm
scores	O
which	O
follow	O
an	O
extreme	O
value	O
distribution	O
.	O
</s>
<s>
This	O
property	O
allows	O
programs	O
to	O
produce	O
an	O
expectation	O
value	O
for	O
the	O
optimal	O
local	B-Algorithm
alignment	I-Algorithm
of	O
two	O
sequences	O
,	O
which	O
is	O
a	O
measure	O
of	O
how	O
often	O
two	O
unrelated	O
sequences	O
would	O
produce	O
an	O
optimal	O
local	B-Algorithm
alignment	I-Algorithm
whose	O
score	O
is	O
greater	O
than	O
or	O
equal	O
to	O
the	O
observed	O
score	O
.	O
</s>
<s>
Determine	O
the	O
substitution	B-Algorithm
matrix	I-Algorithm
and	O
the	O
gap	O
penalty	O
scheme	O
.	O
</s>
<s>
Starting	O
at	O
the	O
highest	O
score	O
in	O
the	O
scoring	O
matrix	O
and	O
ending	O
at	O
a	O
matrix	O
cell	O
that	O
has	O
a	O
score	O
of	O
0	O
,	O
traceback	O
based	O
on	O
the	O
source	O
of	O
each	O
score	O
recursively	O
to	O
generate	O
the	O
best	O
local	B-Algorithm
alignment	I-Algorithm
.	O
</s>
<s>
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
aligns	O
two	O
sequences	O
by	O
matches/mismatches	O
(	O
also	O
known	O
as	O
substitutions	O
)	O
,	O
insertions	O
,	O
and	O
deletions	O
.	O
</s>
<s>
The	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
has	O
several	O
steps	O
:	O
</s>
<s>
Determine	O
the	O
substitution	B-Algorithm
matrix	I-Algorithm
and	O
the	O
gap	O
penalty	O
scheme	O
.	O
</s>
<s>
A	O
substitution	B-Algorithm
matrix	I-Algorithm
assigns	O
each	O
pair	O
of	O
bases	O
or	O
amino	O
acids	O
a	O
score	O
for	O
match	O
or	O
mismatch	O
.	O
</s>
<s>
To	O
obtain	O
the	O
second	O
best	O
local	B-Algorithm
alignment	I-Algorithm
,	O
apply	O
the	O
traceback	O
process	O
starting	O
at	O
the	O
second	O
highest	O
score	O
outside	O
the	O
trace	O
of	O
the	O
best	O
alignment	O
.	O
</s>
<s>
The	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
finds	O
the	O
segments	O
in	O
two	O
sequences	O
that	O
have	O
similarities	O
while	O
the	O
Needleman	B-Algorithm
–	I-Algorithm
Wunsch	I-Algorithm
algorithm	I-Algorithm
aligns	O
two	O
complete	O
sequences	O
.	O
</s>
<s>
Both	O
algorithms	O
use	O
the	O
concepts	O
of	O
a	O
substitution	B-Algorithm
matrix	I-Algorithm
,	O
a	O
gap	O
penalty	O
function	O
,	O
a	O
scoring	O
matrix	O
,	O
and	O
a	O
traceback	O
process	O
.	O
</s>
<s>
One	O
of	O
the	O
most	O
important	O
distinctions	O
is	O
that	O
no	O
negative	O
score	O
is	O
assigned	O
in	O
the	O
scoring	O
system	O
of	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
,	O
which	O
enables	O
local	B-Algorithm
alignment	I-Algorithm
.	O
</s>
<s>
The	O
initial	O
scoring	O
matrix	O
of	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
enables	O
the	O
alignment	O
of	O
any	O
segment	O
of	O
one	O
sequence	O
to	O
an	O
arbitrary	O
position	O
in	O
the	O
other	O
sequence	O
.	O
</s>
<s>
In	O
Needleman	B-Algorithm
–	I-Algorithm
Wunsch	I-Algorithm
algorithm	I-Algorithm
,	O
however	O
,	O
end	O
gap	O
penalty	O
also	O
needs	O
to	O
be	O
considered	O
in	O
order	O
to	O
align	O
the	O
full	O
sequences	O
.	O
</s>
<s>
If	O
matches	O
get	O
+1	O
,	O
mismatches	O
get	O
-1	O
,	O
then	O
the	O
substitution	B-Algorithm
matrix	I-Algorithm
is	O
:	O
</s>
<s>
This	O
substitution	B-Algorithm
matrix	I-Algorithm
can	O
be	O
described	O
as	O
:	O
</s>
<s>
The	O
substitution	B-Algorithm
matrix	I-Algorithm
of	O
amino	O
acids	O
is	O
usually	O
more	O
complicated	O
than	O
that	O
of	O
the	O
bases	O
.	O
</s>
<s>
When	O
linear	O
gap	O
penalty	O
is	O
used	O
,	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
can	O
be	O
simplified	O
to	O
:	O
</s>
<s>
An	O
arbitrary	O
gap	O
penalty	O
was	O
used	O
in	O
the	O
original	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
paper	O
.	O
</s>
<s>
Substitution	B-Algorithm
matrix	I-Algorithm
is	O
DNAfull	O
.	O
</s>
<s>
The	O
scoring	O
process	O
reflects	O
the	O
concept	O
of	O
dynamic	B-Algorithm
programming	I-Algorithm
.	O
</s>
<s>
Substitution	B-Algorithm
matrix	I-Algorithm
:	O
</s>
<s>
The	O
best	O
local	B-Algorithm
alignment	I-Algorithm
is	O
generated	O
in	O
the	O
reverse	O
direction	O
.	O
</s>
<s>
An	O
implementation	O
of	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
Algorithm	I-Algorithm
,	O
SSEARCH	O
,	O
is	O
available	O
in	O
the	O
FASTA	B-Application
sequence	O
analysis	O
package	O
from	O
.	O
</s>
<s>
This	O
implementation	O
includes	O
Altivec	B-General_Concept
accelerated	O
code	O
for	O
PowerPC	B-Architecture
G4	O
and	O
G5	O
processors	O
that	O
speeds	O
up	O
comparisons	O
10	O
–	O
20-fold	O
,	O
using	O
a	O
modification	O
of	O
the	O
Wozniak	O
,	O
1997	O
approach	O
,	O
and	O
an	O
SSE2	B-General_Concept
vectorization	O
developed	O
by	O
Farrar	O
making	O
optimal	O
protein	O
sequence	O
database	O
searches	O
quite	O
practical	O
.	O
</s>
<s>
A	O
library	O
,	O
SSW	O
,	O
extends	O
Farrar	O
's	O
implementation	O
to	O
return	O
alignment	O
information	O
in	O
addition	O
to	O
the	O
optimal	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
score	O
.	O
</s>
<s>
Cray	O
demonstrated	O
acceleration	O
of	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
using	O
a	O
reconfigurable	B-Architecture
computing	I-Architecture
platform	O
based	O
on	O
FPGA	B-Architecture
chips	O
,	O
with	O
results	O
showing	O
up	O
to	O
28x	O
speed-up	O
over	O
standard	O
microprocessor-based	O
solutions	O
.	O
</s>
<s>
Another	O
FPGA-based	O
version	O
of	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
shows	O
FPGA	B-Architecture
(	O
Virtex-4	O
)	O
speedups	O
up	O
to	O
100x	O
over	O
a	O
2.2GHz	O
Opteron	O
processor	O
.	O
</s>
<s>
The	O
DeCypher	O
and	O
CodeQuest	O
systems	O
also	O
accelerate	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
and	O
Framesearch	O
using	O
PCIe	O
FPGA	B-Architecture
cards	O
.	O
</s>
<s>
A	O
2011	O
Master	O
's	O
thesis	O
includes	O
an	O
analysis	O
of	O
FPGA-based	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
acceleration	O
.	O
</s>
<s>
Using	O
one	O
PCIe	O
FPGA	B-Architecture
card	O
equipped	O
with	O
a	O
Xilinx	O
Virtex-7	O
2000T	O
FPGA	B-Architecture
,	O
the	O
performance	O
per	O
Watt	O
level	O
was	O
better	O
than	O
CPU/GPU	O
by	O
12-21x	O
.	O
</s>
<s>
Lawrence	O
Livermore	O
National	O
Laboratory	O
and	O
the	O
United	O
States	O
(	O
US	O
)	O
Department	O
of	O
Energy	O
's	O
Joint	O
Genome	O
Institute	O
implemented	O
an	O
accelerated	O
version	O
of	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
local	O
sequence	B-Algorithm
alignment	I-Algorithm
searches	O
using	O
graphics	B-Architecture
processing	I-Architecture
units	I-Architecture
(	O
GPUs	B-Architecture
)	O
with	O
preliminary	O
results	O
showing	O
a	O
2x	O
speed-up	O
over	O
software	O
implementations	O
.	O
</s>
<s>
Several	O
GPU	B-Architecture
implementations	O
of	O
the	O
algorithm	O
in	O
NVIDIA	O
's	O
CUDA	B-Architecture
C	B-Language
platform	O
are	O
also	O
available	O
.	O
</s>
<s>
When	O
compared	O
to	O
the	O
best	O
known	O
CPU	O
implementation	O
(	O
using	O
SIMD	B-Device
instructions	O
on	O
the	O
x86	O
architecture	O
)	O
,	O
by	O
Farrar	O
,	O
the	O
performance	O
tests	O
of	O
this	O
solution	O
using	O
a	O
single	O
NVidia	O
GeForce	O
8800	O
GTX	O
card	O
show	O
a	O
slight	O
increase	O
in	O
performance	O
for	O
smaller	O
sequences	O
,	O
but	O
a	O
slight	O
decrease	O
in	O
performance	O
for	O
larger	O
ones	O
.	O
</s>
<s>
A	O
newer	O
GPU	B-Architecture
CUDA	B-Architecture
implementation	O
of	O
SW	O
is	O
now	O
available	O
that	O
is	O
faster	O
than	O
previous	O
versions	O
and	O
also	O
removes	O
limitations	O
on	O
query	O
lengths	O
.	O
</s>
<s>
Eleven	O
different	O
SW	O
implementations	O
on	O
CUDA	B-Architecture
have	O
been	O
reported	O
,	O
three	O
of	O
which	O
report	O
speedups	O
of	O
30X	O
.	O
</s>
<s>
In	O
2000	O
,	O
a	O
fast	O
implementation	O
of	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
using	O
the	O
single	B-Device
instruction	I-Device
,	I-Device
multiple	I-Device
data	I-Device
(	O
SIMD	B-Device
)	O
technology	O
available	O
in	O
Intel	B-General_Concept
Pentium	I-General_Concept
MMX	B-Architecture
processors	O
and	O
similar	O
technology	O
was	O
described	O
in	O
a	O
publication	O
by	O
Rognes	O
and	O
Seeberg	O
.	O
</s>
<s>
A	O
SSE2	B-General_Concept
vectorization	O
of	O
the	O
algorithm	O
(	O
Farrar	O
,	O
2007	O
)	O
is	O
now	O
available	O
providing	O
an	O
8-16-fold	O
speedup	O
on	O
Intel/AMD	O
processors	O
with	O
SSE2	B-General_Concept
extensions	O
.	O
</s>
<s>
When	O
running	O
on	O
Intel	O
processor	O
using	O
the	O
Core	B-Device
microarchitecture	I-Device
the	O
SSE2	B-General_Concept
implementation	O
achieves	O
a	O
20-fold	O
increase	O
.	O
</s>
<s>
Farrar	O
's	O
SSE2	B-General_Concept
implementation	O
is	O
available	O
as	O
the	O
SSEARCH	O
program	O
in	O
the	O
FASTA	B-Application
sequence	O
comparison	O
package	O
.	O
</s>
<s>
Danish	O
bioinformatics	O
company	O
CLC	O
bio	O
has	O
achieved	O
speed-ups	O
of	O
close	O
to	O
200	O
over	O
standard	O
software	O
implementations	O
with	O
SSE2	B-General_Concept
on	O
an	O
Intel	O
2.17GHz	O
Core	O
2	O
Duo	O
CPU	O
,	O
according	O
to	O
a	O
.	O
</s>
<s>
Accelerated	O
version	O
of	O
the	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
algorithm	I-Algorithm
,	O
on	O
Intel	O
and	O
Advanced	O
Micro	O
Devices	O
(	O
AMD	O
)	O
based	O
Linux	B-Application
servers	O
,	O
is	O
supported	O
by	O
the	O
package	O
,	O
offered	O
by	O
.	O
</s>
<s>
Currently	O
the	O
only	O
company	O
in	O
bioinformatics	O
to	O
offer	O
both	O
SSE	O
and	O
FPGA	B-Architecture
solutions	O
accelerating	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
,	O
CLC	O
bio	O
has	O
achieved	O
speed-ups	O
of	O
more	O
than	O
110	O
over	O
standard	O
software	O
implementations	O
with	O
.	O
</s>
<s>
The	O
fastest	O
implementation	O
of	O
the	O
algorithm	O
on	O
CPUs	O
with	O
SSSE3	B-General_Concept
can	O
be	O
found	O
the	O
SWIPE	O
software	O
(	O
Rognes	O
,	O
2011	O
)	O
,	O
which	O
is	O
available	O
under	O
the	O
GNU	B-Application
Affero	I-Application
General	I-Application
Public	I-Application
License	I-Application
.	O
</s>
<s>
Using	O
a	O
375	O
residue	O
query	O
sequence	O
a	O
speed	O
of	O
106	O
billion	O
cell	O
updates	O
per	O
second	O
(	O
GCUPS	O
)	O
was	O
achieved	O
on	O
a	O
dual	O
Intel	B-Device
Xeon	I-Device
X5650	O
six-core	O
processor	O
system	O
,	O
which	O
is	O
over	O
six	O
times	O
more	O
rapid	O
than	O
software	O
based	O
on	O
Farrar	O
's	O
'	O
striped	O
 '	O
approach	O
.	O
</s>
<s>
It	O
is	O
faster	O
than	O
BLAST	B-Application
when	O
using	O
the	O
BLOSUM50	O
matrix	O
.	O
</s>
<s>
An	O
implementation	O
of	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
named	O
diagonalsw	O
,	O
in	O
C	B-Language
and	O
C++	B-Language
,	O
uses	O
SIMD	B-Device
instruction	O
sets	O
(	O
SSE4.1	O
for	O
the	O
x86	O
platform	O
and	O
AltiVec	B-General_Concept
for	O
the	O
PowerPC	B-Architecture
platform	I-Architecture
)	O
.	O
</s>
<s>
It	O
is	O
released	O
under	O
an	O
open-source	O
MIT	B-License
License	I-License
.	O
</s>
<s>
In	O
2008	O
,	O
Farrar	O
described	O
a	O
port	O
of	O
the	O
Striped	O
Smith	B-Algorithm
–	I-Algorithm
Waterman	I-Algorithm
to	O
the	O
Cell	O
Broadband	O
Engine	O
and	O
reported	O
speeds	O
of	O
32	O
and	O
12	O
GCUPS	O
on	O
an	O
IBM	O
QS20	O
blade	O
and	O
a	O
Sony	B-Operating_System
PlayStation	I-Operating_System
3	I-Operating_System
,	O
respectively	O
.	O
</s>
<s>
Fast	O
expansion	O
of	O
genetic	O
data	O
challenges	O
speed	O
of	O
current	O
DNA	O
sequence	B-Algorithm
alignment	I-Algorithm
algorithms	O
.	O
</s>
