×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Calculating frequency-transition matrix from state-transition matrix

Calculating frequency-transition matrix from state-transition matrix

Calculating frequency-transition matrix from state-transition matrix

(OP)
I am solving a Hidden Markov Model (HMM) problem for DNA sequences.

Given:
1. DNA sequence
ATGGGCTCCTCCGCCATCACCGTGAGCTTCCTCCTCTTTCTGGCATTTCAGCTCCCAGGGCAAACAGGAGCAAATCCCGTGTATGGCTCTGTGTCCAATGCAGACCTGATGGATTTCAAGTAAAAG
2. State-transition matrix (21x6)

State   A   T   G   C   End
  0     1   -1   -1   -1   -1
  1    -1    2   -1   -1   -1
  2    -1   -1    3   -1   -1
  3     4    7    6    5   -1
  4     8   11   10    9   -1
  5     8   11   10    9   -1
  6     8   11   10    9   -1
  7    12   11   13    9   -1
  8    14   17   16   15   -1
  9    14   17   16   15   -1
 10    14   17   16   15   -1
 11    14   17   16   15   -1
 12    18   17   19   15   -1
 13    18   17   16   15   -1
 14     4    7    6    5   20
 15     4    7    6    5   20
 16     4    7    6    5   20
 17     4    7    6    5   20
 18    -1   -1   -1   -1   20
 19    -1   -1   -1   -1   20
 20    -1   -1   -1   -1   -1

Output:
I need to calculate the 20X20 frequency-transition matrix

Example:
ATGGGCTCCT

A->T is state 1->2 ==> count:1

T->G is state 2->3 ==> count:1

G->G is state 3->6 ==> count:1

G->G is state 6->10==> count:1

G->C is state 10->15==>count:1

State 0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
 0
 1          1
 2               1
 3                          1
 4
 5
 6                                       1
 7
 8
 9
 10                                                         1
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20

I know how to proceed manually but I am unclear on how to solve this using Matlab.

Please guide me on how to proceed. Any assistance shall be appreciated!

Thanks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources