This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Constructing HMM profile for any given aligned sequences?

Hi everyone ,

I had aligned sequences and I need to construct a hidden Markov model from it , it is my first time to deal with HMM , so I need any thing can help me.

I should write a c++ code from the beginning .

thanks

alignment hidden markov model

Take a look at HMMER and its excellent documentation on how to do this.

I should write a c++ code , so I should not use it

If you have omitted saying something else then you should go ahead and add that to your original question (you can edit that post easily).

That way people can spend less time figuring out what you need and you will get relevant answers.

BTW: Documentation for HMMER should give you relevant information. You don't have to use their code if you need to write your own.

Thanks for advice , I will edit the post now

I see. You need to specify those details in your question. If there is other important information I would suggest you to include it. Being as informative (and clear) as possible will increase the chances that someone helps you. Good luck.

What is the end goal of your project? Do you want to develop a tool identical to hmmbuild of HMMER package? What extra features are you planning to include? Is it purely educational or do you have a specific goal in mind?

Sorry for too many questions, but if you can explain your needs better then there is a good chance of getting answers. But either way, I would start with understanding the theory behind Hidden Markov models and how it is applicable to sequence data, and then go from there. This paper might help!

It is just an educational project the doctor gave to us . like i said before , it is the first time i deal with HMM

Well, in that case you have lot of reading to do before you can even start thinking about the program! :)

Well , Where should I start

You should start learning the theory behind HMM in the context of sequence analysis. For that you need to read some literature. The paper mentioned above in a start, but probably wont be enough. Other options are this review by Sean Eddy in Bioinformatics and this other paper called Hidden Markov Models (PDF). Finally, his book Biological Sequence Analysis, which you can buy at amazon and others, is a very comprehensive guide.

I know the basics , so what next ??

Since you already have your alignment .. you have all the information needed to start coding.

I already start with emission matrix and it is done , but I don't know how to do the transition matrix

You know, this is why some other people have advised you to give more information. Now you say you know the basics (you didn't say that before) and you have some code (you also didn't say). It makes really difficult to help you even though it seems a lot of people is trying :-) Anyway, since you have started already with some coding, I would include in your question how much you have done, and where exactly are you having problems. Maybe including all the code is not a good idea (depending on the length). But here where you have to do your part: what amount of information should you give in your question that will maximize the chances of someone knowing and giving you the answer you look for.

Maybe including all the code is not a good idea (depending on the length)

Extending @ddiez's suggestion you can use gist to post your code. Biostars understands it and will format your code appropriately.

forget every thing I said and let's start over , now HMM need transition and emission probability matrix , what is the dimension of these matrices ??

With this attitude, I'm really wondering if I should be answering this or not. Please be kind and appreciative of all the help you're getting here. (my other issues: you are not being clear about your questions, you said you did some reading, but you clearly did not: a simple glance at any amino acid hmm profile would have gave you the answer to your question). With that said, the dimension of the matrix will depend on the length of your alignment (m), number of amino acids (n).

0 answers

No answers yet.

Log in to answer this question.