Docsity

Midterm - 4 Solved Problems on Introduction to Bioinformatics | CS 466, Exams of Computer Science

Toggle sidebar
bg1
I
(.
Problem
1.
Points:
20.
(Dynamic
programming
for
sequence
alignment)
Consider
the
task
of
finding
the
optimal
alignment
of
the
following
two
sequences:
AACG
and
ACTG.
The
scoring
function
(called b
in
class) is:
A
MATCH
scores
S.
That
is, b(x,x) = 5 for
any
x E
{A,C,G,T}.
A
MISMATCH
scores
-1.
That
is, b(x,y) =-1 for
any
x,y E
{A,C,G,T}
where
X;&!
y.
A
GAP
scores
-1.
That
is, b(x,-) =b(-,x) =-1 for
any
x E
{A,C,G,T}.
As
usual,
we
construct
the
dynamic
programming
table,
and
I've filled in
some
of
the
cells
of
this
table.
~I
A A C G
A 5 4
?1
2>
Z-
4f~5
3;3,:2-
2,1.,
\
3
9
~
7
'lIlt
'3
3/6,Z
2.p
/ l
2
...1
3641'
'7..,
I/~
8
~/7/7
13.
13
/
h'"
C 4
T 3
G 2
(a) Fill in
the
remaining
cells
of
this
Dynamic
Programming
table. (15
points)
(b)
Report
the
optimal
alignment
score. (2
points)
13
(c)
Write
down
an
optimal
alignment
of
the
two
sequences.
(3
points)
A AC
l I
ACT
pf3
pf4

Partial preview of the text

Download Midterm - 4 Solved Problems on Introduction to Bioinformatics | CS 466 and more Exams Computer Science in PDF only on Docsity!

I (.

Problem 1. Points: 20. (Dynamic programming for sequence alignment)

Consider the task of finding the optimal alignment of the following two sequences: AACG and ACTG.

The scoring function (called b in class) is: A MATCH scores S. That is, b(x,x) = 5 for any x E {A,C,G,T}.

A MISMATCH scores -1. That is, b(x,y) =-1 for any x,y E {A,C,G,T} where X;&! y.

A GAP scores -1. That is, b(x,-) =b(-,x) =-1 for any x E {A,C,G,T}.

As usual, we construct the dynamic programming table, and I've filled in some of the cells of this table.

~I

A A C G

A 5 4

?

2>

Z

4f~

2,1., \

9

7

'lIlt '

3/6,Z

2.p/ l

... 3641' '7..,^ I/~

8

~/7/

13 / h'"

C 4

T 3

G 2

(a) Fill in the remaining cells of this Dynamic Programming table. (15 points)

(b) Report the optimal alignment score. (2 points)

13

(c) Write down an optimal alignment of the two sequences. (3 points)

A A C l I

ACT

Problem 2. Points: 15. (Aho Corasick algorithm)

Build a keyword tree, with fail edges (as in the Aho-Corasick algorithm) for the

following dictionary. Mark with dashed arrows the "fail edges" that do not go back

to the root. That is, you do not need to show fail edges going back to the root. You

may, but are not required to mark the nodes that correspond to pattern matches.

BODE ODES ODOR DESK DOOR

ORCA

--R

Problem 4. Points: 20. (HMM.)

Consider an HMM with two possible states, "F" and "B". Each state emits one character, chosen from the alphabet {A,C,G,T}.

The transition probabilities of this HMM are:

aFB= aBF= lJ.t. = 2-^2

aFF = aBB = % = 2-^0.

The emission probabilities are:

eF(A)= eF(C)= eF(G)= eF(T)= lJ.t. = 2-^2

eB(A)= eB(T)= 1/8 = 2-^3

eB(C)= eB(G)= 3/8 = 2-1.

Assume that the initial state is either For B with equal probability (2-^1 each).

Now, you are told that the sequence emitted by this HMM is x = TTT. Show the calculations of the Viterbi algorithm to derive the most likely sequence of states, Le., Jt =Jt1Jt2Jt3, where each Jtds either 'F' or 'B', that maximizes Pr(x, Jt). Your answer should include

(i) the dynamic programming table calculations (15 points),

(ii) the probability Pr(x, Jt) you computed for the best Jt (2 points), and

(iii) the best Jt (3 points).

T T

7' -""41; -'t -7-<is

,if -B~ /1-11'41"

-3 :- ')- 4J ') -7'S~

7 -7'41"^ ...,.^ -10-

~ -ca ~ -)l)' +1 5'

-7'4Jl) -10'41S

f -z

-7 g-r3^.^ ,

(Ill) F r- F