Heuris'c)search:)FastA)and)BLAST - Duke...
Transcript of Heuris'c)search:)FastA)and)BLAST - Duke...
![Page 1: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/1.jpg)
Heuris'c)search:)FastA)and)BLAST)
COMPSCI)260)–)Spring)2016)
![Page 2: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/2.jpg)
Previous)lectures)
• Global)alignment)
• Local)alignment)
• Dynamic)programming)algorithms:)O(mn))'me)
![Page 3: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/3.jpg)
Database)searches)
• O(mn))algorithms)are)very)efficient)• But)this)is)too)slow)for)searching)large)databases)of)DNA)or)
protein)sequences)))
![Page 4: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/4.jpg)
NCBI)genomic)data)
![Page 5: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/5.jpg)
Database)searches)
• INPUT:)– Database)
– Query:))RGIKW)• OUTPUT:))
– sequences)similar)to)query))
• What)does)“similar”)mean)?))
![Page 6: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/6.jpg)
Heuris'cs)
• Heuris'c)methods)can)be)used)to)perform)fast)approxima'ons))– Tradeoff:)accuracy)of)solu'on)vs.)speed)
• We)have)seen)another)tradeoff:)– Speed)vs.)space)
• Popular)heuris'c)algorithms)are)the)result)of)our)willingness)for)our)solu'on)to)loose)accuracy)in)return)for)a)speedup)
• Loss)of)accuracy:)false)posi'ves)or)(more)commonly))false)nega'ves.))
![Page 7: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/7.jpg)
Heuris'cs)
• False)posi'ves)represent)results)returned)by)your)algorithm)as)successful)(in)our)case,)as)high)scoring)alignments))that)really)aren’t)))
• False)nega'ves)are)just)the)opposite:)really)high)scoring)alignments)that)get)overlooked)by)the)algorithm)
• Trade`off:)sensi'vity)vs.)selec'vity)
![Page 8: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/8.jpg)
The)history)of)the)alignment)problem))
Global)Alignment)) Needleman`Wunsch)algorithm)(linear)gap)) 1972)
Global)Alignment) Affine)gap)(Gotoh’s)solu'on)in)quadra'c)'me)) 1980)
Exact)Local)Alignment) Smith`Waterman)algorithm) 1981)
Heuris'c)Local)Alignment) FastN)+)FastP)=)FastA) 1985))
Heuris'c)Local)Alignment) BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990)
Heuris'c)Local)Alignment) BLAST)2.0:)Gapped)BLAST)) 1997)
run much faster, at the expense of possibly missing some significant hits (i.e. getting false
negatives) due to the heuristics employed
![Page 9: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/9.jpg)
Heuris'c)local)alignment))
• Heuris'c)local)alignment)algorithms)are)usually)seed$and$extend)approaches:)small)exact)matches)are)found,)which)are)then)extended)to)obtain)long)inexact)matches)
)• Preprocessing:)for)every)W`mer))
(e.g.)W=3),)list)every)loca'on)in))the)database)where)it)occurs)– W`mer:)a)string)of)length)W)
• Query:))– Generate)W`mers)and)look))them)up)in)the)database))
– Process)the)results)to)obtain)longer,)inexact)matches))
![Page 10: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/10.jpg)
FastA)
• FastA)(which)stands)for)Fast`All))is)a)combina'on)of)FastN)(nucleo'de))and)FastP)(protein)))
• It)was)the)first)good)heuris'c)local)alignment)program,)and)it)was)capable)of)finding)
– DNA:DNA)– DNA:protein)(by)inferring)transla'on))and))– protein:protein)alignments)
• The)original)paper:))David)J.)Lipman)and)William)R.)Pearson)“Rapid)and)sensi've)protein)similarity)searches”)(Science'1985))))
![Page 11: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/11.jpg)
FastA)paper)`)Abstract)
An algorithm was developed which facilitates the search for similarities between newly determined amino acid sequences and sequences already available in databases. Because of the algorithm's efficiency on many microcomputers, sensitive protein database searches may now become a routine procedure for molecular biologists. The method efficiently identifies regions of similar sequence and then scores the aligned identical and differing residues in those regions by means of an amino acid replaceability matrix. This matrix increases sensitivity by giving high scores to those amino acid replacements which occur frequently in evolution. The algorithm has been implemented in a computer program designed to search protein databases very rapidly. For example, comparison of a 200-amino-acid sequence to the 500,000 residues in the National Biomedical Research Foundation library would take less than 2 minutes on a minicomputer, and less than 10 minutes on a microcomputer (IBM PC).
![Page 12: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/12.jpg)
FastA)
• General)idea:)– Choose)regions)of)the)two)sequences)that)look)promising)(have)some)degree)of)similarity)))
– Compute)local)alignment)using)dynamic)programming)in)these)regions))
• Assump'on:)a)good)alignment)probably)has)some)exact)matches.))
• The)algorithm)treats)these)exact)matches)as)anchors)or)seeds)of)a)larger)alignment)with)some)gaps))
![Page 13: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/13.jpg)
FastA)
• Assump'on:)a)good)alignment)probably)has)some)exact)matches.))
• Is)this)true?)
• Two)sequences)of)9)aa)each,)with)7)iden''es)))There)must)be)a)stretch)of)3)aa)perfectly)conserved))
• Two)sequences)of)9)aa)with)at)most)1)mismatch))There)must)be)a)stretch)of)4)aa)perfectly)conserved))
• More)generally:)pigeonhole)principle)))If)you)have)2)pigeons)and)3)holes,)there))must)be)at)least)one)hole)with)no)pigeon))
)))
![Page 14: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/14.jpg)
FastA)–)Step)1)
• The)algorithm)begins)by)looking)for)occurrences)of)exact)matches)of)length)k)between)the)two)sequences)
• These)are)referred)to)as)k>tuples)and)their)length)is)set)by)the)FastA)parameter)ktup))
• This)search)is)a)rela'vely)fast)one))
![Page 15: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/15.jpg)
FastA)–)Step)2)
• Score)diagonals)with)k`word)matches,)to)iden'fy)the)10)best)diagonals))
• Construct)an)(m)×)n))grid)and)place)a)dot)at)every)(i,)j))that)begins)a)k`tuple)
k=2
• The)end)result)will)be)a)table)with)some)runs)of)diagonal)dots)))• This)table)is)called)a)dot)matrix)
• Why)diagonal?))– Consider)the)case)where)k)=)2)and)we)have)a)match)of)5)characters)in)a)
row)star'ng)at)posi'on)(i,)j).)Not)only)will)there)be)a)dot)in)the)(i,)j))posi'on,)but)also)in)the)(i)+)1,)j)+)1),)(i + 2, j + 2) and)(i + 3, j + 3) posi'ons.)This)will)results)in)a)run)of)4)diagonal)dots.)
![Page 16: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/16.jpg)
Dot)matrix,)k=1)(DNA)sequences)of)size)1875)and)2013)bp))
![Page 17: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/17.jpg)
Dot)matrix,)k=4)(DNA)sequences)of)size)1875)and)2013)bp))
![Page 18: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/18.jpg)
Dot)matrix,)k=8)(DNA)sequences)of)size)1875)and)2013)bp))
![Page 19: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/19.jpg)
Dot)matrix,)k=16)(DNA)sequences)of)size)1875)and)2013)bp))
![Page 20: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/20.jpg)
FastA)–)Step)2)
• Score)diagonals)with)k`word)matches,)to)iden'fy)the)10)best)diagonals))
• Construct)an)(m)×)n))grid)and)place)a)dot)at)every)(i,)j))that)begins)a)k`tuple)
k=2
• The)con'guous)diagonal)runs)of)dots)in)the)dot)plot)represent)exact)matches,)so)we)want)to)find)long)diagonal)runs)
• It)can)be)done)without)genera'ng)the)en're)matrix)• We)want)to)this)very)efficiently)('me)and)space))
![Page 21: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/21.jpg)
1. Iden'fy)common)k`words)between)X)and)Y))2. Score)diagonals)with)k`word)matches,)to)iden'fy)the)10)best)
diagonals))3. Rescore)ini'al)regions)with)a)subs'tu'on)matrix))
– Each)of)the)ten)diagonal)runs)with)highest)scores)(iden'fied)in)step)2))are)further)processed)
– Within)each)of)these)diagonal)runs,)an)op'mal)local)
alignment)is)computed)using)a)subs'tu'on)matrix)– These)alignments)are)called))ini(al'regions))
– The)score)of)the)best)sub`alignment)is)found)in)this)phase)is)reported)as)init1))
FastA)–)Outline)
![Page 22: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/22.jpg)
1. Iden'fy)common)k`words)between)X)and)Y))2. Score)diagonals)with)k`word)matches,)to)iden'fy)the)10)best)
diagonals))3. Rescore)ini'al)regions)with)a)subs'tu'on)matrix))4. Join)ini'al)regions)using)gaps)
FastA)–)Outline)
![Page 23: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/23.jpg)
FastA)–)Step)4:)Join)ini'al)regions)using)gaps))
• Two)offset)diagonals)can)be)joined)with)a)gap,)if)the)resul'ng)alignment)has)a)higher)score))– Separate)gap)open)and)extension)are)used)(affine)gap))– Idea:)find)the)best`scoring)combina'on)of)diagonals)
– The)score)of)this)alignment)is)reported)as)initn))– initn)is)used)to)rank)the)library)sequences)
![Page 24: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/24.jpg)
1. Iden'fy)common)k`words)between)X)and)Y))2. Score)diagonals)with)k`word)matches,)to)iden'fy)the)10)best)
diagonals))3. Rescore)ini'al)regions)with)a)subs'tu'on)score)matrix))4. Join)ini'al)regions)using)gaps)5. Perform)dynamic)programming)to)find)the)final)alignments))
FastA)–)Outline)
![Page 25: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/25.jpg)
FastA)–)Step)5:)Local)alignment)in)the)highest`scoring)region))
• Last)step)of)FastA:)perform)local)alignment)using)dynamic)programming)around)the)highest`scoring)region)
highest`scoring)region)
• Do)we)fill)in)the)en're)DP)matrix?)(Smith`Waterman))
• NO,)we)can)apply)banded'Smith`Waterman)))
![Page 26: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/26.jpg)
FastA)–)Step)5:)Local)alignment)in)the)highest`scoring)region))
• Banded'Smith`Waterman))• Idea:)A)high)quality)alignment)will)stay)close)to)the)diagonal)
– If)we)are)only)interested)in)high)quality)alignments,)we)can)skip)filling)in)cells)that)can't)possibly)lead)to)a)high)quality)alignment)
• Region)to)be)aligned)covers)±w))characters)from)the)highest`)scoring)diagonals))
• With)long)sequences,)this)region)is))typically)very)small)compared)to)the))whole)n)x)m)matrix)
• The)score)of)the)resul'ng)alignment))is)reported)as)opt'
Dynamic)programming)matrix)is)filled)only)for)the)green)region))
![Page 27: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/27.jpg)
Proper'es)of)FastA))
• Fast)compared)to)local)alignment)using)dynamic)programming)only))– Only)a)narrow)region)of)the)full)matrix)is)aligned)
• For)DNA)sequence)comparisons,)the)ktup'parameter)can)range)from)1)to)6)
• Increasing)ktup)decreases)the)number)of)hits))– increases)specificity)(the)method)does)not)produce)many)incorrect)results))
– decreases)sensi'vity)(produces)fewer)of)the)correct)results))
![Page 28: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/28.jpg)
• FastA)looks)for)ini'al)exact)matches)to)the)query)sequence)– But)two)proteins)can)have)very)different)amino)acid)sequences)and)s'll)be)biologically)similar))
– This)may)lead)to)a)lack)of)sensi'vity)for)diverged)
sequences)
• FastA)determines)a)highest))scoring)region,)not'all)high)scoring)alignments)between)two)sequences.)Hence,)it)may)miss)instances)of)repeats)or)mul'ple)domains)shared)by)two)proteins)
Proper'es)of)FastA))
![Page 29: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/29.jpg)
The)history)of)the)alignment)problem))
Global)Alignment)) Needleman`Wunsch)algorithm)(linear)gap)) 1972)
Global)Alignment) Affine)gap)(Gotoh’s)solu'on)in)quadra'c)'me)) 1980)
Exact)Local)Alignment) Smith`Waterman)algorithm) 1981)
Heuris'c)Local)
Alignment)FastN)+)FastP)=)FastA) 1985))
Heuris'c)Local)Alignment) BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990)
Heuris'c)Local)Alignment) BLAST)2.0:)Gapped)BLAST)) 1997)
run much faster, at the expense of possibly missing some significant hits (i.e. getting false
negatives) due to the heuristics employed
![Page 30: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/30.jpg)
BLAST)`)Basic)Local)Alignment)Search)Tool))
• Altschul)SF,)Gish)W,)Miller)W),Myers)EW,)Lipman)DJ,)“Basic)local)alignment)search)tool”)(J'of'Molecular'Biology,)1990))
• Perhaps)the)most)widely)used)bioinforma'cs)tool)• It)is)an)alignment)heuris'c)that)determines)local)alignments)
between)a)query)and)a)database)• It)uses)an)approxima'on)of)the)Smith`Waterman)algorithm))• BLAST)consists)of)two)components:))
– search)algorithm))
– computa'on)of)the)sta's'cal)significance)of)solu'ons)• Speed)is)achieved)by)using)a)procedure)that)typically)finds)“most”)
matches)with)scores)>)S))
BLAST paper is the most cited paper of its decade, with more than 20,000 citations.
![Page 31: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/31.jpg)
BLAST)`)Basic)Local)Alignment)Search)Tool))
• BLAST)1.0)only)reports)ungapped)alignments)• Assump'ons:)
– all)the)user)was)probably)interested)in)were)ungapped)alignments)
– if)the)user)wanted)to)find)an)alignment)with)gaps,)the)whole)alignment)could)be)s'tched)together)using)pieces)of)the)ungapped)alignments)returned)by)BLAST)1.0)
• However,)we)know)that)it)is)perfectly)valid)to)want)the)algorithm)to)return)gapped)alignments))
• It)is)osen)not)feasible)to)reconstruct)a)gapped)alignment)from)a)series)of)ungapped)alignments)
• Thus,)BLAST)2.0)was)introduced)in)a)paper)co`authored)by)many)of)the)original)BLAST)1.0)authors)
![Page 32: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/32.jpg)
Idea:)Seed)and)Extend))
• Homologous)sequences)are)likely)to)contain)a)short)high)scoring)word)pair,)or)seed)
• BLAST)finds)high)scoring)seeds)and)tries)to)extend)them)to)compute)maximal)high)scoring)segment)pairs)(HSPs))
![Page 33: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/33.jpg)
BLAST)–)Step)1:)Preprocess)query)
• Split)query)into)overlapping)words)of)length)W))– The)length)of)the)query)word,)W,)is)3)for)protein)sequences)
• Find)the)neighborhood)for)each)word,)for)a)similarity)threshold)T)
What are these scores?
![Page 34: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/34.jpg)
The)threshold)T)is)based)on)a)subs'tu'on)matrix)
PQG)PMG)))
BLOSUM62
7+0+6=13)
![Page 35: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/35.jpg)
BLAST)–)Step)1:)Preprocess)query)
• Split)query)into)overlapping)words)of)length)W))– The)length)of)the)query)word,)W,)is)3)for)protein)sequences)
• Find)the)neighborhood)for)each)word,)for)a)similarity)threshold)T)
What are these scores?
![Page 36: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/36.jpg)
BLAST)–)Step2:)Construct)query)word)hash)table)
![Page 37: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/37.jpg)
BLAST)–)Step)3:)Database)scanning)
• Iden'fy)all)exact)matches)of)W`mers)with)DB)sequences)
• A)segment>pair)(s,t))(or)hit))consists)of)two)segments,)one)in)the)query)and)one)in)the)database,)of)the)same)length)
![Page 38: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/38.jpg)
BLAST)–)Step)3:)Database)scanning)
Query: GSVEDTTGSQSLAALLNKCKTPQG
PQG PEG PRG PKG PNG
Neighborhood words
Neighborhood score threshold (T=13)
PDG PHG PMG PSQ PQA PQN
325 365SLAALLNKCKTPQG
290 330TLASVLDCTVTPMG
High-scoring Segment Pair (HSP)
+LA++L+ TP G R++ +W+ P+ D + ER + A
etc... X
18 15 14 14 13 13 13 13 13 12 12
Query:
Sbjct:
Query word (W =3)
QRLVNQWIKQPLMDKNRIEERLNLVEAFVEDAELRQTLQEDL
QRLVNQWIKQPLMDKNRIEERLNLVEA
SRMLKRWLHMPVRDTRVLLERQQTIGA
THE BLAST SEARCH ALGORITHM
Adapted from: Baxevanis, Andy. "Nucleotide and Protein Sequence Analysis I." Lecture presentation, National Human Genome Research
Institute Current Topics in Genome Analysis, Bethesda, MD, February 1, 2005. Figure by MIT OCW.
Segment pair, or seed (s, t)
![Page 39: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/39.jpg)
BLAST)–)Step)4:)Extend)seeds)to)HSP)
• Each)such)seed)(s,)t'))is)extended)in)both)direc'ons)un'l)its)score)cannot)be)increased))
• All)extensions)with)score)≥)S)are)reported))• These)are)called)high`scoring)segment)pairs)(HSPs))• Originally)(in)BLAST1.0))the)extension)did)not)include)gaps.)
The)BLAST2.0)algorithm)allows)inser'on)of)gaps))
![Page 40: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/40.jpg)
BLAST)–)Step)5:)Evalua'on)
• Evaluate)the)alignment)sta's'cally)
• E>value:))the)number)of)HSPs)having)score)S)(or)higher))expected)to)occur)by)chance)(given)the)database)))
• Smaller)E`value)means)more)significant)score)• Big)E`value)corresponds)to)random)alignments)
• P>value:)the)probability)that)an)HSP)with)score)S)(or)higher))is)generated)by)chance)
![Page 41: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/41.jpg)
Assessing)the)significance)of)sequence)alignment)
• We)want))to)evaluate)the)probability)that)a)score)between)random)(unrelated))sequences)will)reach)the)score)found)between)the)two)sequences)on)interest)
• What)is)the)distribu'on)of)scores)between)2)random)sequences?)
![Page 42: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/42.jpg)
• Karlin)and)Altschul)observed)that)in)the)framework)of)local)alignments)without)gaps,)the)distribu'on)of)random)sequence)alignment)scores)follows)an)extreme)value)
distribu'on)
Parameters that depend on the length and composition of the sequences, and on the scoring function
Assessing)the)significance)of)sequence)alignment)
![Page 43: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/43.jpg)
P`value)=)the)probability)of))obtaining)a)score)equal)to)or))greater)than)x)by)chance)Score A - significant
Score B – not significant
Assessing)the)significance)of)sequence)alignment)
![Page 44: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/44.jpg)
• P`value:))– Probability)that)an)alignment)with)this)score)occurs)by)chance)in)a)database)of)size)N)
– The)closer)the)P`value)is)towards)0,)the)beuer)the)alignment))
• E`value:))– Number)of)matches)with)this)score)one)can)expect)to)find)by)chance)in)a)database)of)size)N)
– The)closer)the)E`value)is)towards)0,)the)beuer)the)alignment))
• In)a)database)of)size)N:)P)x)N)=)E)
Assessing)the)significance)of)sequence)alignment)
![Page 45: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/45.jpg)
• Local)alignment)without)gaps:)– Extreme)Value)Distribu'on)
– Theore'cal)work)of)Karlin)and)Altschul)
Assessing)the)significance)of)sequence)alignment)
• Local)alignments)with)gaps:)– Extreme)Value)Distribu'on)derived)from)empirical)studies)
![Page 46: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/46.jpg)
BLAST)parameters))
• Larger)values)of)W)increases)the)number)of)neighborhood)words,)but)decreases)the)number)of)chance)matches)in)the)database)– In)prac'ce,)W'=)12)for)DNA,)3)for)protein)sequences)
• Larger)values)of)T)decrease)the)overall)execu'on)'me,)but)increase)the)chance)of)missing)a)MSP)having)score)≥)S))
• Larger)values)of)S)increase)the)specificity.)The)value)of)S)is)affected)by)changes)in)the)expecta'on)value)parameter)
![Page 47: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/47.jpg)
BLAST)parameters))
• The)more)filtering)we)do)the)less)work)we)end)up)having)to)do)in)later)steps)of)the)algorithm)
• However,)the)more)filtering)we)do)the)greater)our)chances)of)having)false)nega'ves)
• The)less)filtering)we)do)the)more)sequences)we)are)forced)to)analyze)aser)the)filtering)step,)but)the)fewer)false)nega'ves)we)encounter))
![Page 48: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/48.jpg)
Very)similar)sequences))
![Page 49: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/49.jpg)
Quite)similar)sequences))
![Page 50: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/50.jpg)
Not)similar)sequences))
![Page 51: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/51.jpg)
Blast)versions))
Program Database Query
BLASTN Nucleotide Nucleotide
BLASTP Protein Protein
BLASTX Protein Nucleotide translated in to protein
TBLASTN Nucleotide translated into protein Protein
TBLASTX Nucleotide translated into protein
Nucleotide translated into protein
![Page 52: Heuris'c)search:)FastA)and)BLAST - Duke Universitydb.cs.duke.edu/.../resources/fasta.blast.slides.pdf · BLAST)1.0:)Basic)Local)Alignment)Search)Tool)) 1990) Heuris'c)Local) Alignment)](https://reader035.fdocuments.net/reader035/viewer/2022071010/5fc79018eb169260f570ff85/html5/thumbnails/52.jpg)
NCBI)Blast))