sequence comparison: pairwise alignment · global alignment a global pairwise alignment is one...
TRANSCRIPT
![Page 1: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/1.jpg)
SequenceComparison:PairwiseAlignment
ShifraBen‐Dor
IritOrr
![Page 2: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/2.jpg)
Theproblems:
IhaveaDNAsequence:Whatdoesitdo?
possiblecodingregion
possibleregulatoryregion
Ihaveaproteinsequence:
Whatdoesitdo??
![Page 3: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/3.jpg)
SequenceComparison
• Generally,sequencedeterminesstructureandstructuredeterminesfuncHon
• Bystudyingsequencesimilarity,wehopetofindcorrelaHonsbetweenoursequenceandothersequenceswithknownstructureorfuncHon
• ThisapproachisoKensuccessful,howevermanymoleculeshavelowsequencesimilarity,yetsHllsharesimilarstructureorfuncHon.
![Page 4: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/4.jpg)
SequenceComparison
• MoHfs/Domains‐similarityoversmallstretches
• Sequencefamilies‐similarityoverlongersequences
• Comparisoncanhelpuswith:
• structure
• funcHon
• evoluHon
![Page 5: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/5.jpg)
ComparisonQuesHons:
• Arethesequencesrelated(homology)?
• Canwequalifytheirsimilarity?
• Dotheyhavesimilarsegments?
![Page 6: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/6.jpg)
Terminology:
• Homology
• IdenHty
• Similarity
![Page 7: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/7.jpg)
Homology
• Commonancestry
• Sequence(andusuallystructure)conservaHon
• HomologyisnotameasurablequanHty
• Homologycanbeinferred,undersuitablecondiHons
![Page 8: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/8.jpg)
IdenHty
• ObjecHveandwelldefined
• CanbequanHfiedbyseveralmethods:
• Percent
• ThenumberofidenHcalmatchesdividedbythelengthofthealignedregion
![Page 9: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/9.jpg)
Similarity
• Mostcommonmethodused
• Notsowelldefined
• Dependsontheparametersused(alphabet,scoringmatrix,etc.)
![Page 10: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/10.jpg)
Whatarewecomparing?
• DNAorRNA
• Fournucleicacids(basicset)
• Protein
• Twentyaminoacids(basicset)
![Page 11: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/11.jpg)
Alignment
• Analignmentisanarrangementoftwosequencesoppositeoneanother
• Itshowswheretheyaredifferentandwheretheyaresimilar
• WewanttofindtheopHmalalignment‐themostsimilarityandtheleastdifferences
![Page 12: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/12.jpg)
Alignment
• Alignmentshavetwoaspects:
• QuanHty:Towhatdegreearethesequencessimilar(percentage,otherscoringmethod)
• Quality:Regionsofsimilarityinagivensequence
![Page 13: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/13.jpg)
TheopHmalalignmentoftwo
sequencesisonethatfinds
thelongestsegmentofhigh
sequencesimilarity.
![Page 14: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/14.jpg)
Howisanalignmentdone?
• Whenwecomparesequences,wetaketwostringsofleXers(nucleoHdesoraminoacids)andalignthem.
• WherethecharactersareidenHcal,wegivethemaposiHvescore,andwheretheydiffer,anegaHvevalue.
• WecounttheidenHcalandnon‐idenHcalcharacters,andgivethealignmentascore(usuallycalledthequality)
![Page 15: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/15.jpg)
Differencesinthesequencecanbe
causedbydeleHonsorinserHonsin
theDNA,orbypointmutaHons.These
changescanbeseenattheproteinlevel
aswell(changesinthetranslaHonof
theprotein)
![Page 16: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/16.jpg)
Thisschemeworksfineaslongas
youassumethatallpossiblemutaHons
occuratthesamefrequency.
However,naturedoesn’tworkthisway.
IthasbeenfoundthatinDNA,transiHons
occurmoreoKenthantransversions.
![Page 17: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/17.jpg)
Purines(A,G) are2‐ringbasesPyrimidines(C,T)are1‐ringbases
TransiHon:purinetopurineor pyrimidinetopyrimidine
Transversion:purinetopyrimidineorpyrimidinetopurine
TransiHonsconserveringnumberTransversionschangeringnumber
![Page 18: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/18.jpg)
takenfromMolecularCellBiology,DarnellLodishBalHmore1990
![Page 19: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/19.jpg)
Forproteins,thesituaHonisfarmorecomplex
• AminoacidscanbegroupedbyanumberofclassificaHons:
• Chemical:aromaHc,aliphaHc,sulphuric
• FuncHonal:hydrophobic,hydrophilic,acidic,basic
• Charge:posiHve,negaHve,neutral
• Structural:internal,external
![Page 20: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/20.jpg)
ScoringMatrices
• Scoringmatricesareusedtoassignascoretoeachcomparisonofapairofcharacters
• ThescoresinthematrixareintegervalueswhichassignaposiHvescoretoidenHcalorsimilarcharacterpairs,andanegaHvevaluetodissimilarpairs
• Thematriceswereconstructedbyanalyzingknownfamiliesofproteins
![Page 21: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/21.jpg)
Anexample:Blosum62Henikoff&Henikoff
A B C D E F G H I K L M N P Q R S T V W X Y Z A 4 -2 0 -2 -1 -2 0 -2 -1 -1 -1 -1 -2 -1 -1 -1 1 0 0 -3 -1 -2 -1 B -2 6 -3 6 2 -3 -1 -1 -3 -1 -4 -3 1 -1 0 -2 0 -1 -3 -4 -1 -3 2 C 0 -3 9 -3 -4 -2 -3 -3 -1 -3 -1 -1 -3 -3 -3 -3 -1 -1 -1 -2 -1 -2 -4 D -2 6 -3 6 2 -3 -1 -1 -3 -1 -4 -3 1 -1 0 -2 0 -1 -3 -4 -1 -3 2 E -1 2 -4 2 5 -3 -2 0 -3 1 -3 -2 0 -1 2 0 0 -1 -2 -3 -1 -2 5 F -2 -3 -2 -3 -3 6 -3 -1 0 -3 0 0 -3 -4 -3 -3 -2 -2 -1 1 -1 3 -3 G 0 -1 -3 -1 -2 -3 6 -2 -4 -2 -4 -3 0 -2 -2 -2 0 -2 -3 -2 -1 -3 -2 H -2 -1 -3 -1 0 -1 -2 8 -3 -1 -3 -2 1 -2 0 0 -1 -2 -3 -2 -1 2 0 I -1 -3 -1 -3 -3 0 -4 -3 4 -3 2 1 -3 -3 -3 -3 -2 -1 3 -3 -1 -1 -3 K -1 -1 -3 -1 1 -3 -2 -1 -3 5 -2 -1 0 -1 1 2 0 -1 -2 -3 -1 -2 1 L -1 -4 -1 -4 -3 0 -4 -3 2 -2 4 2 -3 -3 -2 -2 -2 -1 1 -2 -1 -1 -3 M -1 -3 -1 -3 -2 0 -3 -2 1 -1 2 5 -2 -2 0 -1 -1 -1 1 -1 -1 -1 -2 N -2 1 -3 1 0 -3 0 1 -3 0 -3 -2 6 -2 0 0 1 0 -3 -4 -1 -2 0 P -1 -1 -3 -1 -1 -4 -2 -2 -3 -1 -3 -2 -2 7 -1 -2 -1 -1 -2 -4 -1 -3 -1 Q -1 0 -3 0 2 -3 -2 0 -3 1 -2 0 0 -1 5 1 0 -1 -2 -2 -1 -1 2 R -1 -2 -3 -2 0 -3 -2 0 -3 2 -2 -1 0 -2 1 5 -1 -1 -3 -3 -1 -2 0 S 1 0 -1 0 0 -2 0 -1 -2 0 -2 -1 1 -1 0 -1 4 1 -2 -3 -1 -2 0 T 0 -1 -1 -1 -1 -2 -2 -2 -1 -1 -1 -1 0 -1 -1 -1 1 5 0 -2 -1 -2 -1 V 0 -3 -1 -3 -2 -1 -3 -3 3 -2 1 1 -3 -2 -2 -3 -2 0 4 -3 -1 -1 -2 W -3 -4 -2 -4 -3 1 -2 -2 -3 -3 -2 -1 -4 -4 -2 -3 -3 -2 -3 11 -1 2 -3 X -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 Y -2 -3 -2 -3 -2 3 -3 2 -1 -2 -1 -1 -2 -3 -1 -2 -2 -2 -1 2 -1 7 -2 Z -1 2 -4 2 5 -3 -2 0 -3 1 -3 -2 0 -1 2 0 0 -1 -2 -3 -1 -2 5
![Page 22: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/22.jpg)
Alignmentalgorithms
• Visualalignment
• allowsintegraHonofrelevantdatanotavailabletocomputerizedalgorithms
• Timeconsuming,notfeasibleforallbuttheshortestsequences
• Fixedlengthalgorithms
• donotconsiderinserHonsanddeleHons• inserHonsanddeleHonsareneededevenforcloselyrelatedsequences
![Page 23: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/23.jpg)
AlignmentAlgorithms
• Thenaïveapproach:
• generateallpossiblealignmentsfor2sequences(includinggaps)andchoosethealignmentwiththehighestscore
• TooHmeconsuming
![Page 24: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/24.jpg)
Dynamicprogrammingalgorithms
• Eachcharacteralongbothsequencesisevaluated.AteachposiHontherearefourpossibilites• idenHty
• subsHtuHon
• deleHoninsequence1
• deleHoninsequence2
![Page 25: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/25.jpg)
Dynamicprogramming
• IdenHcalcharacters(matches)orsubsHtuHons(mismatches)arescoredaccordingtoamatrix.
• DeleHonsineitherofthesequencesarecalledgaps.
• GapsaregivenanegaHvescore,referredtoasthegappenalty
![Page 26: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/26.jpg)
Thealignmentisgivenascore,calledthequality
Quality=matches‐(mismatches+gappenalty)
Theprogramwillfindthealignmentwiththehighestquality.
ThechoicebetweengapsandsubsHtuHonsismadetogivethehigherqualityofthetwo.
![Page 27: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/27.jpg)
TheGapPenaltyConsiderthetwofollowingalignments:
V I T K L G T C V G S V I T K L G T C V G S
V I T . . . T C V G S V . T K . G T C V . S
Accordingtothealgorithmthese2caseswillgetthesamegappenalty:
Match=3Gap=‐2
8(3) + 3(-2) = 18 8(3) + 3(-2) = 18
![Page 28: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/28.jpg)
Howevernatureisdifferent.Inmost
casesinserHons/deleHonsarelonger
thanasingleresidue,evenforvery
similarsequences.
![Page 29: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/29.jpg)
Tocompensateforthis,andtodifferenHatebetweencasesliketheoneabove,thegappenaltyismadeupoftwofactors:
ThegapcreaHonpenalty‐subtractedfromthealignmentqualitywheneveragapisopened.
Thegapextensionpenalty‐subtractedfromthealignmentqualityaccordingtothelengthofthegap.
![Page 30: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/30.jpg)
Thuswehave:
Quality=
matches‐(mismatches+gappenalty)
Gappenalty=
gapcreaHonpenalty+(gapextensionpenaltyXgaplength)
![Page 31: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/31.jpg)
TheGapPenaltySonowwehave:
V I T K L G T C V G S V I T K L G T C V G S V I T . . . T C V G S V . T K . G T C V . S
Match=3Gapopen=‐4Gapextension=‐1
8(3)+[1(‐4)+3(‐1)]=178(3)+[3(‐4)+3(‐1)]=9
![Page 32: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/32.jpg)
Gappenaltyparameters
InserHonofagapmustimprovethequalityofthealignment(raisethequalityscore).
IfthegapcreaHonandgapextensionpenalHesarehigh,lessgapswillbeinsertedintothealignment.
IfthegapcreaHonandgapextensionpenalHesarelow,moregapswillbeinsertedintothealignment.
![Page 33: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/33.jpg)
SoifyouareinterestedinanalignmentbetweentwoverysimilarsequencesthegappenalHesshouldberaised,toreducethechancesofgejngsomethingrandom.
IfyouareinterestedindetecHnghomology(findingaweaksimilarity)betweentwodistantlyrelatedsequencesthegappenalHesshouldbelowered.
Ifyoudon'tknowwhattoexpect,startoffwiththedefaultparameters
![Page 34: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/34.jpg)
Tosummarize: Alignmentscoresaredependentonwhatwechoosefor:matches,mismatches,subsHtuHonsandgaps.
Dynamicprogrammingcanbeusedforglobalorlocalalignment
![Page 35: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/35.jpg)
Twotypesofalignment:
• Globalalignment
• Localalignment
![Page 36: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/36.jpg)
![Page 37: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/37.jpg)
Globalalignment
Aglobalpairwisealignmentisonewhereitisassumedthatthetwosequenceshavedivergedfromacommonancestorandthattheprogramshouldtrytostretchthetwosequences,introducinggapswherenecessary,inordertoshowthealignmentoverthewholelengthofthetwosequencesthatbestillustratestheirsimilariHes.
![Page 38: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/38.jpg)
Globalalignment
• Comparessequencesandgivesbestoverallalignment
• Mayfailtofindthebestlocalregionofsimilarity(suchasasharedmoHf)amongdistantlyrelatedsequences
• Will(generally)returnonlythebestmatchingsegmentforagivenpairofsequences
![Page 39: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/39.jpg)
Globalalignment
• TheclassicalalgorithmforglobalalignmentistheNeedleman‐Wunsch
![Page 40: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/40.jpg)
LocalAlignment
• SearchesforregionsoflocalsimilaritybetweentwosequencesandneednotincludetheenHrelengthofthesequences.
• Findsregionsof(ungapped)sequencewithahighdegreeofsimilarity
• BeXeratfindingmoHfs,especiallyforsequencesthataredifferentoverall
• Canreturnmorethanonematchingsegmentforagivenpairofsequences
![Page 41: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/41.jpg)
LocalAlignment
• TheclassicalalgorithmforlocalalignmentistheSmith‐Waterman
![Page 42: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/42.jpg)
SequenceComparisonPrograms
• Global• Gap(GCG)
• Align(Fasta)• Needle(EMBOSS)• Stretcher(EMBOSS)–modifiedtoconservememory,goodforlongsequences
![Page 43: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/43.jpg)
SequenceComparisonPrograms
• Local• Besmit(GCG)
• Lalign(Fasta)–canreturnmorethanonesegment• Matcher(EMBOSS)‐basedonlalign,canreturnmorethanonesegment
• Water(EMBOSS)‐Smith‐Waterman,onlyonehit
![Page 44: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/44.jpg)
LocalpairwisealignmentusingBL2SEQatNCBI
ThistoolproducesthealignmentoftwogivensequencesusingBLASTalgorithmforlocalalignment.
Reference:TaHanaA.Tatusova,ThomasL.Madden(1999),"Blast2sequences‐anewtoolforcomparingproteinandnucleoHdesequences",FEMSMicrobiolLeX.174:247‐250
![Page 45: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/45.jpg)
LocalpairwisealignmentusingBL2SEQ
ThistooluHlizestheBLASTengineforpairwisesequencecomparisonandisbasedonthesamealgorithmandstaHsHcsoflocalalignmentsthathavebeendescribedintheBLASTpaper.
TheBLASTalgorithmgeneratesagappedalignmentbyusingdynamicprogrammingtoextendthecentralsegmentofalignedresidues.
Becausetheparameterswerebasedondatabasesearching,somemayhavetobechangedtofindamatch
![Page 46: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/46.jpg)
StaHsHcalEvaluaHonofAlignments
TheproblemwiththeseprogramsisnomaXerhowdissimilarthesequencesyoucompare,theprogramswillalwaysalignthem.
Evena5%idenHtywillbedisplayedasavalidresult.
SohowcanyoutellifthealignmentisstaHsHcallyvalid????
![Page 47: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/47.jpg)
TherandomizeopHon
TherandomizeopHonwilltakethesecondsequenceyouinputandshuffleit,toobtainarandomsequencewiththesamecharactercomposiHon.
Thisrandomsequencewillbecomparedtothefirstsequence,usingeitheraglobalorlocalalgorithm(thesamethatyouusedoriginally),andaqualityscorewillbeobtained.
![Page 48: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/48.jpg)
TherandomizeopHon
ThisprocessisrepeatedanumberofHmes,specifiedbytheuser,inordertoobtainapopulaHonofsequencesthatcanbeusedforstaHsHcalanalysis.
Thequalityofthesealignmentswillbeaveragedandcomparedtotheoriginalquality,andthenbeusedtogiveastaHsHcallymeaningfulanswertothealignment.
![Page 49: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/49.jpg)
Theprogramgivestheoriginalalignment,
theoriginalquality,andanewqualityscore
madefromtheaverageoftherandomized
alignments+/‐thestandarddeviaHon.
![Page 50: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/50.jpg)
Thesevaluesareusedtocalculatethedistanceofyouroriginalqualityfromthemean(Z‐score).
Z‐score=(OriginalQuality‐AverageQuality)StandardDeviaHon
AZ‐scoreofover4isconsideredsignificant.(MeaningthatthealignmentisstaHsHcallysignificanttoo)
![Page 51: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/51.jpg)
AlternaHvestoGCG
• IntheFASTApackage,therearetwoalternaHveprogramsforstaHsHcalanalysis:
• PRDF‐calculatestheprobabilityofasimilarityscoremoreaccuratelybyusingafittoanextremevaluedistribuHon.
• PRSS‐aversionofPRDFthatusesarigorousSmith‐WatermancalculaHontoscoresimilariHes
(Theseprogramsareavailableontheweb)
![Page 52: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/52.jpg)
Dotplotsaretwodimensionalgraphs,showingacomparisonoftwosequences.
Thetwoaxesofthegraphrepresentthetwosequencesbeingcompared.
Everyregionofthesequenceiscomparedtoeveryregionoftheothersequence.
Dotplots
![Page 53: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/53.jpg)
![Page 54: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/54.jpg)
Dotplots
Dotplojngisthebestwaytoseeallofthestructuresincommonbetweentwosequences.
Dotplojngcanalsobeusedtoviewrepeatedstructuresorinvertedrepeatsinasinglesequence.Thisisaccomplishedbycomparingasequencetoitself.
Dotplojnghelpsrecognizelargeregionsofsimilarity.InmostcasesitisnotsensiHveenoughtoseesmallstructures.
![Page 55: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/55.jpg)
ComparisonCriteria
Thematchcriterioncanbemetintwodifferentways:
Thewindow/stringencymethod.
Thewordmethod.
![Page 56: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/56.jpg)
Thewindow/stringencymethod
Searchesforalltheplaceswhereagivennumberofmatches(stringency)occurwithinagivenrange(window).
ThismethodismoreHme‐consuming,butmoresensiHve.
Comparisonsaredoneaccordingtoascoringmatrix.
![Page 57: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/57.jpg)
Mustbespecifiedonthecommandline(‐wordsize=X,whereXisthesizeyouchoose).
Searchesforshortperfectmatchesofasetlength(words).
Thismethodisabout1000Hmesfasterthanthewindow/stringencymethod,butismuchlesssensiHve.
Ifthesequencesdonotcontainshortperfectmatchesthenthismethodwillfindnothing.
Thewordmethod
![Page 58: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/58.jpg)
HintsIfyouhavelongsequences,tryawordcomparisonfirst.Thisismuchfaster,andwillgiveyouanideaofwhatthedotplotforthemoresensiHvewindow/stringencymethodwilllooklike.
Whenusingthewordmethod,startoffwithawordsizeof6fornucleicacidsequencesofupto1,000bases,or8forsequencesofupto10,000.
![Page 59: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/59.jpg)
Hints
ForpepHdesequences,startoffwithawordsizeof2‐3.
Whenusingthewindow/stringencymethodstartoffwithawindowof21andastringencyof14fornucleicacids.
ForpepHdesequencesstartoffwithawindowof30andastringencyof11.
![Page 60: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/60.jpg)
Programsfordotplots
GCG– Compare(createthepoints)
– Dotplot(plottheoutputofcompare)
SeqWeb(GCG)– Compare
EMBOSS– Dotmatcher‐window/stringency– DoXup‐wordplot– Dotpath‐non‐overlappingwordplot– Polydot‐allagainstallwordplot
![Page 61: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/61.jpg)
AlternaHve“dotplots”
DoXerisagraphicaldotplotprogramfordetailedcomparisonoftwosequences.
Tomakethescorematrixmoreintelligible,thepairwisescoresareaveragedoveraslidingwindowwhichrunsdiagonally.Theaveragedscorematrixformsathree‐dimensionallandscape,withthetwosequencesintwodimensionsandtheheightofthepeaksinthethird.
![Page 62: Sequence Comparison: Pairwise Alignment · Global alignment A global pairwise alignment is one where it is assumed that the two sequences have diverged from a common ancestor and](https://reader030.vdocuments.mx/reader030/viewer/2022013021/5f1058e67e708231d448a91a/html5/thumbnails/62.jpg)
Thislandscapeisprojectedontotwodimensionsbyaidofgreyscales‐thedarkergreyofapeak,thehigheritis.
DoXerprovidesatooltoexplorethevisualappearanceofthislandscape,aswellasatooltoexaminethesequencealignmentitrepresents.