slide1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Local Alignment PowerPoint Presentation
Download Presentation
Local Alignment

Loading in 2 Seconds...

play fullscreen
1 / 44

Local Alignment - PowerPoint PPT Presentation


  • 151 Views
  • Uploaded on

Tutorial 2. Local Alignment. Local alignment. What is local alignment? Dynamic programming How to solve a local alignment matrix Reminder – global alignment. Local alignment.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Local Alignment' - zocha


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Tutorial 2

Local Alignment

slide2

Local alignment

  • What is local alignment?
  • Dynamic programming
  • How to solve a local alignment matrix
  • Reminder – global alignment
slide3

Local alignment

Local alignment finds one or more alignments describing the most similar region(s) within the sequences to be aligned.

slide4

Local Alignment

  • Dynamic Programming algorithm for finding local matches between two sequences.
  • What is a local match?:
    • It is a best-matching, highest-scoring region between two sequences.
    • It is a well conserved region between two sequences.
slide5

Dynamic Programming

  • Conditions
    • Division to sub-problems possible
    • The problem can be described in a recursive way
    • “Bottom-up” approach
slide6

Example – solving Fibonacci

Fib(x) = Fib(x-1)+Fib(x-2),

Fib(0)=0 Fib(1)=1

Fib(5) = Fib(3)+Fib(4)

Fib(5) = Fib(2)+Fib(1)+Fib(3)+Fib(2)

Fib(5) = Fib(1)+Fib(0)+Fib(1)+Fib(2)+Fib(1)+Fib(1)+Fib(0)

Fib(5) = Fib(1)+Fib(0)+Fib(1)+ Fib(1)+Fib(0)+Fib(1)+Fib(1)+Fib(0)

Fib(5) = 1+0+1+1+0+1+1+0 = 5

Without using dynamic programming we will need to calculate Fib(2) three times.

slide7

Fibonacci

Dynamic programming solution will work “bottom up”:

1. First calculate Fib(2) from known Fib(0) and Fib(1)

2. Calculate Fib(3) using calculated Fib(2) and known Fib(1).

3. Calculate Fib(4) using calculated Fib(3) and Fib(2).

4. Calculate Fib(5) using calculated Fib(4) and Fib(3).

alignment
Alignment

[I,J] Best alignment M1..I, N1..J

alignment1
Alignment

All possible alignments encoded as path in matrix

slide11

Global vs Local

  • The differences:
  • We can start a new match instead of extending a previous alignment.
  • Instead of looking only at the far corner, we look anywhere in the table for the best score

Global

Local

  • Scoring System
  • Match : +1
  • Mismatch: -2
  • Indel : -1
local alignment
Local Alignment

Scoring System

  • Match : +1 Ni=Mj
  • Mismatch: -1 Ni=Mj
  • Indel : -2
local alignment1
Local Alignment

Scoring System

  • Match : +1 Ni=Mj
  • Mismatch: -1 Ni=Mj
  • Indel : -2
local alignment2
Local Alignment

Scoring System

  • Match : +1
  • Mismatch : -1
  • Indel : -2
local alignment3
Local Alignment

Scoring System

  • Match : +1
  • Mismatch : -1
  • Indel : -2

N1

-

local alignment4
Local Alignment

Scoring System

  • Match : +1
  • Mismatch : -1
  • Indel : -2

-M1

local alignment5
Local Alignment

Scoring System

  • Match : +1
  • Mismatch: -1
  • Indel : -2

N1-

M1M2

local alignment6

+1 if M2=N2; -1 if M2=N2

Local Alignment

Fill:

1.We fill the table like in global alignment, but we don’t allow negative numbers (turn every negative number to 0)

2.No arrows coming out from cells with a 0.

Scoring System

  • Match : +1
  • Mismatch: -1
  • Indel : -2

N1N2..

M1M2..

N1N2..

M1 -..

-2

N1 -..

M1M2..

local alignment7

+1 if M2=N2; -1 if M2=N2

Local Alignment

Trace:

We trace back from the highest scoring cells.

N1N2..

M1M2..

N1N2..

M1 -..

-2

N1 -..

M1M2..

if you like formulas
If you like formulas…

i

i+1

j

Z = max (Si,j+w, Si+1,j+w, Si,j+1+w)

j+1

Z

When w is the score according to the scoring matrix

For example

match or mismatch

2 match

w =

-1 mismatch/indel

Z = max (Si,j+2/-1, Si+1,j-1, Si,j+1-1)

indel

slide25

-

T

slide26

T

-

slide28

-T

-T

+1

T-

-T

-T

T-

-2

-2

slide31

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

0

0

0

0

0

0

T1

0

1

0

0

1

0

0

A2

0

A3

0

T4

0

A5

0

slide32

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

0

0

0

0

0

0

T1

0

1

0

0

1

0

0

A2

0

0

2

0

0

2

1

A3

0

T4

0

A5

0

slide33

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

0

0

0

0

0

0

T1

0

1

0

0

1

0

0

A2

0

0

2

0

0

2

1

A3

0

0

1

1

0

1

3

T4

0

A5

0

slide34

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

0

0

0

0

0

0

T1

0

1

0

0

1

0

0

A2

0

0

2

0

0

2

1

A3

0

0

1

1

0

1

3

T4

0

1

0

0

2

0

1

A5

0

slide35

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

0

0

0

0

0

0

T1

0

1

0

0

1

0

0

A2

0

0

2

0

0

2

1

A3

0

0

1

1

0

1

3

T4

0

1

0

0

2

0

1

A5

0

0

2

0

0

3

1

slide38

TAA

TAA

TACTA

TAATA

and now global alignment

+1 if M2=N2; -1 if M2=N2

And Now… Global Alignment

1.We keep negative numbers.

2.Arrows coming out from any cell.

3.We trace back from right-bottom to left-top of the table.

Scoring System

  • Match : +1
  • Mismatch: -1
  • Indel : -2

N1N2..

M1M2..

N1N2..

M1 -..

-2

N1 -..

M1M2..

slide40

Match: +1

  • Mismatch:-1
  • Indel: -2

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

-2

-4

-6

-8

-10

-12

T1

-2

1

-1

-3

-5

-7

-9

A2

-4

-1

2

0

-2

-4

-6

A3

-6

-3

0

1

-1

-1

-3

T4

-8

-5

-2

-1

2

0

-2

A5

-10

-7

-4

-3

0

3

1

slide41

Match: +1

  • Mismatch:-1
  • Indel: -2

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

-2

-4

-6

-8

-10

-12

T1

-2

1

-1

-3

-5

-7

-9

A2

-4

-1

2

0

-2

-4

-6

A3

-6

-3

0

1

-1

-1

-3

T4

-8

-5

-2

-1

2

0

-2

A5

-10

-7

-4

-3

0

3

1

slide42

0

T

1

A

2

C

3

T

4

A

5

A

6

0

0

-1

-2

-3

-4

-5

-6

T1

-1

1

-1

-3

-2

-4

-6

A2

-2

-1

2

0

-2

0

-2

A3

-3

-3

0

1

-1

-1

1

T4

-4

-2

-2

-1

2

0

-1

A5

-5

-4

-1

-3

0

3

1

slide43

TACTAA

TAATA-

TACTAA

TAAT-A

slide44

Global

Local

TACTAA

TAAT-A

TAA

TAA

TACTAA

TAATA-

TACTA

TAATA